【问题标题】:Android Nougat localization issue with en_GBen_GB 的 Android Nougat 本地化问题
【发布时间】:2017-05-18 10:58:15
【问题描述】:

尝试使用以下方法更改 Nougat 中的应用语言,但失败了。

config.setLocales(new LocaleList(locale));
getBaseContext().createConfigurationContext(config);

但它使用以下不推荐使用的代码

getBaseContext().getResources().updateConfiguration(config, getBaseContext().getResources().getDisplayMetrics());

为什么会这样?我做错什么了吗?

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

【问题讨论】:

    标签: android localization android-7.0-nougat android-7.1-nougat


    【解决方案1】:

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

    在 Nougat 中进行文本翻译的解决方案在此博客 http://gunhansancar.com/change-language-programmatically-in-android/ 中有很好的定义

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 2021-12-18
      • 1970-01-01
      • 2016-01-19
      • 1970-01-01
      • 2013-09-22
      • 2010-12-16
      相关资源
      最近更新 更多