Internationalizing Strings with the Internationalization Wizard

The Internationalize wizard enables you to replace any hard-coded string in your resource bundles with an internationalized string. The wizard gives you the option of generating fields and methods for your resource bundles.

To automatically internationalize source code with the wizard:

  1. Choose Tools Internationalization Internationalize wizard.
  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-value pairs for all the listed sources. Click Select Resource to choose a specific resource bundle per source file. Click Next to proceed.
  4. (Optional)Modify key-value pairs. To use this feature, the Advanced Wizard property of the Internationalization option must be set to True. This feature is only available for internationalizing Java sources (for instance, the advanced feature is not available for JavaServer pages).
    1. Choose the source you want to modify from the Source combo box. Click Next to proceed.
    2. Check the Generate Field checkbox.

      A field will be created in the source file based on the specifications that you will provide next.

    3. Check the modifiers you want applied to the field.
    4. Type the name of the identifier in the Identifer text field.
    5. Click Format and select the code format you want to use from the Init Code Format Editor.

      A field is created that points to the resource bundle. Hard-coded strings in the source file will be replaced by code that extracts the correct internationalized string from the field.

  5. If you want to change a key or value or string format, select a key or value and enter a new name or value. Click the button at the end of a row to change the string format.
  6. Click Finish to internationalize the strings displayed in the final panel.

    If you want to change the string format or a key/value pair, click the ellipsis button (...) at the end of the desired row.

  7. If you want to change a key or value or string format, select a key or value and enter a new name or value. Click the button at the end of a row to change the string format.
  8. Click Finish to internationalize the strings displayed in the final panel.

    If you want to change the string format or a key/value pair, click the ellipsis button (...) at the end of the desired row.

See also
Customizing Internationalization

Replacing the Code Format

Adding Arguments for Message Formats

Legal Notices