4

How could change language of Google Map V2 to Hindi or other language while using within Android app.

There are some queries on this but unable to get proper answer.

I have tried to change language of my phone to Hindi then Google map app in device started showing text in Hindi but the map in my android app is still showing text in English completely.

Update: I am able to change language of Google Map V2 to Japan and Korea using language code "ja" and "ko" as below,

Locale.setDefault(new Locale("ja"));

But not still able to change it to Hindi by using ("hi" or "hi_IN" or "hi-IN" or "hi-rIN"). Is there any other language code for Hindi in Android?

Ajay
  • 1,255
  • 1
  • 17
  • 30

2 Answers2

5

It looks like Google Maps for Android was not available in Hindi until this summer (read here), so if you are using an outdated version of google maps you should update it first.

Once updated, you may change locale just like any other language.

Joanvo
  • 5,677
  • 2
  • 25
  • 35
  • I have updated now Google Play Services to version 21 (along with other packages) using SDK Manager. Deleted my android application from my test mobile device then reinstall app into it. Even then unable to get hindi in the map. Unable to find what is latest version of google map is available. My Google Play services client version: 4452000 and Google Play services package version: 6188036....Is there another way to update Google Map V2 ? – Ajay Nov 07 '14 at 21:25
  • I'm not very much into this, but the article says "Google Maps in Hindi is available to desktop users and on Android devices that run Android version 4.3". So I guess if you have Android 4.3 or later then you just have to update google maps application. I hope this helps. – Joanvo Nov 08 '14 at 19:46
  • I had read the article. I am using 4.4.2 and as you pointed, was hopeful to get solution by the upgrade but not successful :-( – Ajay Nov 09 '14 at 05:53
  • Hi, i'm not able to show google map in hindi language. i've updated play service and google map as well. any idea how can i get it done. – Vaishali Sharma Nov 13 '15 at 08:26
2

You are welcome to try Locale.setDefault(new Locale("hi", "IN")); per this answer.

However, please bear in mind that Google Maps data comes from another process, not yours, and you have no means of changing the Locale of another process. Your technique may not work for all languages and may not work in future versions of Google Play Services.

Community
  • 1
  • 1
CommonsWare
  • 986,068
  • 189
  • 2,389
  • 2,491
  • Tried but this is not working in android application for Google map v2. – Ajay Nov 07 '14 at 20:08
  • i.e. there is no direct control on map language? – IliaEremin Jun 26 '15 at 10:40
  • hmm thats why google Maps doesn't change language without restarting app. Im changing Locale in my own App and all the contents changes according to Locale with restarting only activity but Google Map's language not change until restart whole app because Google Play instance is under control of Google Play Service's process ,not in our app process . Correct? @CommonsWare – Zaid Mirza Feb 14 '18 at 08:09
  • @ZaidMirza: That is my guess. It would be possible for Play Services to look at the `Locale` of your process and send that over to Play Service's process as part of your map request, to use that instead of the device default `Locale`. Perhaps they are not doing that. – CommonsWare Feb 14 '18 at 11:38
  • @CommonsWare how I can inform Play Service about that Locale has changed in App so change the Map Language too. I think it would not be straight forward – Zaid Mirza Feb 14 '18 at 11:45
  • @ZaidMirza: Get a job at Google and work to modify Play Services to support this, I guess. :-) – CommonsWare Feb 14 '18 at 11:46