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:
- Choose Tools
Internationalization
Internationalization Wizard from
the main window.
- Click Add Source(s) to add one or more source files to internationalize.
Click Next to proceed.
- 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.
- 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:
- From the Source combo box, select the source file in which you want
to create the variable.
- Select the Generate Field checkbox and set the variable's modifiers.
- Type the name of the identifier in the Identifier text field.
- 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.
- Click Next to generate the field.
- 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.
- 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.
- Click Finish to internationalize the strings for all of the selected source
files.
Legal Notices