Setting an Internationalizated String With the Form Editor

See Also 

If you need to internationalize a GUI application, you can use the Form Editor to replace a GUI component's hard-coded text with internationalized strings.

Note The Form Editor may not be available in your version of the IDE. You can enable the Form Editor module by choosing Tools and choosing Update Center.

To insert an internationalized string with the Form Editor:

  1. Open the desired file in the Form Editor by double-clicking its node in the Filesystems window.
  2. Select the appropriate GUI component in the Inspector window.
  3. In the Properties window, select the property that you want to internationalize (for example, the text property of jLabel). Click the ellipsis (...) button to open the property editor.
  4. Select Resource Bundle from the Select Mode combo box.

    The property editor switches to resource bundle mode. If a resource bundle already exists for the source, the .properties file into which the internationalized strings will be saved is displayed in the Bundle Name field.

  5. To choose a different .properties file, click Browse. Alternatively, you can click New to create a new properties file in which to save the internationalized strings. The .properties suffix is added to the file name you specify.
  6. Click Format if you want to change the method used to generate the internationalized string.
  7. Click Arguments if you want to add arguments to the method call. You can add arguments to the method call only if you use the java.text.MessageFormat or org.openide.util.NbBundle.getMessage formats.
  8. Type in values for the Key and Value properties and click OK.
See Also
Code Formats for Internationalized Strings
Adding Arguments for Message Formats
Internationalizing a Single File
Inserting an Internationalized String Into Source Code

Legal Notices