From 1981f6483938096c785b5585f65a970f0efee33d Mon Sep 17 00:00:00 2001 From: LY Date: Wed, 28 Aug 2024 09:33:53 +0000 Subject: [PATCH] update frameworks/intl/src/locale_config.cpp. Signed-off-by: LY --- frameworks/intl/src/locale_config.cpp | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/frameworks/intl/src/locale_config.cpp b/frameworks/intl/src/locale_config.cpp index df6f42d8..90528568 100644 --- a/frameworks/intl/src/locale_config.cpp +++ b/frameworks/intl/src/locale_config.cpp @@ -1199,9 +1199,6 @@ I18nErrorCode LocaleConfig::SetSystemLanguage(const std::string &languageTag) } std::string newLocaleTag = UpdateLanguageOfLocale(languageTag); if (SetSystemLocale(newLocaleTag) == I18nErrorCode::SUCCESS) { -#ifdef SUPPORT_GRAPHICS - UpdateConfiguration(AAFwk::GlobalConfigurationKey::SYSTEM_LANGUAGE, languageTag); -#endif MultiUsers::SaveLanguage("", languageTag); return I18nErrorCode::SUCCESS; } @@ -1231,6 +1228,7 @@ I18nErrorCode LocaleConfig::SetSystemLocale(const std::string &localeTag) } MultiUsers::SaveLocale("", localeTag); #ifdef SUPPORT_GRAPHICS + UpdateConfiguration(AAFwk::GlobalConfigurationKey::SYSTEM_LANGUAGE, localeTag); return PublishCommonEvent(EventFwk::CommonEventSupport::COMMON_EVENT_LOCALE_CHANGED); #else return I18nErrorCode::SUCCESS;