Internationalization (i18n, Localization)

All text (including dialog text) in jDip is kept in separate files, organized by language. This allows editing and translation of text without recompiling any of the source code.

Some translation resources are available on the Links page.

How to Change the Language jDip Uses

From the command line: java -jar jdip.jar -lang xx where xx is the ISO 2-digit language specifier. For example, "en" for English, "fr" for French, "nl" for Dutch, etc. jDip will print out the language it is attempting to use on the command line. If a particular language is not found, it will default to English.

How to Get the Text

The easiest way to find, modify, and test the text required to translate is by:

  1. Locate the directory where jdip.jar is kept
  2. Copy jdip.jar to a backup file, such as jdip.jar.bak
  3. Rename jdip.jar to jdip.zip
  4. Unzip jdip.zip to the current directory.
  5. Now, jdip can be started by the following command: (test and see) java dip.gui.splash
    or with a language via java dip.gui.splash -lang fr
  6. The resource files to translate are under the resource directory, specifically il8n. There will be several ".properties" files, with the language codes seen before. There will also be a directory called dialog which contains dialog text.
  7. Open one of the properties files with a text editor. You will see text, which can be translated.

Property Files

Property files have the following structure:

Dialog Files

(TODO). Most are in HTML.

Tools Needed

(TODO). dicuss native2ascii, needed for accent-mark translation

Translating Parameterized Messages

(TODO). dicuss parameterized messages, choice messages, and MessageFormat.