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