Oliver Wipfli

Home

About


Lopud, Sun 19 May 2024

Localization in Google Maps

In the context of online maps, localization refers to the process of showing labels of countries, cities, and so on in different languages. Furthermore, what gets shown on the map can change depending on geopolitical perspective.

The Google Maps documentation has a great example website for exploring how they handle localization and here we will look at some aspects of that.

All screenshots are taken from this website: LINK

Update 2024-05-20: Added a section about bilingual cities.

A map in German from Switzerland's geopolitical perspective.

Language and Region

The Google Maps API accepts two parameters for localization: language and region.

From the example website source we find that Google Maps supports the following 81 languages...

AFRIKAANS, ALBANIAN, AMHARIC, ARABIC, ARMENIAN, AZERBAIJANI, BASQUE, BELARUSIAN, BENGALI, BOSNIAN, BULGARIAN, BURMESE, CATALAN, CHINESE, CHINESE (SIMPLIFIED), CHINESE (HONG KONG), CHINESE (TRADITIONAL), CROATIAN, CZECH, DANISH, DUTCH, ENGLISH, ENGLISH (AUSTRALIAN), ENGLISH (GREAT BRITAIN), ESTONIAN, FARSI, FINNISH, FILIPINO, FRENCH, FRENCH (CANADA), GALICIAN, GEORGIAN, GERMAN, GREEK, GUJARATI, HEBREW, HINDI, HUNGARIAN, ICELANDIC, INDONESIAN, ITALIAN, JAPANESE, KANNADA, KAZAKH, KHMER, KOREAN, KYRGYZ, LAO, LATVIAN, LITHUANIAN, MACEDONIAN, MALAY, MALAYALAM, MARATHI, MONGOLIAN, NEPALI, NORWEGIAN, POLISH, PORTUGUESE, PORTUGUESE (BRAZIL), PORTUGUESE (PORTUGAL), PUNJABI, ROMANIAN, RUSSIAN, SERBIAN, SINHALESE, SLOVAK, SLOVENIAN, SPANISH, SPANISH (LATIN AMERICA), SWAHILI, SWEDISH, TAMIL, TELUGU, THAI, TURKISH, UKRAINIAN, URDU, UZBEK, VIETNAMESE, ZULU

...and 249 regions...

Afghanistan, Åland Islands, Albania, Algeria, American Samoa, Andorra, Angola, Anguilla, Antarctica, Antigua and Barbuda, Argentina, Armenia, Aruba, Australia, Austria, Azerbaijan, Bahamas, Bahrain, Bangladesh, Barbados, Belarus, Belgium, Belize, Benin, Bermuda, Bhutan, Bolivia, Plurinational State of, Bonaire, Sint Eustatius and Saba, Bosnia and Herzegovina, Botswana, Bouvet Island, Brazil, British Indian Ocean Territory, Brunei Darussalam, Bulgaria, Burkina Faso, Burundi, Cambodia, Cameroon, Canada, Cape Verde, Cayman Islands, Central African Republic, Chad, Chile, China, Christmas Island, Cocos (Keeling) Islands, Colombia, Comoros, Congo, Congo, the Democratic Republic of the, Cook Islands, Costa Rica, Côte d'Ivoire, Croatia, Cuba, Curaçao, Cyprus, Czech Republic, Denmark, Djibouti, Dominica, Dominican Republic, Ecuador, Egypt, El Salvador, Equatorial Guinea, Eritrea, Estonia, Ethiopia, Falkland Islands (Malvinas), Faroe Islands, Fiji, Finland, France, French Guiana, French Polynesia, French Southern Territories, Gabon, Gambia, Georgia, Germany, Ghana, Gibraltar, Greece, Greenland, Grenada, Guadeloupe, Guam, Guatemala, Guernsey, Guinea, Guinea-Bissau, Guyana, Haiti, Heard Island and McDonald Mcdonald Islands, Holy See (Vatican City State), Honduras, Hong Kong, Hungary, Iceland, India, Indonesia, Iran, Islamic Republic of, Iraq, Ireland, Isle of Man, Israel, Italy, Jamaica, Japan, Jersey, Jordan, Kazakhstan, Kenya, Kiribati, Korea, Democratic People's Republic of, Korea, Republic of, Kuwait, Kyrgyzstan, Lao People's Democratic Republic, Latvia, Lebanon, Lesotho, Liberia, Libya, Liechtenstein, Lithuania, Luxembourg, Macao, Macedonia, the Former Yugoslav Republic of, Madagascar, Malawi, Malaysia, Maldives, Mali, Malta, Marshall Islands, Martinique, Mauritania, Mauritius, Mayotte, Mexico, Micronesia, Federated States of, Moldova, Republic of, Monaco, Mongolia, Montenegro, Montserrat, Morocco, Mozambique, Myanmar, Namibia, Nauru, Nepal, Netherlands, New Caledonia, New Zealand, Nicaragua, Niger, Nigeria, Niue, Norfolk Island, Northern Mariana Islands, Norway, Oman, Pakistan, Palau, Palestine, State of, Panama, Papua New Guinea, Paraguay, Peru, Philippines, Pitcairn, Poland, Portugal, Puerto Rico, Qatar, Réunion, Romania, Russian Federation, Rwanda, Saint Barthélemy, Saint Helena, Ascension and Tristan da Cunha, Saint Kitts and Nevis, Saint Lucia, Saint Martin (French part), Saint Pierre and Miquelon, Saint Vincent and the Grenadines, Samoa, San Marino, Sao Tome and Principe, Saudi Arabia, Senegal, Serbia, Seychelles, Sierra Leone, Singapore, Sint Maarten (Dutch part), Slovakia, Slovenia, Solomon Islands, Somalia, South Africa, South Georgia and the South Sandwich Islands, South Sudan, Spain, Sri Lanka, Sudan, Suriname, Svalbard and Jan Mayen, Swaziland, Sweden, Switzerland, Syrian Arab Republic, Taiwan, Tajikistan, Tanzania, United Republic of, Thailand, Timor-Leste, Togo, Tokelau, Tonga, Trinidad and Tobago, Tunisia, Turkey, Turkmenistan, Turks and Caicos Islands, Tuvalu, Uganda, Ukraine, United Arab Emirates, United Kingdom, United States, United States Minor Outlying Islands, Uruguay, Uzbekistan, Vanuatu, Venezuela, Bolivarian Republic of, Vietnam, Virgin Islands, British, Virgin Islands, U.S., Wallis and Futuna, Western Sahara, Yemen, Zambia, Zimbabwe.

