Language code in Google Maps Java API V3

12,532

I have tried the same thing on my map and at first, I thought I was seeing the same results. However, the language change can sometimes be subtle, especially if you just look at a high level map of the world, because many of the country names are the same. Of course, it is very easy to see the difference for Japanese, because that language uses a different character set.

The easiest way I have found to quickly check the language change is to notice whatever map controls you have displayed on your map. I display the Satellite, Terrain, etc. options in the upper-right corner of my map. And with those, you can quickly see that the language has changed.

I have confirmed:

  • Arabic (ar) - this also has a different character set, but the country names don't change
  • Japanese (ja)
  • French (fr)
  • German (de)

It's working for me, it just takes digging down a little to notice the change. Google maintains a list of supported languages and for those languages that don't change the map labels, here is a quote from the Google Docs:

Map controls and directions in the Directions Panel have been translated for a subset of languages listed in Supported Languages Spreadsheet. Labels on maps are presented in the preferred language when translations are available.

More detail about this specific point, specifically about map labels, has been included at the bottom of this answer.

Here is an example of the map labels after setting language=de:

Google Map with language set to: German

Notice the differences in the labels for: Deutschland, Ceska rebublika, and Polska.

And here is an example of the labels with no language setting (defaults to English because of my browser settings):

enter image description here

Notice the differences in the labels for: Germany, Czech Republic, and Poland.

Here is a shot that displays China and Japan using `language=de':

enter image description here

Many map labels appear the same in either language, but there are also many differences. The reasons for the differences are explained in this definitive explanation, direct from Google Support:

By setting the language parameter, you are overriding the client browser's preferred language setting. With the API, this means that any interactions between the API and the client browser (dialog boxes etc.) will be rendered in the specified language - provided the language is supported.

For actual place names (map labels), we share the same data as maps.google.com. Here it makes less sense to translate place names in Australia to (say) German, and more sense to offer a translation in Japanese and Chinese characters, where Latin-based names would be otherwise illegible. Having said this, the Greek and Arabic languages (and possibly others) have yet to receive global translations - presumably due to the smaller audience.

So, to summarize:

  1. The translations for the Maps APIs refer mainly to API interactions with the client browser.
  2. Google has made more of an effort to provide global coverage for non-Latin based languages.
  3. Not all non-Latin based languages enjoy global support.
Share:
12,532

Related videos on Youtube

user1360841
Author by

user1360841

Updated on June 04, 2022

Comments

  • user1360841
    user1360841 over 1 year

    I want to display Googlemaps on our website in German. All the country, continent and ocean names should be displayed in German. I use this as the source for the script: "https://maps.googleapis.com/maps/api/js?sensor=false&language=de". When I set language to en or ja all names are displayed in English or Japanese, but de for German or fr for French don´t work.

    Any hints for solving this problem are strongly appreciated.

    Best regards.

  • user1360841
    user1360841 over 11 years
    So that means there isn´t any translation for all the labels in German, yes? And there is no chance to add translations, is there?
  • Sean Mickey
    Sean Mickey over 11 years
    No, there are differences, but they are sometimes not immediately obvious. Please see the additions to my answer.
  • Andrew Leach
    Andrew Leach over 11 years
    But, in German, France should be Frankreich, Italy should be Italien, and I think Polska should be Polen (my German is rusty). What's happening is that most coutries are showing in their own language.
  • Sean Mickey
    Sean Mickey over 11 years
    Yes indeed, you are right. I've added another image of the map using language=de, but centered over China and Japan. And as you can see, the alternate character sets are used for the labels of those countries.
  • Sean Mickey
    Sean Mickey over 11 years
    I am opening a support ticket with Google on this one. I'll share whatever I learn.
  • user1360841
    user1360841 over 11 years
    Andrew is totally right with his translations. Thanks a lot for your support guys.