cornercorner
FeaturesPluginsDocs & SupportCommunityPartners

How to translate JDK Swing UI into your Language

The default Swing UIs, for example, "Cancel" button of Swing filechooser and Swing colorchooser are coming from JDK, not from NetBeans. JDK includes these UI messages inside JDK by default for several languages .e.g. Japanese, Chinese, and etc. But it may not include your languages. Here is the guide how to localize them into your language.


Step



Get English Sources l10nkit is available in File area of translatedfiles.netbeans.org, please pick up.


Translate Them Please refer these documents. It depends on what you use for translations.

The UI messages are including Java files.

 translatedfiles/src/swing/src/com/sun/java/swing/plaf/gtk/resources/gtk_<lang>.java
 translatedfiles/src/swing/src/com/sun/java/swing/plaf/motif/resources/motif_<lang>.java
 translatedfiles/src/swing/src/com/sun/java/swing/plaf/windows/resources/windows_<lang>.java
 translatedfiles/src/swing/src/com/sun/swing/internal/plaf/basic/resources/basic_<lang>.properties
 translatedfiles/src/swing/src/com/sun/swing/internal/plaf/metal/resources/metal_<lang>.properties
 translatedfiles/src/swing/src/com/sun/swing/internal/plaf/synth/resources/synth_<lang>.properties

Important:
Please be careful when you translate .java file. 3 files are .java files, so when you localize the files, you need to change class name too. For example, when you translate motif.java to Italian, you need to change the class name "motif" to "motif_it".
public final class motif_it extends ListResourceBundle {
Also encoding should be unicode ascii, which means you need to run native2ascii for all java files.
Verify Translated files If you can build NetBeans IDE, try to check the following documents and verify your translated files are OK on NetBeans.

Commit your files to cvs
Copy you translated files into src/ directory and commit them. Please use appropriate branch for check-in. For NetBeans 5.5, we should use "release55" branch.

  • notification can be sent to cvs@translatedfiles.netbeans.org, check mail archive
  • You can verify your committed files on web 
Try daily build Daily builds can be downloaded from

Select "5.5" and "Daily", then click "Continue". Currently only Japanese, Chinese and Brazilian Portuguese are available.

Please send you questions to dev@translatedfiles.netbeans.org.


Companion
Projects:
MySQL Database Server   GlassFish Community: an Open Source Application Server   Open Solaris  Open JDK: an Open SourceJDK   Mobile & Embedded Community     Sponsored by 
Sponsored by Sun Microsystems