In this section:
- Resource bundle editor basics
- Invoking properties editor for a resource bundle
- Editing property keys and values
- Tips and tricks
Resource bundle editor basics
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.
Invoking properties editor for a resource bundle
- 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 or or .
- Open for editing a .properties file that is a part of a bundle, and at the lower edge of the editor, click Resource Bundle tab:
Editing property keys and values
- Open for editing the desired *.properties file.
- Add, change, or delete keys as required. The changes are reflected in the Resource Bundle editor.
For changing values, use the resource bundle editor that enables you to edit an entire set of property files at a time. IntelliJ IDEA takes care of creating respective records in each file of the bundle.
- Select 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 will change accordingly.
Tips and tricks
- The properties missing values, or omitted in one of the .properties files are red-highlighted.
12.1+All escaped characters in the *.properties files in the format \uXXXX,
are displayed in the resource bundle editor as un-escaped unicode literals.
Vice versa, if a non-ASCII character is entered in the resource bundle editor, it is reflected in the underlying *.properties file as a corresponding escaped character in the format \uXXXX.
For example, if the *.properties file contains a property value
Was ich nicht wei\u00df, macht mich nicht hei\u00df
then the resource bundle editor will show13.0.2+
Was ich nicht weiß, macht mich nicht heiß
Resource bundle editor itself does not perform any conversion. To have escape sequences properly resolved in properties files, select the check box Transparent native-to-ascii conversion in the File Encoding page of the project settings/preferences.
- It is possible to encode non-ascii symbols using both upper- and lower-case hex symbols
(e.g. '\u00E3' vs '\u00e3'). Upper case is used by default.
To use lower case, set 'idea.native2ascii.lowercase' property in the bin/idea.properties file to true.
Refer to the section Tuning IntelliJ IDEA for details.