Most regions are countries, some of which are not recognised by all other countries.

The region localization is used to represent different geopolitical perspectives.

The language and region parameters are passed to the URL query when loading the Google Maps API. For example, to localize to English with the geopolitical perspective of the United States, one would use:

https://maps.googleapis.com/maps/api/js?language=en&region=US

Writing Systems

Different languages use different writing systems or scripts. For example, English is written in the Latin script while Russian uses Cyrillic.

Google Maps displays city labels in the language defined by the selected language. If the native name of the city is in a language that uses a different script, Google Maps shows a second line with the native name.

Consider for example Greece:

In this example map of Greece, the language is set to English. City labels are shown in the Latin and the Greek script. The country label however is only shown in the Latin script.

So when the language is set to English Athens is shown as...

Athens
Αθήνα

...while Berlin would be shown as...

Berlin

...without a second line.

Conversely, if we set the language to Greek and look at Switzerland we see this:

alt_text

Map of Switzerland with the language set to Greek.

Here, the country labels for Switzerland and Liechtenstein are only shown in Greek while the city labels are Greek in the first line and the native name is written in the Latin script in the second line.

Transliterations

Name translations may exist for larger cities. For example, Zürich is called Цюрих in Russian. However, when we look at smaller cities and languages that are far separated, it becomes unlikely that a name translation exists. This is when transliteration becomes important.

Transliteration is the process of writing a word in a different script such that it sounds similar. For example, one could transliterate the English city "Reading" to "Рединг" in Russian.

Google Maps seems to be very good with transliterations. When we set the language to Japanese we see this:

alt_text

A map of Europe when the language is set to Japanese. All names seem to be transliterated.

If you want to read more about transliteration in Google Maps you can read this document:

https://research.google/pubs/proper-name-transcriptiontransliteration-with-icu-transforms/

Bilingual Cities

Another interesting category of labels are bilingual cities. These are cities where two languages are spoken. Below you find a table of how Google Maps shows the names of the cities Bolzano Bozen in northern Italy, Donostia-San Sebastian in Spain, and Brussels in Belgium in the 24 official languages of the EU. The region parameter was always set to Switzerland CH.

