diff --git a/map/place_page_info.cpp b/map/place_page_info.cpp index ac50114537..dbae446838 100644 --- a/map/place_page_info.cpp +++ b/map/place_page_info.cpp @@ -59,15 +59,30 @@ string Info::GetTitle() const if (!m_customName.empty()) return m_customName; - string name; - auto const deviceLang = StringUtf8Multilang::GetLangIndex(languages::GetCurrentNorm()); - auto const mwmInfo = GetID().m_mwmId.GetInfo(); + string primaryName; if (mwmInfo) - feature::GetReadableName(mwmInfo->GetRegionData(), m_name, deviceLang, true /* allowTranslit */, name); + { + auto const deviceLang = StringUtf8Multilang::GetLangIndex(languages::GetCurrentNorm()); + string secondaryName; + feature::GetPreferredNames(mwmInfo->GetRegionData(), m_name, deviceLang, true /* allowTranslit */, primaryName, secondaryName); + } + return primaryName; +} - return name; +string Info::GetSecondaryTitle() const +{ + auto const mwmInfo = GetID().m_mwmId.GetInfo(); + + string secondaryName; + if (mwmInfo) + { + auto const deviceLang = StringUtf8Multilang::GetLangIndex(languages::GetCurrentNorm()); + string primaryName; + feature::GetPreferredNames(mwmInfo->GetRegionData(), m_name, deviceLang, true /* allowTranslit */, primaryName, secondaryName); + } + return secondaryName; } string Info::GetSubtitle() const diff --git a/map/place_page_info.hpp b/map/place_page_info.hpp index f218cde93c..83098bfa5d 100644 --- a/map/place_page_info.hpp +++ b/map/place_page_info.hpp @@ -65,6 +65,8 @@ public: /// Convenient wrapper for feature's name and custom name. string GetTitle() const; + /// Convenient wrapper for secondary feature name. + string GetSecondaryTitle() const; /// Convenient wrapper for type, cuisines, elevation, stars, wifi etc. string GetSubtitle() const; /// @returns empty string or GetStars() count of ★ symbol.