Introducing Places UI Kit: A ready-to-use, low-cost component library that lets you bring the familiar Google Maps UI for Places to any map of your choice. Try it out, andshare your input to help shape the future of GMP!

Localize the 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 alanguage parameter to the<script> tag when loading the Maps JavaScript API code.

Thelanguage 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 this demo to experiment with the changes on the map when you update thelanguage 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 theregion 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 addingdir='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

See thelist of supported languages. Note that new languages are added often, so this list may not be exhaustive.

Region localization

Add aregion 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 aregion parameter as various services (such as Places Autocomplete) tend to provide better results when theregion 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.

Theregion 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." SeeGoogle Maps Platform Coverage Details for supported regions. Try this demo to experiment with the changes on the map when you update theregion 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 aregion set toUS (US) to "Toledo, Ohio" and one which biases results based on aregion set toES (Spain) to "Toledo, Spain."

View theUS example and theES example.

Localization Demo

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

View this demo infullscreen.

Except as otherwise noted, the content of this page is licensed under theCreative Commons Attribution 4.0 License, and code samples are licensed under theApache 2.0 License. For details, see theGoogle Developers Site Policies. Java is a registered trademark of Oracle and/or its affiliates.

Last updated 2025-07-18 UTC.