Creating a Locale-specific Properties File
The localized version must be present in the same directory, which contains the original base properties file.
Procedure
- Select the <form>.properties file from the Presentation Resources special folder in the Project Explorer. Make a copy of this file for each locale.
- Rename the copy, using the naming conventions for languages and regions. See Language-specific and Country-specific Properties Files for more details.
- 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.
- Open a locale-specific version of the properties file in the Properties File editor and manually translate the strings into the desired language.
- 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.
- 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:
-
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.
- Save the locale-specific version and deploy the form into the runtime environment.
Copyright © Cloud Software Group, Inc. All rights reserved.