Just make like this, you need to have a properties file in each language and reload it on ResourceBundle.
package test;
Test.java
bundle_de.properties
bundle_en.properties
The main code.
package test;
import java.util.Locale;
import java.util.ResourceBundle;
public class Test {
public static void main(String[] args) {
ResourceBundle rb = ResourceBundle.getBundle("test.bundle", Locale.ENGLISH);
System.out.println(rb.getString("wololo"));
rb = ResourceBundle.getBundle("test.bundle", Locale.GERMAN);
System.out.println(rb.getString("wololo"));
}
}
Console output:
Wololo in english
Wololo in german