Welcome to ShenZhenJia Knowledge Sharing Community for programmer and developer-Open, Learning and Share
menu search
person
Welcome To Ask or Share your Answers For Others

Categories

I have an old android application I inherited. It has strings files in multiple locales (e.g., es, fr, pt). I'm pretty sure localization used to work .. or still works?

Here's what I did:

  • run an android emulator (the "qemu-system-i386" with Orange Rise 32 API version 23, which is android 6.0, to test older hardware)
  • run the app in Android Studio and it gets deployed to the emulator
  • set the locale. I tried 1) using the "Settings" in the emulator, 2) Tried through adb shell as documented here.

It looks to me like the localization settings are changed in the emulator. All the controls and menus for the system are in Spanish, for example.

When I look at the app, it's all still default resources. I can stop and restart the app in Android Studio, and it's still all default resources. I added a "current_locale" string in each strings file ("default" in default, "es" in the es version, etc.), and display it. It shows "default".

I can't get the locale from Java, since that requires minSdkVersion 28, and I'm trying to support back to version 14.

Nothing useful in the logcat window.

How can I tell what's going on?

I guess I could deploy it to a phone somehow and see if it works there.

question from:https://stackoverflow.com/questions/65545375/how-to-debug-android-application-localization

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
thumb_up_alt 0 like thumb_down_alt 0 dislike
67 views
Welcome To Ask or Share your Answers For Others

1 Answer

Waitting for answers

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
thumb_up_alt 0 like thumb_down_alt 0 dislike
Welcome to ShenZhenJia Knowledge Sharing Community for programmer and developer-Open, Learning and Share
...