mirror of
https://gitee.com/openharmony/global_i18n
synced 2024-11-23 15:10:32 +00:00
!659 应用偏好语言返回systemlocale
Merge pull request !659 from zhangdd_ewan/cherry-0410
This commit is contained in:
commit
e8cafd5719
@ -99,11 +99,11 @@ std::string PreferredLanguage::GetAppPreferredLanguage()
|
||||
if (preferences == nullptr) {
|
||||
HILOG_ERROR_I18N(
|
||||
"PreferredLanguage::GetAppPreferredLanguage get i18n preferences failed, return system language.");
|
||||
return LocaleConfig::GetSystemLanguage();
|
||||
return LocaleConfig::GetSystemLocale();
|
||||
}
|
||||
std::string res = preferences->GetString(PreferredLanguage::APP_LANGUAGE_KEY, "");
|
||||
if (res.length() == 0) {
|
||||
return LocaleConfig::GetSystemLanguage();
|
||||
return LocaleConfig::GetSystemLocale();
|
||||
}
|
||||
return res;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user