Editing Resource Bundle
On this page:
- 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
To invoke properties editor for a resource bundle, do one of the following:
Editing property keys and values
To edit property keys, follow these general steps
- 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.
To edit a property value
- 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. - 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 valueWas ich nicht wei\u00df, macht mich nicht hei\u00df
then the resource bundle editor will show
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 Settings/Preferences dialog.
- 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 thebin/idea.properties
file to true.Refer to the section Tuning IntelliJ IDEA for details.