diff --git a/OsmAnd/src/net/osmand/plus/AppInitializer.java b/OsmAnd/src/net/osmand/plus/AppInitializer.java index d9b13bba8b..42a6b0e626 100644 --- a/OsmAnd/src/net/osmand/plus/AppInitializer.java +++ b/OsmAnd/src/net/osmand/plus/AppInitializer.java @@ -7,7 +7,6 @@ import android.content.Context; import android.content.DialogInterface; import android.content.Intent; import android.content.SharedPreferences; - import net.osmand.IProgress; import net.osmand.IndexConstants; import net.osmand.PlatformUtil; @@ -266,10 +265,23 @@ public class AppInitializer implements IProgress { } app.poiTypes.setPoiTranslator(new MapPoiTypes.PoiTranslator() { + public String getLangTranslation(String l) { + try { + Field f = R.string.class.getField("lang_"+l); + if (f != null) { + Integer in = (Integer) f.get(null); + return app.getString(in); + } + } catch (Exception e) { + System.err.println(e.getMessage()); + } + return l; + } + @Override public String getTranslation(AbstractPoiType type) { if(type.getBaseLangType() != null) { - return getTranslation(type.getBaseLangType()) + "(" + type.getLang() +")"; + return getTranslation(type.getBaseLangType()) + "(" + getLangTranslation(type.getLang()) +")"; } try { Field f = R.string.class.getField("poi_" + type.getIconKeyName());