By: Minh Nguyễn
The latest release of the Navigation SDK for iOS includes expanded support for more languages, helping your application reach diverse audiences and international markets. The SDK can automatically display its user interface in 15 languages and provide turn-by-turn instructions in 16 languages.
With the latest update, the route map itself can be localized. Roads are in the local language by default so what your users see on the phone is what they encounter on signs. If you use a standalone NavigationMapView, we added a public localizeLabels() method so that, for instance, your preview map can match the guidance map for turn-by-turn navigation.
All of this happens by default, but you can customize the SDK to fit your unique needs. For example, if you want to guide a user in a language other than their preferred language, a single line of code enables instructions in any other language the SDK supports. This code causes instructions to be read in a British English voice:
routeOptions.locale = Locale(identifier: "en-GB")
Distances are measured in either miles or kilometers, again based on your user’s system-wide language and region preferences. Let’s say your audience is primarily cyclists who measure distances in kilometers, a single line of code ensures that the voice instructions they hear are tailored to them:
routeOptions.measurementSystem = .metric
Download our Navigation SDK for iOS to expand language support and accommodate more diverse users. Interested in languages that aren’t currently supported? Contribute localizations to the SDK along with the rest of the Transifex community.
Follow @Mapbox to stay tuned for when we launch more languages on Android.
Turn-by-turn navigation in your user’s language was originally published in Points of interest on Medium, where people are continuing the conversation by highlighting and responding to this story.