On this page:
Resource bundle is a set of properties files that have same base name with different language-specific suffixes. A resource bundle contains at least two properties files with similar base name, for example
IntelliJ IDEA recognizes resource bundles, and marks them with the icon .
IntelliJ IDEA supports the following features for the resource bundles:
Creating resource bundles
To create a new resource bundle, follow these steps
- In the Project tool window, choose the directory where the new resource bundle should be created.
- Do one of the following:
- Press Alt+Insert.
- On the context menu of the selection, choose
- On the main menu, choose
- In the dialog box that opens, do the following:
- Specify the base name of the resource bundle.
- If necessary, select the check box Use XML-based properties files.
- Add the required locales. To do that, click and type the comma-separated suffixes of the required locales.
- Click OK when ready.
The new node Resource Bundle '<base name>' appears in the Project Tool Window:
Combining or dissociating properties
By default, when a new resource bundle is created, it shows joined. You can dissociate it and show the properties files only.
To dissociate a resource bundle
- Right-click the resource bundle you want to dissociate.
- On the context menu, choose Dissociate Resource Bundle <base name>.
To combine several properties files into a resource bundle
- Select the properties files to be combined.
- Right-click the selection.
- On the context menu, choose Combine to Resource Bundle.
- Specify the base name of a resource bundle.