While developing an app, I tried use Android N multi-lingual support. As explained on developers site. It seems that it will automatically pick the resources using resource resolution mechanism.
But it doesn't seem to be working or could it be that I am missing something?
Here is the complete scenario :
Locales supported by app are placed in corresponding resource folder:
a. values (default) b. values-de c. values-es
So according to explanation provided on developers site it should pick locale from "values-de" directory. But it shows the default one.
Could someone give me an idea of what might be going wrong??
Ineteresting that this issue reproduces in sample project. But all works as intended if I remove "appcompat-v7" from compile dependencies. I don't know why for now and I'll keep digging.
UPDATE:
adding appcompact-v7 really fix the problem. watch this tutorial to understand why:
https://blog.egorand.me/a-curious-case-of-multiple-locales/
I was facing this issue and found out that removing alternative resources the app does not need resolves the issue.
android {
defaultConfig {
...
// Keeps language resources for only the locales specified below.
resConfigs "de", "es"
}
}
Check out Google Developer documentation here
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With