A RetroSearch Logo

Home - News ( United States | United Kingdom | Italy | Germany ) - Football scores

Search Query:

Showing content from https://developers.google.com/maps/documentation/javascript/localization below:

Localize the Map | Maps JavaScript API

Localize the Map

Stay organized with collections Save and categorize content based on your preferences.

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

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 this 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

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

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 allows you to load the map with your choice of language and region.

View this demo in fullscreen.

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

Last updated 2025-07-02 UTC.

[[["Easy to understand","easyToUnderstand","thumb-up"],["Solved my problem","solvedMyProblem","thumb-up"],["Other","otherUp","thumb-up"]],[["Missing the information I need","missingTheInformationINeed","thumb-down"],["Too complicated / too many steps","tooComplicatedTooManySteps","thumb-down"],["Out of date","outOfDate","thumb-down"],["Samples / code issue","samplesCodeIssue","thumb-down"],["Other","otherDown","thumb-down"]],["Last updated 2025-07-02 UTC."],[[["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."]]],["To customize a map, specify a `language` and `region` parameter in the `\u003cscript\u003e` tag when loading the Maps JavaScript API. The `language` parameter sets the display language for controls, directions, and service responses, overriding the browser's default. The `region` parameter alters map tiles and biases service results, like geocoding. Setting both is crucial for legal compliance and service accuracy. For example, you can set the language to Japanese and the region to Japan by setting `language=ja` and `region=JP`.\n"]]


RetroSearch is an open source project built by @garambo | Open a GitHub Issue

Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo

HTML: 3.2 | Encoding: UTF-8 | Version: 0.7.4