Internationalizing a Set of Files With the Internationalization Wizard

The Internationalization wizard enables you to replace hard-coded strings with internationalized strings in multiple files. If you are localizing the source into more than one language, the Internationalization wizard also lets you specify the localized string for multiple locales.

To automatically internationalize strings in multiple source files:

  1. Choose Tools and choose Internationalization and choose Internationalization Wizard from the main window.
  2. Click Add Source(s) to add one or more source files to internationalize. Click Next to proceed.
  3. Click Select All if you want one resource bundle to contain the key and value pairs for all the listed sources. Click Select Resource to select a specific resource bundle per source file. The resource bundle must already exist and contain all the desired locales. Click Next to proceed.
  4. Modify key and value pairs (optional). You can create a variable that points to the resource bundle. The variable is then used in the method calls, which retrieve the localized strings.

    You must use the {identifier}.getString("{key}") format to access the resource bundle through a variable. To use this feature, the Advanced Wizard property in the Internationalization settings must be set to True. This feature is available only for internationalizing Java sources and not for other types of files, such as JavaServer PagesTM.

    To use the modify key and value pairs feature:

    1. From the Source combo box, select the source file in which you want to create the variable.
    2. Select the Generate Field checkbox and set the variable's modifiers.
    3. Type the name of the identifier in the Identifier text field.
    4. The Init String field gives you a preview of the code that the variable will use to reference the resource bundle. To change this code, click Format and select the desired code format from the Init Code Format Editor.
    5. Click Next to generate the field.
  5. In the Modify Found Strings pane, set the key name and localized values for the internationalized strings in each of your source files. Use the Source combo box to switch between source files. Deselect the checkbox in the first column for any string you do not want to internationalize. Change the key name and value for any string by entering a new value in the appropriate column.
  6. To change the code format used to generate the internationalized string or add arguments to the method call, click the ellipsis button (...) at the end of the string's row.
  7. Click Finish to internationalize the strings for all of the selected source files.
See also
Internationalizing a Single File
Inserting an Internationalized String Into Source Code
Configuring Internationalization Settings
Code Formats for Internationalized Strings
Adding Arguments for Message Formats

Legal Notices