mess_en_US.properties:
hello=welcome you
mess_zh_CN.properties:
hello=\u4f60\u597d
I18NDemo.java:
import java.util.Locale;
import java.util.ResourceBundle;
public class I18NDemo {
public static void main(String[] args) {
Locale locale=Locale.getDefault();
ResourceBundle bundle=ResourceBundle.getBundle("mess",locale);
System.out.println(bundle.getString("hello"));
}
}