Android 安卓牛轧糖本地化问题与en_GB

Android 安卓牛轧糖本地化问题与en_GB,android,localization,android-7.0-nougat,android-7.1-nougat,Android,Localization,Android 7.0 Nougat,Android 7.1 Nougat,尝试使用以下命令更改牛轧糖中的应用程序语言,但失败 config.setLocales(new LocaleList(locale)); getBaseContext().createConfigurationContext(config); 但它使用的是下面不推荐使用的代码 getBaseContext().getResources().updateConfiguration(config, getBaseContext().getResources().getDisplayMetrics(

尝试使用以下命令更改牛轧糖中的应用程序语言,但失败

config.setLocales(new LocaleList(locale));
getBaseContext().createConfigurationContext(config);
但它使用的是下面不推荐使用的代码

getBaseContext().getResources().updateConfiguration(config, getBaseContext().getResources().getDisplayMetrics());
为什么会这样?我做错什么了吗

我的应用程序支持英国英语和美国英语。 系统语言包括英语印度语、英语英国语和其他一些语言。 应用程序本身以英语US加载,但如果系统语言为英语India,并且配置正确传递为en_GB,则我的默认语言应为英语UK。
为什么是这样而不选择en_GB?

我不知道我现在收到的回复到哪里去了。它不显示

在这个博客中很好地定义了用牛轧糖进行文本翻译的解决方案