I18n String Format Property Editor
See Also
The I18n String Format property editor sets the default code format that the
IDE uses to make internationalized strings. The IDE uses this format whenever
it automatically generates internationalized strings with the Internationalize
command and the Internationalization wizard.
You can use the Replace Code Format combo box to enter the code format for
resource bundle initialization. You can enter your own format or choose from
one of the IDE presets.
- Use the identifier format when you want to cache the bundle in
a specific class. You can also use this format when you want to create a variable
that points to the resource bundle. You can then use the variable as a method
argument rather than the full resource bundle's name.
- Use the Utilities format when you want to have a single resource
bundle for a group of classes, such as all of the classes in a package. Use
this format if you want to use your own custom classes as resource bundles.
- Use java.util.ResourceBundle.getBundle if you want to use the standard
Java utility class.
- Use java.text.MessageFormat if you want to use strings that are
constructed dynamically at runtime. You can add arguments to specify the dynamically
added elements of the string.
- Use org.openide.util.NbBundle.getMessage or org.openide.util.NbBundle.getBundle
if you want to use the NetBeansTM APIs to build
modules for use by the IDE.
The Arguments field displays the various variables that you can use as arguments
in your generated internationalized strings.
To open the I18n String Format property editor:
- Open the Options window by choosing Tools > Options from the main window and click the Advanced Options button.
- In the left pane of the Options window, expand the Editing node and select Internationalization.
- Click the ellipsis (...) button for the I18n String Format property.
- See Also
- I18n Search Format Property Editor
- I18n Test Wizard Format Property Editor
- Bundle Init Format Property Editor
Legal Notices