Internationalizing a Set of Files With the Internationalization Wizard
See Also
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 a single resource bundle to contain the key and
value pairs for all the listed sources. To select a resource bundle for specific
source files, select the desired sources and click Select Resource.
In the Select Resource dialog, select the
desired .properties file or create a new file.
Click Next to proceed.
- Modify additional values (Advanced Wizard only). 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.
- This feature is available for Java
sources only and not for other types of files, such as JavaServer Pages
TM. To use this feature, set the Advanced Wizard
property in the Internationalization settings to True.
To modify key and value pairs:
- 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 each of the strings you want to internationalize by entering a new value
in the appropriate column. 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.
- 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.
- See Also
- Internationalizing a Single File
- Inserting an Internationalized String Into Source Code
- Configuring Internationalization Settings
Legal Notices