Skip to content

Commit 33db156

Browse files
committed
Localize map labels into user-preferred languages
The application’s UI language is irrelevant to whether the map should be localized into a language that the user says they prefer in Settings.
1 parent 2b0dda6 commit 33db156

File tree

2 files changed

+2
-1
lines changed

2 files changed

+2
-1
lines changed

CHANGELOG.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,7 @@
2020
* `NavigationMapView.removeAlternativeRoutes()` and `NavigationMapView.removeContinuousAlternativeRoutesDurations()` were made public to provide a way to remove previously shown alternative routes and alternative routes duration annotations, respectively. ([#4134](https://github.com/mapbox/mapbox-navigation-ios/pull/4134))
2121
* Fixed an issue where tapping on a route duration annotation that overlaps a different route would cause the wrong route to be passed into `NavigationMapViewDelegate.navigationMapView(_:didSelect:)` or `NavigationMapViewDelegate.navigationMapView(_:didSelect:)`. ([#4133](https://github.com/mapbox/mapbox-navigation-ios/pull/4133))
2222
* Fixed an issue where the shields in the instruction are using the style from last navigation session with the `NavigationMapView` injection used in the new session. ([#4197](https://github.com/mapbox/mapbox-navigation-ios/pull/4197))
23+
* Fixed an issue where the `NavigationMapView.localizeLabels()` method only localized map labels according to the user’s Preferred Language Order setting if the application also had a localization in the preferred language. ([#4205](https://github.com/mapbox/mapbox-navigation-ios/pull/4205))
2324

2425
### Banners and guidance instructions
2526

Sources/MapboxNavigation/NavigationMapView.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1757,7 +1757,7 @@ open class NavigationMapView: UIView {
17571757
need to call this method on the value of `NavigationViewController.navigationMapView`.
17581758
*/
17591759
public func localizeLabels() {
1760-
guard let preferredLocale = VectorSource.preferredMapboxStreetsLocale(for: .nationalizedCurrent) else { return }
1760+
guard let preferredLocale = VectorSource.preferredMapboxStreetsLocale(for: nil) else { return }
17611761
mapView.localizeLabels(into: preferredLocale)
17621762
}
17631763

0 commit comments

Comments
 (0)