Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to indicate the language in the Google Maps API?

Just like you visit maps.google.com.tw or maps.google.co.kr or maps.google.co.jp, you can see their own language shown on every country. Is there any property that I can use in Google Maps API to dynamically set google maps using specific language to display?

like image 770
Matt Avatar asked Apr 18 '10 16:04

Matt


People also ask

Which language is used in Google Map?

Like many other Google web applications, Google Maps uses JavaScript extensively. The site also uses JSON for data transfer rather than XML, for performance reasons.

Can you customize Google Maps API?

The Google Maps APIs now support you in creating beautiful styled maps for your Android and iOS apps as well as your website using the same JSON style object.

Why is my Maps in a different language?

Google Maps app for Android: Tap your profile picture in the top right, tap Settings > Navigation settings > Voice selection > a language. To also adjust the text language go to Settings > App language.


2 Answers

In Google Maps API v3, add "language" attribute to script tag. For example, the following will set map to display Russian in location names and navigation buttons:

<script    src="http://maps.google.com/maps/api/js?sensor=false&amp;language=ru-RU"         type="text/javascript"></script>  

Result:

alt text

like image 152
Maksym Kozlenko Avatar answered Sep 20 '22 21:09

Maksym Kozlenko


In Google Maps v3, you can use the "language" parameter:

<script type="text/javascript" src="http://maps.google.com/maps/api/js?sensor=false&amp;language=en"></script> 

Language codes list: https://developers.google.com/maps/faq#languagesupport

More info: http://googlegeodevelopers.blogspot.com/2009/10/maps-api-v3-now-speaks-your-language.html

like image 32
Jelena Avatar answered Sep 17 '22 21:09

Jelena