mapbox-navigation-ios icon indicating copy to clipboard operation
mapbox-navigation-ios copied to clipboard

MapView localization won't display english

Open LuminousPath opened this issue 4 years ago • 14 comments

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

LuminousPath avatar Sep 04 '20 15:09 LuminousPath

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.

1ec5 avatar Sep 08 '20 19:09 1ec5

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.

LuminousPath avatar Sep 09 '20 09:09 LuminousPath

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.

1ec5 avatar Oct 16 '20 14:10 1ec5

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.

rossmartin avatar Nov 07 '20 17:11 rossmartin

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?

Screen Shot 2021-02-07 at 7 24 03 PM

nitinsh99 avatar Feb 08 '21 00:02 nitinsh99

+1

nelsonchen5 avatar Mar 26 '21 20:03 nelsonchen5

I have the same issue , any update ?

ghadeeraqraa1992 avatar Jun 15 '21 13:06 ghadeeraqraa1992

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?

image image

jimhill avatar Nov 04 '21 21:11 jimhill

@jimhill what Navigation SDK version do you use?

S2Ler avatar Nov 05 '21 05:11 S2Ler

@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.

jimhill avatar Nov 06 '21 15:11 jimhill

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.

daanlenaerts avatar Aug 03 '22 16:08 daanlenaerts

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. IMG_9788

inzamaminvozone avatar Jun 01 '23 05:06 inzamaminvozone

Still getting this issue with CocoaPods in 2023, latest mapboxnavigation sdk

soymonitus avatar Jul 03 '23 09:07 soymonitus

yes still getting this issue i have latest cocoapods & mapboxnavigation

inzamaminvozone avatar Jul 03 '23 12:07 inzamaminvozone