Creating a Locale-specific Properties File

The localized version must be present in the same directory, which contains the original base properties file.

Procedure

  1. Select the <form>.properties file from the Presentation Resources special folder in the Project Explorer. Make a copy of this file for each locale.
  2. Rename the copy, using the naming conventions for languages and regions. See Language-specific and Country-specific Properties Files for more details.
  3. For every new properties file created in the Presentation Resources folder, the builder automatically creates a matching <file.properties.json file at the same location.
  4. Open a locale-specific version of the properties file in the Properties File editor and manually translate the strings into the desired language.
  5. Click Project > Clean to clean and rebuild the project. This updates the <form>.locales.json file with the details of the language in which the form has been localized. For example, if you create DemoForm_fr.properties file, then the Demoform.locales.json will contain ["fr"]. This file is updated when the you rebuild the project after creating a new locale-specific version of the properties file.
  6. Run the JDK command-line tool native2ascii, using the locale-specific properties file as input, to ensure that the file contains only ISO_8859-1-encoded characters:

    The native2ascii command-line tool is available in the directory %JDK_HOME%\bin.

  7. Move the completed locale-specific version or versions into the same directory where you found the original base properties file.
    Tip: You can find the directory that contains all the properties files by using the context menu of one of the form’s files in the Project Explorer (for instance, the base properties file) and clicking Properties to open the properties dialog. The path to the selected form resource is shown as Location.
  8. Save the locale-specific version and deploy the form into the runtime environment.