ios - Mapbox - 如何在导航时更改默认语言
问题描述
默认语言是英语,我想在导航时将其更改为其他语言。如何?
代码片段看起来像......
// 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)
解决方案
这对我有用:routeOptions.locale = Locale(identifier: "da_DK")
推荐阅读
- javascript - 为什么“npm install”告诉我“没有安装你必须自己安装对等依赖项:”?
- drools - Drools PhreakPropagationContext & PropagationEntry$Update 导致 OutOfMemoryError?
- python - 熊猫在某些索引点增加整数?
- android - 为什么在 android 7.0 及更高版本上出现模拟器错误?
- imagemagick - 使用 imagemagick 创建字符表
- spring-boot - OIDC 动态注册 SpringBoot Client 应用
- javascript - 使用 vuetify 2 设置故事书
- outlook - 无法让 getCallbackTokenAsync 正常运行
- performance - 使用 Jmeter 进行性能负载测试以及资产文件如何影响结果
- javascript - 将对象数组一分为二:不是全部都枚举了吗?