set default locale when changing app language

This commit is contained in:
jmir1 2021-08-10 17:56:56 +02:00
parent c514fec3fa
commit 4d4ed7330d
2 changed files with 2 additions and 1 deletions

View file

@ -87,7 +87,7 @@ android {
dimension = "default"
}
create("dev") {
resConfigs("en", "xxhdpi")
resConfigs("en", "fr", "de", "ar", "xxhdpi")
dimension = "default"
}
}

View file

@ -62,6 +62,7 @@ object LocaleHelper {
} else {
newConfiguration.setLocale(appLocale)
}
Locale.setDefault(appLocale)
return ContextWrapper(context.createConfigurationContext(newConfiguration))
}