Editing Resource Bundle
Once you create several
.properties files with the same name, differing by locale suffix, IntelliJ IDEA automatically recognizes them and groups in the Project view into a Resource Bundle.
To open the properties editor for a resource bundle, do one of the following:
- In the Project tool window, right-click a resource bundle and choose Jump to Source.
- Select a resource bundle in the Project tool window, and press F4.
- Open for editing a
.propertiesfile that is a part of a bundle, and at the lower edge of the editor, click the Resource Bundle tab:
To edit property keys:
- Open for editing the desired
- Add, change, or delete keys as required. The changes are reflected in the Resource Bundle editor.
To change values, use the resource bundle editor that enables you to edit the entire set of property files simultaneously. IntelliJ IDEA takes care of creating respective records in each file of the bundle.
To edit property values:
- Select the property key in the left pane of the resource bundle editor.
- In the target locale frame, edit the value as required. The respective
.propertiesfile is updated accordingly.
Tips and tricks
- Properties without values or omitted in one of the
.propertiesfiles are highlighted in red.
- To convert between escape sequences (for example,
\u00df) and unicode literals (corresponding national characters, such as
ß) in the
.propertiesfiles and in the resource bundle editor, select the Transparent native-to-ascii conversion check box on the File Encoding page of the Settings/Preferences dialog.
- It is possible to encode non-ASCII symbols using both uppercase and lowercase hex sequences (for example,
\u00e3). By default, only uppercase sequences are enabled. To use lowercase hex sequences, set the
idea.native2ascii.lowercaseproperty in the
For more information, see Tuning IntelliJ IDEA.