diff --git a/OsmAnd/src/net/osmand/plus/OsmandApplication.java b/OsmAnd/src/net/osmand/plus/OsmandApplication.java index 5f21112797..fef0fdb7cb 100644 --- a/OsmAnd/src/net/osmand/plus/OsmandApplication.java +++ b/OsmAnd/src/net/osmand/plus/OsmandApplication.java @@ -379,6 +379,7 @@ public class OsmandApplication extends MultiDexApplication { } } + public void checkPreferredLocale() { Configuration config = getBaseContext().getResources().getConfiguration(); @@ -408,6 +409,8 @@ public class OsmandApplication extends MultiDexApplication { if (selectedLocale != null) { Locale.setDefault(selectedLocale); config.locale = selectedLocale; + config.setLayoutDirection(selectedLocale); + getBaseContext().getResources().updateConfiguration(config, getBaseContext().getResources().getDisplayMetrics()); if (android.os.Build.VERSION.SDK_INT >= 17) { Configuration conf = new Configuration(config); diff --git a/OsmAnd/src/net/osmand/plus/OsmandSettings.java b/OsmAnd/src/net/osmand/plus/OsmandSettings.java index 4711d19f2a..b9b91f84af 100644 --- a/OsmAnd/src/net/osmand/plus/OsmandSettings.java +++ b/OsmAnd/src/net/osmand/plus/OsmandSettings.java @@ -3401,6 +3401,7 @@ public class OsmandSettings { // this value could localized public final OsmandPreference VOICE_PROVIDER = new StringPreference("voice_provider", null) { protected String getDefaultValue() { + Configuration config = ctx.getResources().getConfiguration(); for (String lang : TTS_AVAILABLE_VOICES) { if (lang.equals(config.locale.getLanguage())) {