systemlanguage改为systemlocale

Signed-off-by: LY <liuyong235@huawei.com>
This commit is contained in:
LY 2024-09-01 09:37:58 +08:00
parent df46edf409
commit 114d281086
4 changed files with 4 additions and 4 deletions

View File

@ -1013,7 +1013,7 @@ void ContextImpl::UpdateResConfig(std::shared_ptr<Global::Resource::ResourceMana
}
#ifdef SUPPORT_SCREEN
UErrorCode status = U_ZERO_ERROR;
icu::Locale locale = icu::Locale::forLanguageTag(Global::I18n::LocaleConfig::GetSystemLanguage(), status);
icu::Locale locale = icu::Locale::forLanguageTag(Global::I18n::LocaleConfig::GetSystemLocale(), status);
resConfig->SetLocaleInfo(locale);
if (resConfig->GetLocaleInfo() != nullptr) {
TAG_LOGD(AAFwkTag::APPKIT,

View File

@ -993,7 +993,7 @@ bool MainThread::InitResourceManager(std::shared_ptr<Global::Resource::ResourceM
std::unique_ptr<Global::Resource::ResConfig> resConfig(Global::Resource::CreateResConfig());
#if defined(SUPPORT_GRAPHICS) && defined(SUPPORT_APP_PREFERRED_LANGUAGE)
UErrorCode status = U_ZERO_ERROR;
icu::Locale systemLocale = icu::Locale::forLanguageTag(Global::I18n::LocaleConfig::GetSystemLanguage(), status);
icu::Locale systemLocale = icu::Locale::forLanguageTag(Global::I18n::LocaleConfig::GetSystemLocale(), status);
resConfig->SetLocaleInfo(systemLocale);
if (Global::I18n::PreferredLanguage::IsSetAppPreferredLanguage()) {

View File

@ -1005,7 +1005,7 @@ std::shared_ptr<Global::Resource::ResourceManager> AbilityRecord::CreateResource
{
HITRACE_METER_NAME(HITRACE_TAG_APP, __PRETTY_FUNCTION__);
UErrorCode status = U_ZERO_ERROR;
icu::Locale locale = icu::Locale::forLanguageTag(Global::I18n::LocaleConfig::GetSystemLanguage(), status);
icu::Locale locale = icu::Locale::forLanguageTag(Global::I18n::LocaleConfig::GetSystemLocale(), status);
std::unique_ptr<Global::Resource::ResConfig> resConfig(Global::Resource::CreateResConfig());
resConfig->SetLocaleInfo(locale);
AppExecFwk::Configuration cfg;

View File

@ -4408,7 +4408,7 @@ void AppMgrServiceInner::InitGlobalConfiguration()
#ifdef SUPPORT_SCREEN
// Currently only this interface is known
auto language = OHOS::Global::I18n::LocaleConfig::GetSystemLanguage();
auto language = OHOS::Global::I18n::LocaleConfig::GetSystemLocale();
TAG_LOGI(AAFwkTag::APPMGR, "current global language: %{public}s", language.c_str());
configuration_->AddItem(AAFwk::GlobalConfigurationKey::SYSTEM_LANGUAGE, language);
#endif