forked from organicmaps/organicmaps
use transliteration logic only for enlish locale
This commit is contained in:
parent
acf6cb85ca
commit
1e28e6e2d4
2 changed files with 4 additions and 0 deletions
|
@ -28,6 +28,9 @@ std::string GetTranslatedOrTransliteratedName(StringUtf8Multilang const & name,
|
|||
if (!s.empty())
|
||||
return s;
|
||||
|
||||
if (languageCode != StringUtf8Multilang::kEnglishCode)
|
||||
return std::string();
|
||||
|
||||
s = GetName(name, StringUtf8Multilang::kInternationalCode);
|
||||
if (!s.empty() && strings::IsASCIIString(s))
|
||||
return s;
|
||||
|
|
|
@ -20,6 +20,7 @@ inline std::string GetName(StringUtf8Multilang const & name, LanguageCode lang)
|
|||
|
||||
/// This function will take the following steps:
|
||||
/// 1. Return the |languageCode| name if it exists.
|
||||
/// 1.1 Next steps only for english locale
|
||||
/// 2. Try to get international name.
|
||||
/// 3. Try to check if default name is ASCII and return it if succeeds.
|
||||
/// 4. Return transliteration trying to use kPreferredLanguagesForTransliterate
|
||||
|
|
Loading…
Add table
Reference in a new issue