1. Use a resource bundle
Keep your text in a base file such as Messages.properties and load it with ResourceBundle.getBundle("Messages", locale). IntelliJ IDEA’s resource bundle editor shows all languages together.
2. Create an Auto Localize project
- Click New Project and drop the project folder (or the resources folder).
- Set Written in to the language of the base file; files such as
Messages_de.propertiesare recognized as translations. - Choose the languages and click Create Project.
3. Localize
Click Localize. New files are named Messages_de.properties, Messages_pt_BR.properties …, in the base file’s order. MessageFormat placeholders like {0} are protected. Files that use \uXXXX escapes keep using them; UTF-8 files stay UTF-8. XML property files (<properties>) are supported too.