mirror of
https://gitee.com/openharmony/global_i18n
synced 2024-11-27 09:11:40 +00:00
update frameworks/intl/src/locale_config.cpp.
Signed-off-by: LY <liuyong235@huawei.com>
This commit is contained in:
parent
1bbeabf982
commit
1981f64839
@ -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;
|
||||
|
Loading…
Reference in New Issue
Block a user