Fix check for preferred locale

This commit is contained in:
Vitaliy 2020-01-08 18:14:25 +02:00
parent 24c8048d81
commit 96a44f0bee

View file

@ -383,10 +383,12 @@ public class OsmandApplication extends MultiDexApplication {
if (defaultLocale == null) {
defaultLocale = Locale.getDefault();
}
if (!"".equals(country)) {
preferredLocale = new Locale(lang, country);
} else {
preferredLocale = new Locale(lang);
if (!"".equals(lang)) {
if (!"".equals(country)) {
preferredLocale = new Locale(lang, country);
} else {
preferredLocale = new Locale(lang);
}
}
Locale selectedLocale = null;