Android国际化
参考1:https://blog.csdn.net/Jason_996/article/details/78227452
参考2:https://blog.csdn.net/lanyeming2012/article/details/37776107
核心方法:
Resources resources = getResources();
Configuration config = resources.getConfiguration();
DisplayMetrics dm = resources.getDisplayMetrics();
if (language.equals("en")) {
config.locale = Locale.ENGLISH;
} else if (language.equals("zh")) {
config.locale = Locale.SIMPLIFIED_CHINESE;
} else {
config.locale = Locale.getDefault();
}
resources.updateConfiguration(config, dm);
}