You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I found an alternative solution with setting the language:
letlocale=Locale.current
letsettingsService=SettingsServiceFactory.getInstance(storageType:.persistent)switch settingsService.set(key:MapboxCommonSettings.language, value:"\(locale)"){case.success:print("Successfully set MapboxCommonSettings.language \(locale)")case.failure(let error):assertionFailure("Failed to set MapboxCommonSettings.language with error: \(error)")}
Thanks for the report. You are correct that .localizeLabels() does not work for Mapbox Standard (our default style) or Mapbox Satellite Standard. We have an open issue for this here that you can use to follow updates. In short, Mapbox Standard introduced a new basemap approach that changed how layers are handled at runtime. As you've identified, this means that the .localizeLabels() approach to translating map labels does not work for these styles.
If translation using .localizeLabels() is important for your project, I recommend creating a style based on one of our classic styles, such as Mapbox Streets.
The alternative approach you identified here using MapboxCommonSettings remains in preview so we do not recommend it for production applications.
Environment
Observed behavior and steps to reproduce
localizeLabels(into:forLayerIds:) Method Not Working
Simplest example:
Expected behavior
Based on the documentation, I expect a change in language.
https://docs.mapbox.com/help/troubleshooting/change-language/#mapbox-maps-sdk-for-ios
Additional links and references
Demo project with bug https://github.com/Savva-Shuliatev/Mapbox-localization-bug
The text was updated successfully, but these errors were encountered: