站内搜索: 请输入搜索关键词

当前页面: 开发资料首页Eclipse 英文资料Teach Your Eclipse to Speak the Local Lingo

Teach Your Eclipse to Speak the Local Lingo

摘要: Translations for the Eclipse Project and several top-level projects are contributed to the Eclipse Foundation in every major release of Eclipse. However, there is no official information on what translations are available, where to get them, how to install them, and how to use them. This article provides step-by-step instructions describing what is available, where to download them, how to install them, and how to launch Eclipse in different languages. Examples on launching Eclipse in different languages, including single byte language like Russian, double byte language like Traditional Chinese, and bi-directional language like Arabic, on different operating systems like RHEL WS 4, Windows XP, and Mac OS X 10.3 Panther, together with useful hints and tips, will give you a good general idea on how to launch Eclipse in any of the translated languages, even if the environment you want to work on is not explicitly discussed. By Kit Lo, IBM

Introduction

Translations for the Eclipse Project and several top-level projects are contributed to the Eclipse Foundation in every major release of Eclipse. However, there is no official information on what translations are available, where to get them, how to install them, and how to use them. This article provides step-by-step instructions describing what is available, where to download them, how to install them, and how to launch Eclipse in different languages.

What are available

The latest language packs for Eclipse 3.1 are available at http://download.eclipse.org/downloads/drops/L-3.1.1_Language_Packs-200510051300/index.php. See the Eclipse News announcement at http://www.eclipse.org/org/press-release/20051012nlscb.html. These translations are based on the Eclipse 3.1.1 build, but should work with all subsequent maintenance releases of Eclipse 3.1. Technically, no new strings should be added to a maintenance release, except for critical bug fixes. If new strings are added to a maintenance release of Eclipse 3.1, they will not show up as translated when you install these language packs.

Different Types of Language Pack

The following is a list of different types of language pack available for Eclipse 3.1:

The following figure shows what files are included in the different types of language pack for Eclipse 3.1.

Figure 1 - files included in different types of language pack

Note: Files that cannot use the Java resource bundles naming convention (for example, HTML and XML files) are placed in locale-specific subdirectories under the plug-in.

Installing Eclipse

Before installing the language packs, we assume you have installed one of the Eclipse downloads. The latest Eclipse 3.1.2 downloads are available at http://download.eclipse.org/downloads/drops/R-3.1.2-200601181600/index.php.

Note: Eclipse does not include a Java runtime environment (JRE). You will need a 1.4.2 level or higher Java runtime or Java development kit (JDK) installed on your machine in order to run Eclipse. Read this page http://download.eclipse.org/downloads/drops/R-3.1.2-200601181600//java-runtimes.html if you need help finding a Java runtime.

Where to get the Language Packs

You need to download the language pack corresponding to the Eclipse version youve installed. First of all, open this page http://download.eclipse.org/downloads/drops/L-3.1.1_Language_Packs-200510051300/index.php in a web browser. If youve downloaded Eclipse JDT Runtime, scroll to the JDT Runtime Language Packs table. If youve downloaded Eclipse PDE SDK, scroll to the PDE SDK Language Packs table, etc. In each of the language packs tables (see figure 2), the first column of the language packs table tells you what languages are included in the language packs. The second column contains the language packs for Windows 98/ME/2000/XP. The third column contains the language packs for Linux (x86/GTK 2).

Figure 2 Eclipse SDK Language Packs table

Installing the Language Packs

Lets say you want to install the language packs for Traditional Chinese for Windows XP, youd download NLpack1-eclipse-SDK-3.1.1a-win32.zip and NLpack1_FeatureOverlay-eclipse-SDK-3.1.1.zip (boxed in red in figure 2). To install the language packs, unzip the language packs into the same directory where Eclipse is installed (for example, D:\eclipse-SDK-3.1.1-win32). To verify you have successfully installed the language packs, select the Help>Software Updates>Manage Configuration pull down menu in Eclipse. In the Product Configuration dialog (see figure 3) expand the navigation tree on the left. You should see one language pack feature corresponding to each Eclipse feature installed.

