NPS AUV Workbench Internationalization (I18N)

Menus, messages and other text used in the AUV Workbench application may displayed in languages other than English. To convert the application to another language, a set of properties files must be translated. When this has been done, the alternate text is automatically rendered whenever the application is run on a machine whose operating system is configured to use that language. The AUV Workbench employs the official Java language internationalization scheme, which is described at http://java.sun.com/j2se/corejava/intl/index.jsp.

Translating Properties Files

In a standard AUV Workbench installation, multi-language properties files reside in a single directory location, resources/I18N/, relative to the Workbench base directory. In that directory, properties files exist in "bundles", grouped by the first part of the file name. Files whose names (preceeding ".properties") contain no suffix of the form "_xx" are the "default", US-English language files, which were used when the application was first developed. To install a translation into the application, simply put files with the same names as the "default" files in the standard directory, with the appropriate language suffix applied.

For instance, a partial listing of resources/I18N/ for an installation with translations in Spanish, French, Korean and Japanese, showing three resource bundles, would look like the following:

  AuvwMenus.properties             default US English
  AuvwMenus_es.properties          Spanish
  AuvwMenus_fr.properties          French
  AuvwMenus_ko.properties          Korean
  AuvwMenus_jp.properties          Japanese

  AuvwErrors.properties            default US English
  AuvwErrors_es.properties         Spanish
  AuvwErrors_fr.properties         French
  AuvwErrors_ko.properties         Korean
  AuvwErrors_jp.properties         Japanese

  AuvwMessages.properties          default US English
  AuvwMessages_es.properties       Spanish
  AuvwMessages_fr.properties       French
  AuvwMessages_ko.properties       Korean
  AuvwMessages_jp.properties       Japanese
            

The suffixes used to identify languages are specified by the ISO 639-1 specification, which is described at http://www.loc.gov/standards/iso639-2/englangn.html.

Using the Proper Character Encoding

Although the Java language is based on the Unicode character set and stores character data internally in UTF-16 encoding, the Java modules which read properties files, such as those used in the internationalization resource bundles, assume their data exists in the "8-bit ASCII", or ISO 8859-1, encoding. This encoding is also called "Latin Alphabet-1", and includes the characters which are used in English, German, French and other European languages. For other languages, characters that cannot be directly represented in this encoding can be written using Unicode escapes.

Here are small portions of two properties files. They show that 1) comment lines are marked by a # character in the first column, 2) the first column contains the key, and is the same for all properties files in the same resource bundle, and 3) after the = character, the translated text must use Unicode escapes to represent characters not existing in the ISO 8859-1 encoding. The first fragment is from AUVWmenus.properties, the default English language file containing text for the menus in the AUV Workbench.

  # AuvwMenus.properties
  # AuvwMenus_en_US.properties

  # Mission selection menu
  mission.menu                       = Mission Selection
  mission.menu.tooltip               = Mission open, import/export, save and close
  mission.menu.new                   = New Mission
  mission.menu.new.uav               = UAV Mission
  .
  .
  .
            
The following is the corresponding fragment in AUVWmenus_es.properties, the Spanish-language menu text file:
  # AuvwMenus_es.properties

  # Mission selection menu
  mission.menu                       = Selecci\u00f3n De la Misi\u00f3n
  mission.menu.tooltip               = La Misi\u00f3n abierta, import/export, excepto y se cierran
  mission.menu.new                   = Nueva Misi\u00f3n
  mission.menu.new.uav               = UAV Misi\u00f3n
  .
  .
  .
            

Note the escaped Unicode character, representing "lowercase o-acute". When these four menu items are displayed in the application on a Spanish language system, you see:

  Selecció De la Misión
  La Misión abierta, import/export, excepto y se cierran
  Nueva Misión
  UAV Misión

Setting the Operating System Language

The operating system language is specified on a Windows XP system through the Regional and Language Options control panel, as illustrated in the next figure. The language displayed next to the "Customize" button will be the one used within the AUV Workbench to display internationalized text.

Regional and Language Options Control Panel

On a Macintosh, use the International system preference pane, shown below. The first language in the list will be the one used by the AUV Workbench.

International Preference Pane

Overriding the Operating System Language

The AUV Workbench may be configured to override the operating system language setting. This is done through the choices listed in the Help->Internationalization Support menu. A restart of the application is required for a language change to take effect.

Back to the Help page index, the AUV Workbench: Introduction page, or online to AUV Workbench home page.