mirror of
https://gitee.com/openharmony/global_i18n
synced 2024-11-23 07:00:13 +00:00
update frameworks/intl/src/locale_config.cpp.
Signed-off-by: LY <liuyong235@huawei.com>
This commit is contained in:
parent
b6fe03de2b
commit
cfe1849d1a
@ -129,14 +129,6 @@ unordered_map<string, string> LocaleConfig::localDigitMap {
|
||||
{ "ur", "latn" }
|
||||
};
|
||||
|
||||
unordered_map<string, string> LocaleConfig::convertLanguage {
|
||||
{ "ug", "ug" },
|
||||
{ "bo", "bo" },
|
||||
{ "en", "en-Latn-US" },
|
||||
{ "zh-Hans", "zh-Hans" },
|
||||
{ "zh-Hant", "zh-Hant" }
|
||||
};
|
||||
|
||||
std::map<std::string, std::string> LocaleConfig::supportedDialectLocales;
|
||||
std::map<string, string> LocaleConfig::locale2DisplayName {};
|
||||
std::map<string, string> LocaleConfig::region2DisplayName {};
|
||||
@ -297,13 +289,6 @@ string LocaleConfig::GetSystemLanguage()
|
||||
if (systemLanguage.empty()) {
|
||||
systemLanguage = ReadSystemParameter(DEFAULT_LANGUAGE_KEY, CONFIG_LEN);
|
||||
}
|
||||
for (auto language : convertLanguage) {
|
||||
std::string prefix = language.first;
|
||||
if (prefix.length() <= systemLanguage.length() && systemLanguage.find(prefix, 0) == 0) {
|
||||
systemLanguage = language.second;
|
||||
break;
|
||||
}
|
||||
}
|
||||
return systemLanguage;
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user