mirror of
https://gitee.com/openharmony/global_i18n
synced 2024-11-27 09:11:40 +00:00
应用偏好语言返回systemlocale
Signed-off-by: zhangdd_ewan <zhangdongdong50@huawei.com>
This commit is contained in:
parent
b889b15520
commit
05cb91c840
@ -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