I’m implementing per-app language to learn how it works so I’ve created an app with this config:
- res/values/strings.xml <– (default english values)
- res/values-it/strings.xml <– (italian string translate)
I’ve followed the official guide and works fine adding just the
androidResources {
generateLocaleConfig = true
}
and creating the res/resources.properties file with the following content:
unqualifiedResLocale=ita
Side note: This default locale value required to build the app seems to be ignored by the way because the app still using the system default language.
PROBLEM: The system doesn’t allow me to choose english because in the System app language settings I have only “system default” (that means italian in this device) and Italian (two of that, one specific for Italy and another generic that want a region selection).
WORKAROUND: Create the folder “values-en” and copy the default/english strings.xml file. This works fine, in the settings now there is English, but in the code now I have two cloned strings.xml files that should be update on every changes (ok not a big deal at the end).
QUESTION: There is a proper way to do this? Specify that the default strings.xml should be used as a selectable language or this is the way was intended to work?