The problem I am having is when launching the application in another locale for example "de" the program is not using the strings.xml (de) which it is meant to use.
Layout of 'values' directory screenshot
UPDATE: The "en" locale file works and the app successfully uses the strings of this file but when setting to another language the application reverts back to the default strings.xml file. I have even set the files to the exact same and still no luck.
EDIT: Fixed this problem by finding the following in my application build gradle! resConfigs "en"
SOLUTION: Changed the app gradle script. It had initially had resConfigs "en" which was preventing any other locale to work so I removed the line. It is inside the default config.
Before:
android {
compileSdkVersion 19
buildToolsVersion '25.0.0'
defaultConfig {
applicationId 'com.xxxx.xxxx'
minSdkVersion 19
targetSdkVersion 19
versionCode 1000
versionName '1.05'
resConfigs "en"
}
}
After:
android {
compileSdkVersion 19
buildToolsVersion '25.0.0'
defaultConfig {
applicationId 'com.xxxx.xxxx'
minSdkVersion 19
targetSdkVersion 19
versionCode 1000
versionName '1.05'
}
}
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