mirror of
https://gitee.com/openharmony/ability_ability_runtime
synced 2024-12-02 20:47:11 +00:00
systemlanguage改为systemlocale
Signed-off-by: LY <liuyong235@huawei.com>
This commit is contained in:
parent
df46edf409
commit
114d281086
@ -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,
|
||||
|
@ -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()) {
|
||||
|
@ -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;
|
||||
|
@ -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
|
||||
|
Loading…
Reference in New Issue
Block a user