Changing language in system UI

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”
},

The language.json files are empty.

Hey @jeppebenja, I need clarification on a couple things.

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

  2. Are you saying no localization changes are working or only the TextInput menu?

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

Cheers,
Adam

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 :grinning_face_with_smiling_eyes:

  1. I’ve just built a new binary (iOS simulator build) to make sure.

  2. Generally localization works, I’m only struggling with the TextInput.

  3. 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”).
    Screenshot 2021-06-04 at 09.57.34

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?

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.