mapbox-navigation-ios
mapbox-navigation-ios copied to clipboard
MapView localization won't display english
I'm writing an app using react native with Mapbox Navigation and using the pod installed version of the MapboxNavigation Library.
Every time I run pod install
the UI for the mapbox Navigation View changes into a random language within the language sets available in the pod.
I'm not sure what's wrong, but the only way I've seen to fix it is to remove all the other localizations and remove the "use base localization" option from the "Pods" portion of the project.
This change gets overwritten each time I run pod install
though so that doesn't seem to do much.
Any ideas as to what could be going wrong?
Mapbox Navigation SDK version: 0.40
This is very unexpected for a native application; I’m not sure what could cause that to happen. Do you see random language switching in any other part of your application? I wonder if that might be a React Native issue somehow.
Mapbox is the only pod that has the level of localization that it does, that we're using.
I haven't confirmed it yet, but I have a sneaking suspicion that unless the project itself has a file that can be localized, it doesn't have a reference to what the "base" localization is, so when NSLocalizedString
calls out to the bundle it returns null or the first localization that can be found in the project.pbxproj
I only say this because I've seen this work fine when there is a storyboard with both base
and English
that gets compiled as part of the project.
I haven't confirmed it yet, but I have a sneaking suspicion that unless the project itself has a file that can be localized, it doesn't have a reference to what the "base" localization is
Bundle should fall back to the project’s development language, which is specified in either the build settings or the Info.plist.
We experience the same issue in the wrapper we created for react native here - https://github.com/homeeondemand/react-native-mapbox-navigation
Currently we are using version 1.0.0
for the MapboxNavigation
ios SDK.
hey @LuminousPath .. I tried following the workaround that worked for you but still seeing some random language in the navigation view. My settings looks like this. Am i missing something?

+1
I have the same issue , any update ?
This is just to confirm that I get the exact same issues after ages of trying to unsuccessfully fix.
To clarify that's using React Native - many different versions of the Mapbox iOS SDK and Localizable.strings files on simulator and phone.
Setting the locale with NavigationRouteOptions successfully changes the voice locale.
Any thoughts?


@jimhill what Navigation SDK version do you use?
@S2Ler thanks for getting back to me. Before getting back to you I wanted to check through all possible options - so I checked whether the issue was the same in production, on different versions etc.
I have arrived at a working version but not 100% why it would be the case. Previously I had worked with 2 OSS React Native libraries which always caused the issue, and then dropped them to run our own. All of these used CocoaPods and no matter which version of the SDK I used, the language was always wrong.
However, after I switched out the CocoaPods installation, and migrated to Swift Package Manager (installing MapboxMaps 10.1.0 and MapboxNavigation 2.0.1) the issue instantly resolved?! So like I say not entirely sure why, but it has been consistently fine since doing this?!
Finally if I revert back to CocoaPods the issue occurs again (using same versions as above). 🤔
Hope that helps.
I am having the same issue on my iPad (which is configured in English) where certain parts of the interface are shown in Chinese for one reason or another. I am also using CocoaPods with react-native-mapbox-navigation.
i develop custom Mapbox framework and install in ReactNative application but when we click on Feedback option in turnbyturn screen where navigation of route occure it show me the Russian language. while other part show english localize, Basically the issue is labels are localized in russian language automatically while i did not set anything in language. my device already is English language. This is the screenshoot i attached. Please help me.
Still getting this issue with CocoaPods in 2023, latest mapboxnavigation sdk
yes still getting this issue i have latest cocoapods & mapboxnavigation