diff --git a/OsmAnd-java/src/main/java/net/osmand/map/OsmandRegions.java b/OsmAnd-java/src/main/java/net/osmand/map/OsmandRegions.java index 07ed57126c..45300b2ed5 100644 --- a/OsmAnd-java/src/main/java/net/osmand/map/OsmandRegions.java +++ b/OsmAnd-java/src/main/java/net/osmand/map/OsmandRegions.java @@ -374,7 +374,15 @@ public class OsmandRegions { } public void setLocale(String locale) { + setLocale(locale, null); + } + + public void setLocale(String locale, String country) { this.locale = locale; + // Check locale and give 2 locale names +// if("zh".equals(locale) && "rTW".equals(country)) { +// this.locale = "zh-Hant"; +// } } diff --git a/OsmAnd/src/net/osmand/plus/AppInitializer.java b/OsmAnd/src/net/osmand/plus/AppInitializer.java index ce7bb80b77..8fcb44f0dc 100644 --- a/OsmAnd/src/net/osmand/plus/AppInitializer.java +++ b/OsmAnd/src/net/osmand/plus/AppInitializer.java @@ -567,7 +567,7 @@ public class AppInitializer implements IProgress { return null; } }); - app.regions.setLocale(app.getLanguage()); + app.regions.setLocale(app.getLanguage(), app.getCountry()); } diff --git a/OsmAnd/src/net/osmand/plus/OsmandApplication.java b/OsmAnd/src/net/osmand/plus/OsmandApplication.java index 9fea8ac65a..7f729ca523 100644 --- a/OsmAnd/src/net/osmand/plus/OsmandApplication.java +++ b/OsmAnd/src/net/osmand/plus/OsmandApplication.java @@ -775,6 +775,16 @@ public class OsmandApplication extends MultiDexApplication { } } } + + public String getCountry() { + String country; + if (preferredLocale != null) { + country = preferredLocale.getCountry(); + } else { + country = Locale.getDefault().getCountry(); + } + return country; + } public String getLanguage() { String lang;