Inserting an Internationalized String Into Source Code
See Also
The Insert Internationalized String command enables you to add internationalization
strings one at a time as you create the source.
To insert an internationalized string into your source code:
- In the Source Editor, put the insertion point at the location in the source
file where you want to insert an internationalized string.
- Right-click the desired location and choose Tools > Internationalization
> Insert Internationalized
String from the pop-up menu, or use the keyboard shortcut (Ctrl-Shift-J).
The Insert Internationalized String dialog box appears enabling you to edit
each string in the file consecutively. To choose a different .properties file
or create a new file, click the ellipsis (...) button.
- Click Format if you want to change the method used to generate the localized
string.
- Click Arguments if you want to add arguments to the method call. You can
only add arguments to the method call if you use the java.text.MessageFormat
or org.openide.util.NbBundle.getMessage formats.
- Type in values for the Key and Value properties and click OK.
The internationalized
string is added to the source code at the cursor location.
- See Also
- Internationalizing a String With the GUI Builder
- Adding Arguments for Message Formats
- Internationalizing a Single File
Legal Notices