I would like to enable "English (XA)" and "عربى" (XB) locales en-XA and ar-XB to make sure my app layouts are ready for translation, similar to what the article describes here. However, it is not available in the official Android emulator settings. I have tried several images and cannot find these pseudo-localization languages. Is there a setting or trick to enable them?
Pseudo localization in Android Emulator not available
Asked Answered
Try this:
- Turn on
Developer Options
, by tapping on Build number 7+ times. - Restart your emulator, by long clicking the power icon in the emulator menu and choosing the
Restart
option. - Go to the
Add Language
page. Choose your psuedolocale. - Add
pseudoLocalesEnabled true
to yourbuild.gradle
and build your app.
app/build.gradle:
android {
...
buildTypes {
debug {
pseudoLocalesEnabled true
}
}
from https://developer.android.com/guide/topics/resources/pseudolocales
Restarting the device isn't mentioned in the docs, but apparently it's necessary. Thanks! –
Agricola
© 2022 - 2024 — McMap. All rights reserved.