问题
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