Supported Languages
The Routing API v8 supports the following languages for localization of instruction generation.
Language | Language code(s) |
Afrikaans | af |
Albanian | sq |
Amharic | am |
Arabic (Saudi Arabia) | ar, ar-sa |
Armenian | hy |
Assamese | as |
Azerbaijani (Latin) | az, az-Latn |
Basque | eu |
Belarusian | be |
Bengali (Bangladesh) | bn, bn-bd |
Bengali (India) | bn-in |
Bosnian | bs |
Bulgarian | bg |
Catalan | ca |
Catalan (Spain) | ca-ES |
Chinese (Simplified, China) | zh, zh-cn |
Chinese (Traditional, Hong Kong SAR China) | zh-hk |
Chinese (Traditional, Taiwan) | zh-tw |
Croatian | hr |
Czech (Czech Republic) | cs, cs-cz |
Danish (Denmark) | da, da-dk |
Dari | prs, prs-Arab |
Dutch (Netherlands) | nl, nl-nl |
English (United Kingdom) | en-gb |
English (United States) | en, en-us |
Estonian | et |
Filipino | fil, fil-Latn |
Finnish (Finland) | fi, fi-FI |
French (France) | fr, fr-FR |
Galician | gl |
Georgian | ka |
German (Germany) | de, de-de |
Greek (Greece) | el, el-gr |
Gujarati | gu |
Hausa | ha, ha-Latn |
Hebrew (Israel) | he, he-IL |
Hindi (India) | hi, hi-IN |
Hungarian (Hungary) | hu, hu-hu |
Icelandic | is |
Igbo | ig, ig-Latn |
Indonesian (Indonesia) | id, id-ID |
Irish | ga |
Italian (Italy) | it, it-IT |
Japanese (Japan) | ja, ja-jp |
K'iche' | quc, quc-Latn |
Kannada | kn |
Kazakh | kk |
Khmer | km |
Kinyarwanda (Rwanda) | rw, rw-RW |
Konkani | kok |
Korean (South Korea) | ko, ko-KR |
Kurdish | ku, ku-Arab |
Kyrgyz | ky, ky-Cyrl |
Latvian | lv |
Lithuanian | lt |
Luxembourgish | lb |
Macedonian | mk |
Malay (Malaysia) | ms, ms-MY |
Malayalam | ml |
Maltese | mt |
Maori | mi, mi-Latn |
Marathi | mr |
Mongolian | mn, mn-Cyrl |
Nepali (Nepal) | ne, ne-NP |
Norwegian Bokmål | nb, no |
Norwegian Nynorsk | nn |
Oriya | or |
Pedi | nso |
Persian | fa |
Polish (Poland) | pl, pl-pl |
Portuguese (Brazil) | pt-BR |
Portuguese (Portugal) | pt, pt-pt |
Punjabi | pa |
Punjabi (Arabic) | pa-Arab |
Quechua (Peru) | quz, quz-Latn-PE |
Romanian (Romania) | ro, ro-ro |
Russian (Russia) | ru, ru-ru |
Scottish Gaelic | gd, gd-Latn |
Serbian (Cyrillic, Bosnia & Herzegovina) | sr-Cyrl-BA |
Serbian (Cyrillic, Serbia) | sr-Cyrl-RS |
Serbian (Latin, Serbia) | sr, sr-Latn-RS |
Sindhi | sd, sd-Arab |
Sinhala | si |
Slovak (Slovakia) | sk, sk-sk |
Slovenian (Slovenia) | sl, sl-si |
Spanish (Spain) | es, es-es |
Swahili | sw |
Swedish (Sweden) | sv, sv-SE |
Tajik | tg-Cyrl |
Tamil | ta |
Tatar | tt, tt-Cyrl |
Telugu | te |
Thai (Thailand) | th, th-TH |
Tigrinya | ti |
Tswana | tn |
Turkish (Turkey) | tr, tr-TR |
Turkmen | tk, tk-Latn |
Ukrainian | uk |
Urdu | ur |
Uyghur | ug, ug-Arab |
Uzbek (Cyrillic) | uz, uz-Cyrl |
Vietnamese | vi |
Welsh | cy |
Wolof | wo, wo-Latn |
Xhosa | xh |
Yoruba | yo, yo-Latn |
Zulu (South Africa) | zu, zu-ZA |
Alternate languages fallback resolution
The Routing API v8 allows the caller to specify one or more alternate languages to try if the main language is otherwise not available Consider the following request:
curl -X GET \
'https://router.hereapi.com/v8/routes?transportMode=car&origin=52.5308,13.3847&destination=52.5264,13.3686&return=summary,polyline,actions,instructions&lang=fake-lang,es-es,sr-Latn&apikey={YOUR_API_KEY}'
Since the main language fake-lang
is unavailable, the API will try with the subsequent ones for the first available one, in this case es-es
. If no language is available, the language defaults to en-us
.
Language resolution can get a bit more complicated as well. Before giving up, the service will try to generalize the language and find a suitable replacement. For example, let's see what happens if the requested language is Latin American Spanish (es-419
), which is an unavailable language:
curl -X GET \
'https://router.hereapi.com/v8/routes?transportMode=car&origin=52.5308,13.3847&destination=52.5264,13.3686&return=summary,polyline,actions,instructions&lang=es-419&apikey={YOUR_API_KEY}'
The response shows that the query does not fail. Instead, the language falls back to es-es
which is similar enough to es-419
, and does not fall back to the default en-us
. Additionally, the response includes a notice notifying that a language replacement has taken place.
`{ "notices": [ { "code": "mainLanguageNotFound", "severity": "info", "title": "Couldn't find the main language" } ], "routes": [ { "sections": [ { [...] "actions": [ { "action": "depart", "duration": 133, "instruction": "Diríjase a Chausseestraße por Invalidenstraße. Siga durante 1.2 km.", "length": 1206, "offset": 0 }, { "action": "arrive", "duration": 0, "instruction": "Ha llegado a Invalidenstraße. Su destino está a la derecha.", "length": 0, "offset": 45 } ], "language": "es-es", } ] } ] }``
If multiple languages are included as potential fallbacks, the search for more generic replacements also takes place.
However, language specificity takes priority over language list order.
In other words, if a suitable generalization is available for the first and second languages on the list, but the one for the second language is more specific, it will be preferred over the second.
Consider the following example:
```bash
curl -X GET \
'https://router.hereapi.com/v8/routes?transportMode=car&origin=52.5308,13.3847&destination=52.5264,13.3686&return=summary,polyline,actions,instructions&lang=en-au,es-es-madrid&apikey={YOUR_API_KEY}'
The request specifies two unsupported languages, namely Australian English and Spanish (Spain, Madrid) which are both unsupported. The most specific supported language is Spanish (Spain), so therefore that one is selected instead of English, and the response looks like the one above.