Mapbox - How to change the default language while navigation

Viewed 133

The default language is English, I want to change it to other language while navigation. How?

The code snippet looks like ...

// Specify that the route is intended for automobiles avoiding traffic
let routeOptions = NavigationRouteOptions(waypoints: [origin, destination], profileIdentifier: .automobileAvoidingTraffic)

// Generate the route object and draw it on the map
Directions.shared.calculate(routeOptions) { [weak self] (session, result) in
....

.....

navigationViewController.navigationService.simulationMode = SimulationMode.always
navigationViewController.navigationService.simulationSpeedMultiplier = 9
self.present(navigationViewController, animated: true, completion: nil)
1 Answers

This worked for me: routeOptions.locale = Locale(identifier: "da_DK")

Related