Localization and internationalization

SDKs covered:
Navigation SDK
Navigation UI SDK

The Navigation SDK allows you to customize the language for both text and voice instructions. Instructions are announced in the user interface language when turn instructions are available in that language. If instructions are not available in the user interface language, they are announced in English.

By default, the SDK gives distances in the predominant measurement system of the system region, which may not necessarily be the same region in which the user is traveling.

The upcoming road or ramp destination is named according to the local or national language. In some regions, the SDK may give the name multiple languages.

Localization and the Navigation UI SDK

Because language and units of measurement are specified when the route is generated, this guide does not describe any specific options in the Navigation UI SDK. The Navigation UI SDK will receive the defaults described above if no language is specified. If you would like to customize the language or units of measurement used in text and voice instructions, you must use the NavigationRoute.Builder class.

Supported languages

The table below lists the languages that are supported for user interface elements and for spoken instructions.

LanguageUser interfaceSpoken instructionsRemarks
ArabicDepends on the device; may require third-party text-to-speech
Bengali
BurmeseDepends on the device; may require third-party text-to-speech
Chinese-
Mandarin
Depends on the device; may require third-party text-to-speech
Czech-
Danish
English
EsperantoDepends on the device; may require third-party text-to-speech
FinnishDepends on the device; may require third-party text-to-speech
French
Galician
German
HebrewDepends on the device; may require third-party text-to-speech
HungarianDepends on the device; may require third-party text-to-speech
IndonesianDepends on the device; may require third-party text-to-speech
Italian
Japanese
Korean
Norwegian
Polish
Portuguese
Romanian
Russian
SlovenianDepends on the device; may require third-party text-to-speech
Spanish
Swedish
Turkish
UkrainianDepends on the device; may require third-party text-to-speech
VietnameseDepends on the device; may require third-party text-to-speech
YorubaDepends on the device; may require third-party text-to-speech
Note

For languages marked with Depends on the device; may require third-party text-to-speech, instructions are provided by the SDK, but it is not guaranteed that the given device will have the appropriate TextToSpeech speech engine installed to pronounce these instructions correctly.

Contributing to localization

To add a new localization or improve an existing localization see the contributing guide for detailed instructions.

Voice instruction sources

Turn instructions are primarily designed to be announced by either the Mapbox Voice API (powered by Amazon Polly) or TextToSpeech. By default, the Navigation SDK uses the Mapbox Voice API, which requires an Internet connection at various points along the route. If the Voice API lacks support for the turn instruction language or there is no Internet connection, TextToSpeech announces the instructions instead.

Further customization

You can override the default language or units of measurement used in instructions when building your route request.

Custom language

To have instructions announced in a language other than the user interface language, set the NavigationRoute.Builder#language property when calculating the route with which to start navigation.

// Override measurement system in spoken instructions
NavigationRoute.builder(context)
.accessToken(MAPBOX_ACCESS_TOKEN)
.origin(origin, bearing, tolerance)
.destination(destination)
.language('German')
.build();

Custom units of measurement

To override the measurement system used in spoken instructions, set the MapboxNavigationOptions.Builder#voiceUnits property when calculating the route with which to start navigation.

// Override measurement system in spoken instructions
NavigationRoute.builder(context)
.accessToken(MAPBOX_ACCESS_TOKEN)
.origin(origin, bearing, tolerance)
.destination(destination)
.voiceUnits(DirectionsCriteria.IMPERIAL)
.build();
Was this page helpful?