How can I change Google Maps language to Hindi in my app?

本小妞迷上赌 提交于 2021-01-28 04:00:04

问题


I am using Google Maps in my Android app. I have implemented language localisation throughout my app. Therefore I want that whenever the user changes the app language Google Maps language also gets changed to Hindi. I tried the following method to change the language of Google Maps in my app.

String languageToLoad = "hi";

Locale locale = new Locale(languageToLoad);
Locale.setDefault(locale);
Configuration config = new Configuration();
config.locale = locale;
getResources().updateConfiguration(config, getResources().getDisplayMetrics());

I am doing this before Maps gets loaded, but the language does not change to Hindi. I have tried changing the language of maps to Chinese and Korean, it works well but I am not getting success with Hindi.

Can anyone please suggest me the right way?


回答1:


At the moment, Hindi language ("hi_IN") can only be served using the v3.1.0 Beta Maps SDK for Android client library.

Follow the migration guide https://goo.gle/v3-migration-guide

This is a beta release, give your feedback in the new component of the Issue Tracker [https://goo.gle/gmp-android-sdk-beta-issues] to help exit beta as quickly as possible.



来源:https://stackoverflow.com/questions/48862517/how-can-i-change-google-maps-language-to-hindi-in-my-app

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!