Localize the Map

  • Customize your map by adjusting the default language and specifying a region code for tailored behavior.

  • Utilize the language parameter in the script tag to display map information in a specific language, overriding browser settings if needed.

  • Apply the region parameter in the script tag to refine map tiles, bias application results, and ensure compliance with local laws.

  • For optimal results and legal adherence, consider setting both language and region parameters when localizing your map.

You can customize your map for a specific country or region in the following ways:

  • Change the default language settings.
  • Specify a region code, which alters the map's behavior based on a given country or territory.

Language localization

By default, the Maps JavaScript API uses the user's preferred language setting as specified in the browser, when displaying textual information such as the names for controls, copyright notices, driving directions and labels on maps. In most cases, it's preferable to respect the browser setting. However, if you want the Maps JavaScript API to ignore the browser's language setting, you can force it to display information in a particular language by adding a language parameter to the <script> tag when loading the Maps JavaScript API code.

The language parameter affects the names of controls, copyright notices, driving directions, and control labels, as well as the responses to service requests. The effect on services is not as apparent. For example, when geocoding street level addresses the country name is returned in the language you requested, but the rest of the address will be specific to the location you are geocoding. On the other hand, postal and political results are returned in the requested language. Try the localization demo to experiment with the changes on the map when you update the language parameter.

The following example displays a map in Japanese and sets the region to Japan:

<script async
    src="https://maps.googleapis.com/maps/api/js?key=YOUR_API_KEY&loading=async&region=JP&language=ja&callback=initMap">
</script>

View example.

If you set the language of the map, it's important to consider setting the region too. This helps ensure that your application complies with local laws.

Note: When you load the API in the manner shown above, the map uses the Japanese language for all users regardless of user preferences. Be sure you want this behavior before setting this option.

The Maps JavaScript API also supports bi-directional (Bidi) text containing characters in both left-to-right (LTR) and right-to-left (RTL) languages natively. Examples of RTL languages include Arabic, Hebrew, and Farsi. Generally, you should specify RTL language pages to render properly by adding dir='rtl' to the page's <html> element. The following example renders a map of Cairo, Egypt using Arabic controls:

<script async
    src="https://maps.googleapis.com/maps/api/js?key=YOUR_API_KEY&loading=async&region=EG&language=ar&callback=initMap">
</script>

View example

Supported languages

Google often updates supported languages. This list may not be exhaustive and is subject to change.

Language Code Language Language Code Language
af Afrikaans ja Japanese
sq Albanian kn Kannada
am Amharic kk Kazakh
ar Arabic km Khmer
hy Armenian ko Korean
az Azerbaijani ky Kyrgyz
eu Basque lo Lao
be Belarusian lv Latvian
bn Bengali lt Lithuanian
bs Bosnian mk Macedonian
bg Bulgarian ms Malay
my Burmese ml Malayalam
ca Catalan mr Marathi
zh Chinese mn Mongolian
zh-CN Chinese (Simplified) ne Nepali
zh-HK Chinese (Hong Kong) no Norwegian
zh-TW Chinese (Traditional) pl Polish
hr Croatian pt Portuguese
cs Czech pt-BR Portuguese (Brazil)
da Danish pt-PT Portuguese (Portugal)
nl Dutch pa Punjabi
en English ro Romanian
en-AU English (Australian) ru Russian
en-GB English (Great Britain) sr Serbian (Cyrillic)
et Estonian sr-Latn Serbian (Latin script)
fa Farsi si Sinhalese
fi Finnish sk Slovak
fil Filipino sl Slovenian
fr French es Spanish
fr-CA French (Canada) es-419 Spanish (Latin America)
gl Galician sw Swahili
ka Georgian sv Swedish
de German ta Tamil
el Greek te Telugu
gu Gujarati th Thai
iw Hebrew tr Turkish
hi Hindi uk Ukrainian
hu Hungarian ur Urdu
is Icelandic uz Uzbek
id Indonesian vi Vietnamese
it Italian zu Zulu

Region localization

Add a region parameter to the <script> tag when loading the Maps JavaScript API code, if you want to alter your application to serve different map tiles or bias the application (such as biasing geocoding results towards the region).

As the developer of a Maps JavaScript API application you are encouraged to always set a region parameter as various services (such as Places Autocomplete) tend to provide better results when the region is set. It is also your responsibility to ensure that your application complies with local laws by ensuring that the correct region localization is applied for the country in which the application is hosted.

The region parameter accepts Unicode region subtag identifiers which (generally) have a one-to-one mapping to country code Top-Level Domains (ccTLDs). Most Unicode region identifiers are identical to ISO 3166-1 alpha-2 codes, with some notable exceptions. For example, Great Britain's ccTLD is "uk" (corresponding to the domain .co.uk) while its region identifier is "GB." See Google Maps Platform Coverage Details for supported regions. Try this demo to experiment with the changes on the map when you update the region parameter.

For example, the following script tag localizes the map to the United Kingdom:

<script async
    src="https://maps.googleapis.com/maps/api/js?key=YOUR_API_KEY&loading=async&region=GB&callback=initMap">
</script>

The following examples show two maps, one which geocodes "Toledo" based on a region set to US (US) to "Toledo, Ohio" and one which biases results based on a region set to ES (Spain) to "Toledo, Spain."

View the US example and the ES example.

Localization Demo

When setting the language of the map, it's important to consider setting the region too. Here is a demo that lets you load the map with your choice of language and region.

View this demo in fullscreen.