如何在Google Maps Android v2上解决本地化问题?

4
我是使用Google Maps v2 Android SDK的,当我把应用切换到亚美尼亚语环境时,地图上不显示街道名称(只有一些用英文显示)。
用于更改环境的代码:
    private static Context setLocale(Context context, String language) {
    Locale locale = new Locale(language);
    Locale.setDefault(locale);

    Resources resources = context.getResources();
    Configuration config = new Configuration(resources.getConfiguration());
    if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.JELLY_BEAN_MR1) {
        config.setLocale(locale);
        context = context.createConfigurationContext(config);
    } else {
        config.locale = locale;
        resources.updateConfiguration(config, resources.getDisplayMetrics());
    }
    return context;
}

我知道有一个与另一种语言相关的问题: https://issuetracker.google.com/issues/36823099

English locale Armenian locale


只是一种猜测,但是是否有可能地图还没有完全处理好亚美尼亚的所有亚美尼亚语地图? - Tim Biegeleisen
即使亚美尼亚地图不可用(但我可以在网络部分和地图应用程序中看到亚美尼亚名称),为什么它不显示英文名称?如何更改地图区域设置? - android_dev
1个回答

0

目前,一些语言只能使用v3.1.0 Beta Maps SDK for Android客户端库进行服务。建议尝试使用此版本。

请按照迁移指南https://goo.gle/v3-migration-guide进行操作。

这是一个Beta版本,请在问题跟踪器的新组件[https://goo.gle/gmp-android-sdk-beta-issues]中提供反馈,以帮助尽快退出Beta版。


网页内容由stack overflow 提供, 点击上面的
可以查看英文原文,
原文链接