diff --git a/OsmAnd/src/net/osmand/plus/mapcontextmenu/WikipediaDialogFragment.java b/OsmAnd/src/net/osmand/plus/mapcontextmenu/WikipediaDialogFragment.java index 73cd329e58..d4910a318d 100644 --- a/OsmAnd/src/net/osmand/plus/mapcontextmenu/WikipediaDialogFragment.java +++ b/OsmAnd/src/net/osmand/plus/mapcontextmenu/WikipediaDialogFragment.java @@ -167,8 +167,6 @@ public class WikipediaDialogFragment extends DialogFragment { if (TextUtils.isEmpty(preferredLanguage)) { preferredLanguage = getMyApplication().getLanguage(); } - final String title = TextUtils.isEmpty(preferredLanguage) ? amenity.getName() : amenity.getName(preferredLanguage); - ((TextView) mainView.findViewById(R.id.title_text_view)).setText(title); String lng = amenity.getContentLanguage("content", preferredLanguage, "en"); if (Algorithms.isEmpty(lng)) { @@ -176,6 +174,8 @@ public class WikipediaDialogFragment extends DialogFragment { } final String langSelected = lng; + final String title = amenity.getName(langSelected); + ((TextView) mainView.findViewById(R.id.title_text_view)).setText(title); mainView.findViewById(R.id.read_full_article).setOnClickListener(new View.OnClickListener() { @Override