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
.properties
file 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
.properties
file. - 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
.properties
file is updated accordingly.
Tips and tricks
- Properties without values or omitted in one of the
.properties
files are highlighted in red. - To convert between escape sequences (for example,
\u00df
) and unicode literals (corresponding national characters, such asß
) in the.properties
files 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
and\u00e3
). By default, only uppercase sequences are enabled. To use lowercase hex sequences, set theidea.native2ascii.lowercase
property in theidea.properties
file totrue
.For more information, see Tuning IntelliJ IDEA.
Last modified: 6 March 2018