在您的onCreate方法中调用以下命令以选择语言环境字符串中提供的语言。
/**
* Set the default Locale for app
* @param context context on which the locale will be implemented
* @param locale new locale for example, <b>sv</b> for Swedish or <b>en</b> for English
*/
public static void setDefaultLocale(Context context, String locale) {
Locale locJa = new Locale(locale.trim());
Locale.setDefault(locJa);
Configuration config = new Configuration();
config.locale = locJa;
context.getResources().updateConfiguration(config, context.getResources().getDisplayMetrics());
locJa = null;
config = null;
}