Adding translations to a library definition

You can add translated strings to your library definitions.

About this task

You can substitute translated string values from a *.properties file for certain values in a library definition. For example, you may want to have certain fields that are translated in the Properties view of a library definition, like Name or Label.

Procedure

  1. Externalize the strings in the library definition that you want to have translated. In this example, the text attribute for the label element is externalized as %label.
    Text field with externalized string
  2. Create a corresponding *.properties file and list the variables that you externalized. For example:
    # NLS_MESSAGEFORMAT_VAR
    # NLS_ENCODING=UTF-8 
    # ==============================================================================
    # Translation Instruction: section to be translated
    # ==============================================================================
    label = label description
  3. Place the English and the translated *.properties files into the same directory as the library definition file (*.jld or *.cld).
    Note: The translated *.properties files must be in ASCII format. You may need to convert them by running the native2ascii Java™ utility on the translated*.properties files. The native2ascii utility converts a file with native-encoded characters (characters, which are non-Latin 1 and non-Unicode) to one with Unicode-encoded characters. For example, the properties file listed in step 2 might look like this when translated into another language:
    # NLS_MESSAGEFORMAT_VAR
    # NLS_ENCODING=UTF-8 
    # ==============================================================================
    # Translation Instruction: section to be translated
    # ==============================================================================
    label = \uc11c\ud3ec\ud2c0\ubcf8\ub81b \uc608\uc81c \ubb38
  4. Rename the translated *.properties files with the appropriate locales if they are not already renamed. For example, filename_de.properties for a file that is translated into German, or filename_ja.properties for a file that is translated into Japanese.
  5. To view the results of the new *.properties files, close the library definition file and restart the product.
Icon that indicates the type of topic Task topic
Timestamp icon Last updated: July 17, 2017 21:58

File name: taddproplibdefn.html