update frameworks/intl/src/locale_config.cpp.

Signed-off-by: LY <liuyong235@huawei.com>
This commit is contained in:
LY 2024-09-26 08:08:06 +00:00 committed by Gitee
parent b6fe03de2b
commit cfe1849d1a
No known key found for this signature in database
GPG Key ID: 173E9B9CA92EEF8F

View File

@ -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;
}