mapbox / mapbox/mapbox-maps-ios
Map localization is not working according to the device's locale
Nobody has claimed this yet.
- Dominant language
- Swift
- Stars
- 601
- Forks
- 196
- PR merge metrics
- No merged PRs in 30d
Description
## Environment
- Xcode version: 16.3
- iOS version: 18.5
- Devices affected: All
- Maps SDK Version: 11.6.0
## Observed behavior and steps to reproduce
Map labels do not update based on the user's phone locale.
## Expected behavior
The Map labels should according to user's phone locale
## Notes / preliminary analysis
Attempted to localize the map labels using the following code:
`try? mapView.mapboxMap.localizeLabels(into: Locale(identifier: "da"))`
Expected the map to display labels in Danish ("da"), but there was no visible change—the labels remained in the default language (English).
## Additional links and references
In the screenshot below, the label should be displayed as 'Helsingør' in Danish, but it is shown as 'Elsinore' instead.
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by reproducing the issue on iOS 18.5 with Maps SDK 11.6.0 using mapView.mapboxMap.localizeLabels(into: Locale(identifier: "da")). Then inspect the localizeLabels API and related map-label localization behavior; done means labels display the selected locale, including “Helsingør” rather than “Elsinore”.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- ios, swift
- Domain
- localization, mobile
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100