mirror of
https://github.com/RfidResearchGroup/RFIDtools.git
synced 2026-05-12 11:19:59 -07:00
Communication rebuild(worked).
This commit is contained in:
@@ -37,18 +37,15 @@ public class LanguageUtil {
|
||||
if (Build.VERSION.SDK_INT > Build.VERSION_CODES.N_MR1) {
|
||||
switch (language) {
|
||||
case "zh":
|
||||
Log.d("setAppLanguage()", "配置为中文!");
|
||||
configuration.setLocale(Locale.SIMPLIFIED_CHINESE);
|
||||
break;
|
||||
case "en":
|
||||
default:
|
||||
Log.d("setAppLanguage()", "配置为英语或跟随系统!");
|
||||
configuration.setLocale(Locale.ENGLISH);
|
||||
break;
|
||||
}
|
||||
return AppUtil.getInstance().getApp().createConfigurationContext(configuration);
|
||||
} else {
|
||||
Log.d("updateConfiguration()", "配置为: " + language);
|
||||
context.getResources().updateConfiguration(configuration, context.getResources().getDisplayMetrics());
|
||||
return context;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user