Bolzano
Bozen
Donostia-San
Sebastian
Brussels
Bulgarian Болцано
Bolzano
Bozen
Доностия
Donostia
Брюксел
Bruxelles
Brussel
Croatian Bolzano Donostia-San
Sebastian
Bruxelles
Czech Bolzano San Sebastián Brusel
Danish Bolzano San Sebastián Bruxelles
Dutch Bozen San Sebastian Brussel
English Bolzano
Bozen
Donostia-San
Sebastian
Brussels
Estonian Bolzano Donostia Brüssel
Finnish Bolzano San Sebastián Bryssel
French Bolzano Saint-Sébastien Bruxelles
German Bozen Donostia-San
Sebastián
Brüssel
Greek Μπολτσάνο
Bolzano
Bozen
Σαν Σεμπαστιάν
Donostia
Βρυξέλλες
Bruxelles
Brussel
Hungarian Bolzano San Sebastián Brüsszel
Irish ? ? ?
Italian Bolzano San Sebastián Bruxelles
Latvian Bolcāno Donostija Brisele
Lithuanian Bolcanas Donostija Briuselis
Maltese ? ? ?
Polish Bolzano San Sebastian Bruksela
Portuguese Bolzano San Sebastián Bruxelas
Romanian Bolzano San Sebastián Bruxelles
Slovak Bolzano Donostia-San
Sebastián
Brusel
Slovenian Bolzano San Sebastian Bruselj
Spanish Bolzano San Sebastián Bruselas
Swedish Bolzano San Sebastián Bryssel

Irish and Maltese seem not to be supported by Google Maps.

A fun little observation is that for Greek, they transliterated San Sebastian while for Bulgarian, they transliterated Donostia.

Now that we have seen the effect of the language switch, let us have a closer look at how the region parameter changes the appearance of the map.

Disputed Territories

Google Maps shows regular country borders as solid lines. Disputed borders, i.e., borders where different countries have different perspectives of where the border is, are shown as dashed lines. The region parameter can change the appearance of border lines as well as country and state labels.

Cyprus

Cyprus is an island in the Mediterranean and after an armed conflict in the second half of the 20th century, the island was separated into a northern and a southern part, see Wikipedia.

Today, all countries except Turkey recognize the southern part as the sovereign country Cyprus. And Turkey is the only country that recognizes the northern part as the sovereign country Turkish Republic of Northern Cyprus TRNC.

As a result a map that is localized to the geopolitical perspective of Turkey should show a country label only for TRNC and vice versa only for Cyprus when the region is not set to Turkey.

alt_text alt_text

The top map uses region = US (United States) while the bottom map uses region = tr (Turkey). The different country labels Cyprus and TRNC reflect different geopolitical perspectives. Note that the disputed border is shown as a dashed line in both cases.

In the example of Cyprus, the region tag only changes the appearance of country labels but shows identical disputed borders in both cases.

The situation is different if we look at Kashmir and the India - China border...

Kashmir

India and China have different perspectives of where the country border lies in the Kashmir area, see Wikipedia. Google Maps accordingly shows different borders depending on the region parameter. Also, the state labels for Ladakh and Jammu and Kashmir are shown for region = in (India) while they are hidden for region = cn (China):

alt_text

alt_text

Maps of Kashmir for the perspectives of China (top) and India (bottom). Note how the Chinese version treats the India - Pakistan border as disputed while the Indian version does not.

The behavior of Google Maps in the Kashmir area seems logical: show borders according to the official perspective of a country.

However, this logic does not seem to apply everywhere. For example in Kosovo.

Kosovo

In 2008, Kosovo declared independence from Serbia and is today recognized as a sovereign country by many nations including the US. Serbia belongs to the countries which do not recognize Kosovo as a sovereign state. However, Google Maps seems to be indifferent to the perspective of Serbia:

alt_text

alt_text

The top map shows region = us (United States) and the bottom map shows region = rs (Serbia). Kosovo is shown in both cases as a country with a disputed border to Serbia.

Discussion

The language localization in Google Maps seems to work really well and follows a consistent pattern. The region localization which allows to change the geopolitical perspective however is harder to follow.

In the case of Kashmir, Google Maps reflects the perspectives of India or China. In the case of Kosovo, the perspective of Serbia seems not to be taken into account. One can argue that a bold label does not necessarily mean something is a country. Réunion for example is part of France but is also shown in bold like countries. But then when we look at Morocco, the label for Western Sahara and the dashed disputed border are suppressed when the region is set to Morocco.

Another explanation might be that with the 2013 Brussels Agreement, Serbia acknowledges the authority of the Kosovo government while not accepting Kosovo as a sovereign state per se.

We can only speculate what the guidelines are at Google for handling disputed territories. It looks like it takes a lot of local knowledge and political/historical understanding of conflicts to get disputed territories right. And probably one can never fully make things perfect for everyone.

All in all Google Maps has a very sophisticated localization API which is still easy to use. Two parameters, language and region, are enough to control the appearance of the map and change the language and geopolitical perspective. Quite nice!