Code Formats for Internationalized Strings
When inserting internationalized strings, the IDE uses the default code format
specified in the Internationalization settings. You can use the Replace Code
Format editor to choose from the following code formats:
- 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,
which 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 NetBeans APIs to build modules for use by the IDE.
If none of these formats suit your purpose, you can enter your own code format.
Make sure that the your format uses a correct argument structure.
Legal Notices