#will-reactnative-localization
1 messages · Page 1 of 1 (latest)
@true sorrel on iOS the phone's locale isn't enough, you need a custom configuration file called Info.plist for it to work too.
I think you want to look at https://stackoverflow.com/questions/48157185/info-plist-file-for-react-native-ios-app-using-expo-sdk
I tried adding additional data to app.json (as the application is built in Expo), however it didn't solve the problem
will-reactnative-localization
@true sorrel you said "I tried" but you tried what exactly?
To be more precise, I added the following to app.json file:
"infoPlist": {
"CFBundleAllowMixedLocalizations": true,
"CFBundleLocalizations" : ["pl"],
"CFBundleDevelopmentRegion" : "pl"
}
I also tried creating empty pl.json file and adding the following to app.json:
"locales": {
"pl": "./locales/pl.json"
}
as some posts on StackOverflow suggest, but Payment Sheet is still rendered in English
Hello! I'm taking over and catching up...
To clarify, are you trying to force the Payment Sheet to be in a specific language all the time, or do you want it to use the locale set on the device?
I would like it to use the locale set on the device
However, I tried to set at least to Polish, as the primary application language is Polish
On the device you're testing with do you have Polish added here in Settings -> System -> Languages & Input -> Languages?
Give me a minute, I will check
I have set Polish in settings: General => Language and Region
Can you view the generated Info.plist file to make sure the keys and values are being set as expected?
In Expo I do not have access to Info.plist file, I do have the code I pasted above in app.json file
Maybe I am missing something else?
Right, but Expo has to generate that file during the build process, you can't access it?
I am not sure how to access that. The build is also made using expo cli
Can you completely clean and remove the build and regenerate it from scratch? It seems like an old value or old version of the file is sticking around.
And remove it from the device entirely and reinstall it?
Yes, I can do that. In case I run the application locally, will the language changes also apply?
What do you meany by locally?
I mean using Expo application, without generating development build
It sounds like this is an iOS-specific issue, right? In which case you would need to test in the iOS simulator or an iOS device.
Yes, I test it on iOS device, using expo application and using generated development build