added locRes

This commit is contained in:
Chumva 2018-03-21 14:56:50 +02:00
parent 2b19e1e64b
commit ce25dfe0ae

View file

@ -331,6 +331,7 @@ public class AppInitializer implements IProgress {
}
final Resources en = getLocalizedResources("en");
final Resources locRes = getLocalizedResources(app.getLanguage());
app.poiTypes.setPoiTranslator(new MapPoiTypes.PoiTranslator() {
@ -365,13 +366,14 @@ public class AppInitializer implements IProgress {
return getSynonyms(type.getIconKeyName());
}
@Override
public String getSynonyms(String keyName) {
try {
Field f = R.string.class.getField("synonyms_poi_" + keyName);
if (f != null) {
Integer in = (Integer) f.get(null);
return app.getString(in);
return locRes.getString(in);
}
} catch (Exception e) {
}