Generating Internationalization Strings Automatically

The Internationalize dialog box enables you to replace any hard-coded string in your resource bundle with an internationalized string. The Internationalize dialog box locates each occurrence of hard-coded strings in the source file; you can internationalize each string found or skip a string as you choose. If you have several Java sources to internationalize into one or more resource bundles, you can save time by using the Internationalization wizard to internationalize the files into several resource bundles at once.

To automatically internationalize source code:

  1. In the Explorer, right-click the class file you want to internationalize and choose Tools Internationalization Internationalize from the contextual menu.

    The Internationalize dialog box appears showing the first quoted text string found in the Value text field.

  2. If the resource bundle file shown in the Bundle Name text field is not the file you want to save the internationalized strings in, click Browse... and select the properties file you do want.

    Alternatively, you can click New... to create a new properties file in which to save the internationalized strings.

  3. Click Replace Format if you want to change how the localized string appears.
  4. Click Replace to generate the internationalization strings.

    The next string to be internationalized is then displayed in the Value text field. Continue until all strings are replaced.

    Click Skip to skip over a string you do not want to internationalize. The cursor moves to the next string and the string is highlighted. When the last string has been replaced, the dialog box automatically closes.

To get information about the highlighted string in the Source Editor, click Info to see the name of the component containing the string, and the property the string is associated with.

See also
Internationalizing Strings with the Internationalization Wizard

Replacing the Code Format

Adding Arguments for Message Formats

Inserting Internationalized Strings Into Source Code

Setting Internationalization Strings With the Form Editor

Setting Properties Files

Adding Arguments for Message Formats

Legal Notices