当前页面: 开发资料首页 → Eclipse 英文资料 → 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
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.
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.
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.
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.
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
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
Once you have Eclipse and the language packs installed, there are two different ways to launch Eclipse in a different language:
eclipse.exe
, and is
located in the eclipse
subdirectory of the install. If Eclipse is installed at D:\eclipse-SDK-3.1.1-win32
,
the executable is D:\eclipse-SDK-3.1.1-win32\eclipse\eclipse.exe
.-nl
command line argument when you launch Eclipse.On Windows, there are two ways to specify command line arguments for Eclipse:
eclipse
subdirectory of where Eclipse is installed (for example, D:\eclipse-SDK-3.1.1-win32\eclipse)
eclipse.exe nl ja
D:\eclipse-SDK-3.1.1-win32\eclipse\eclipse.exe
)Properties
from the popup menu for the shortcutnl ja
command line argument to the end of the Target
fieldOK
to save the changesNote: Mac OS X 10.3 Panther is not a supported operating system for the language packs for Eclipse 3.1. See the Launching Eclipse on Traditional Chinese Mac OS X 10.3 Panther section later in this article for more information.
On Mac OS X, if you need to pass arguments to Eclipse, you'll have to edit the Info.plist
file
inside the Eclipse application bundle:
Show Package Contents
in the popup menuInfo.plist
file in the Contents
subfolder and open it with your
favorite text editor-nl ja
at
the end of the Eclipse
keyThe 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.
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
).
Applications>System Settings>Language
Russian Pyccкий
from the language selection list boxOK
to save the changeseclipse
subdirectory of where Eclipse is installed (for example, ~/eclipse-SDK-3.1.1-linux-gtk/eclipse
)
./eclipse vmargs Xj9
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.
Start>Settings>Control Panel>Regional and Language Options
Advanced
tabArabic (Egypt)
from the Language for non-Unicode programs
dropdown
listOK
to save the changeseclipse
subdirectory of where Eclipse is installed (for example, D:\eclipse-SDK-3.1.1-win32\eclipse
)
eclipse.exe dir rtl
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.
System Preferences
dialogInternational
Traditional Chinese
in the Languages list to the topInternational
dialogTranslations 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.
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!
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.