I’m trying to support different locales in my app, but I’m having trouble localizing the system dialogs, for example TextInput context menu (Select All, Copy, Paste, etc).
No matter what I do, the context menu always shows up in english, despite changing the region and language on the device.
The interesting part of my app.json looks something like this:
“ios”: {
“infoPlist”: {
…
“CFBundleAllowMixedLocalizations”: true
},
},
“locales”: {
“en”: “./languages/en.json”,
“da”: “./languages/da.json”,
“sv”: “./languages/sv.json”,
“es”: “./languages/es.json”
},
Hey @jeppebenja, I need clarification on a couple things.
Are you testing this with your standalone app? These changes won’t be reflected in Expo Go. You’ll need to build a binary after configuring your app.json for the changes to take affect.
Are you saying no localization changes are working or only the TextInput menu?
I’m confused when you saying the language json files are empty. If you haven’t provided any properties in your json objects that are being exported than it’s expected that nothing is happening.
Hi Adam, thanks for the quick reply. Sorry for the late reply myself, I never got any notification on thread activity, so I figured I was on my own
I’ve just built a new binary (iOS simulator build) to make sure.
Generally localization works, I’m only struggling with the TextInput.
I might have gotten this completely wrong. I went off of this StackOverflow post.
Just to be clear - I don’t want to explicitly translate anything myself. I just want the TextInput to behave “natively”. Here is a screenshot of the behaviour I’m seeing (in the binary I just built). I would expect “Paste” to be in Danish in this example (“Sæt ind”).
I’ve been checking back in this thread now and then to see if you posted anything. I just realized that I never mentioned @adamjnav , so maybe you never got a notification?