From a897ffcc1f2e51595024d5c5e7f6cacb45068441 Mon Sep 17 00:00:00 2001 From: vshcherb Date: Mon, 9 Nov 2015 16:57:34 +0100 Subject: [PATCH] Update OsmandApplication.java --- OsmAnd/src/net/osmand/plus/OsmandApplication.java | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/OsmAnd/src/net/osmand/plus/OsmandApplication.java b/OsmAnd/src/net/osmand/plus/OsmandApplication.java index ae0be4814a..7c716f598b 100644 --- a/OsmAnd/src/net/osmand/plus/OsmandApplication.java +++ b/OsmAnd/src/net/osmand/plus/OsmandApplication.java @@ -715,4 +715,16 @@ public class OsmandApplication extends Application { } + 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; + } }