Figure 3 - Product Configuration dialog

Launching Eclipse in a Different Language

Once you have Eclipse and the language packs installed, there are two different ways to launch Eclipse in a different language:

The following are a few examples of launching Eclipse in different languages in different environments. We assume you've installed all the NLpack1, NLpack2, NLpackBidi, NLpack1_FeatureOverlay, NLpack2_FeatureOverlay, and NLpackBidi_FeatureOverlay language packs.

Launching Eclipse on Russian Red Hat Enterprise Linux WS 4

<table> <tr> <td width="200">Operating system:</td> <td>Red Hat Enterprise Linux WS 4</td> </tr> <tr> <td>Processor architecture:</td> <td>Intel x86</td> </tr> <tr> <td>Window system:</td> <td>GTK</td> </tr> <tr> <td>Language:</td> <td>Russian</td> </tr> </table>

Note: Red Hat Enterprise Linux WS 4 Update 2 is required to run Eclipse in DBCS languages (Simplified Chinese, Traditional Chinese, Japanese, and Korean).

Note: When using the IBM JRE version 1.4.2 on Linux, specify the -vmargs -Xj9 command line argument when you launch Eclipse. Refer to the readme file that accompanies the IBM JRE for more information.

Note: If you need to specify both the -nl and -vmargs -Xj9 command line arguments, make sure to specify -vmargs -Xj9 as the last argument (for example, ./eclipse -nl ru vmargs Xj9).

Launching Eclipse on Arabic Windows XP

<table> <tr> <td width="200">Operating system:</td> <td>Microsoft Windows XP</td> </tr> <tr> <td>Processor architecture:</td> <td>Intel x86</td> </tr> <tr> <td>Window system:</td> <td>Win32</td> </tr> <tr> <td>Language:</td> <td>Arabic</td> </tr> </table>

Note: By default, if Eclipse is launched using the Eclipse executable, Eclipse is always displayed in LTR (left-to-right), no matter what language the operating system is set to. You have to specify the dir rtl command line argument when you launch Eclipse to display Eclipse in RTL (right-to-left) orientation.

Launching Eclipse on Traditional Chinese Mac OS X 10.3 Panther

<table> <tr> <td width="200">Operating system:</td> <td>Apple Mac OS X 10.3 Panther</td> </tr> <tr> <td>Processor architecture:</td> <td>PowerPC</td> </tr> <tr> <td>Window system:</td> <td>Carbon</td> </tr> <tr> <td>Language:</td> <td>Traditional Chinese</td> </tr> </table>

Note: Mac OS X 10.3 Panther is not a supported operating system for the language packs for Eclipse 3.1. However, most of the translations from the language packs for Eclipse 3.1 on Linux, except a few platform dependent strings for SWT, should display. For those SWT strings with no translations, English strings will be displayed.

Language Packs for other Eclipse Projects

Translations for the following Eclipse Projects and Subprojects for Eclipse 3.1 are also available. Here is a list of the projects and where the language packs can be found:

Eclipse Tools Project

Eclipse Web Tools Platform (WTP) Project
http://download.eclipse.org/webtools/downloads/translations/M-0.7.1-200509270720/translation.html

Eclipse Test and Performance Tools Platform (TPTP) Project
http://www.eclipse.org/tptp/home/downloads/drops/TPTP-4.0.1.html

The same installation process described above could be used to install these language packs.

Conclusion

Thanks to the contributions of these language packs to the Eclipse Foundation, Eclipse users all over the world could feel much closer to home as Eclipse speaks their local lingo!

Trademarks

IBM and PowerPC are registered trademarks of International Business Machines Corporation in the United States, other countries, or both.

Java and all Java-based trademarks are trademarks of Sun Microsystems, Inc. in the United States, other countries, or both.

Linux is a trademark of Linus Torvalds in the United States, other countries, or both.

Microsoft is a trademark of Microsoft Corporation in the United States, other countries, or both.

Other company, product, or service names may be trademarks or service marks of others.


↑返回目录
前一篇: Creating Database Web Applications with Eclipse
后一篇: The Eclipse Tabbed Properties View