Internationalization of eclipse RCP

Source: Internet
Author: User

It is necessary to re-use Java for the C/S interface client. After selection, it is determined to use eclipse RCP. I won't say much about her advantages and disadvantages.

Because there was no reference to books when I first used eclipse RCP for development, I searched for information online. Unfortunately, there were too few materials in this field, and most of them were the same, so a complete set of documents could not be formed. The results of continuous exploration are not very obvious. So it was quite easy to ask boss to buy books. The next day, he told me that he had placed an order and bought two books online. The next day, the book arrived. It was Chen Gang's "eclipse from getting started to mastering the second edition". In general, it is also good.

After two weeks of development, the project's initial version can be roughly run. Simple functions and simple interface. At the stage of release to the customer, we encountered the problem of internationalization of eclipse. In fact, our requirements are not so heavyweight, but all of them are in Chinese. Widgets that can be controlled on the interface can display Chinese characters, but the jface components provided by ECLIPSE cannot display them. For example, some system menu items, preference (preference ), the dialog box button will not work. It is still in English. Therefore, the English language must be written in Chinese.

This article describes how to internationalize the project, that is, to internationalize the self-developed interface, rather than globalization the built-in component interface of eclipse RCP. So I started searching for information on the Internet.

After Constant tossing, this afternoon was finally achieved. To put it bluntly, it was a very easy task and it took so long. For your reference.

1. First, install the Chinese package of eclipse

The specific installation method is not detailed. Find the correct version. I am using eclipse 3.5 Galileo.

Eclipse International Language Pack http://www.eclipse.org/babel/downloads.php find the corresponding entry

Download the corresponding language pack. For example, we want to download it in the red box:

2. Add required plug-ins on the product configuration page.

The product needs to be released. Eclipse RCP provides a good release wizard.

Right-click the eclipse RCP project and create the "Product Configuration" item:

 

After the dependency is created, click "add required plug-in" on the dependency tab. Eclipse automatically imports the dependent items, for example ):

The red box contains the plug-in dependency of the Chinese package automatically imported by eclipse.

 

3. Export eclipse RCP Products

Right-click the project, select "Export", export the eclipse product, and click "OK" next.

 

4. Run the exported product

The buttons in the eclipse RCP dialog box and preference are all changed to Chinese! (Titleareadialog is used in this logon box. The OK and cancel buttons are both built-in. After adding the Chinese dependency, the buttons are converted to Chinese)

 

There are many things to summarize about eclipse RCP development:

1. "Weight Loss" in the eclipse RCP runtime environment JRE"

2. Use titleareadialog to implement the logon dialog box

3. Integration of eclipse RCP and spring

4. Chinese garbled characters in eclipse RCP packaging and export products

5. Eclipse RCPProgramCannot exit completely

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.