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
{{ message }}
Repository navigation
The localizeLabels prop has no effect on iOS #1325
Describe the bug
The localizeLabels prop has no effect on iOS
To Reproduce
Create a MapView and use the localizeLabels prop. When debugging I can see the call being made to [style localizeLabelsIntoLocale:nil], but this seems to have no effect. I have changed the device's language and preferred language.
Expected behavior
Localized map labels.
Actual behavior
Map labels still displayed in English.
Screenshots
n/a
Versions (please complete the following information):
Platform: iOS
Platform OS: iOS 13.7
Device: iPhone 11
Emulator/ Simulator: yes (also tested on device)
Dev OS: OSX
react-native-mapbox-gl Version 8.1.0
Mapbox GL version ?
React Native Version 0.62.2
Additional context
Tested on device (14.4) and on simulator (13.7).
My bad. When using one of the languages listed here the labels do get localized. Since the language I need isn't supported, what I actually want is to display the names used locally. At the moment country names and some city names are in English with localizeLabels set to false.
Edit: was able to use local names everywhere by changing the native code slightly.
Activity
thijs-qv commentedon Apr 28, 2021
My bad. When using one of the languages listed here the labels do get localized. Since the language I need isn't supported, what I actually want is to display the names used locally. At the moment country names and some city names are in English with localizeLabels set to false.
Edit: was able to use local names everywhere by changing the native code slightly.
katakuta commentedon Feb 22, 2023
May I ask how to change the native code? 🥺
thijs-qv commentedon Feb 22, 2023
Sure, this is the patch I'm using (for v8.1.0). Note though that I have hardcoded the locale to Dutch / NL here, you probably want to change that.