/foundation/arkui/ace_engine/adapter/preview/entrance/ |
H A D | ace_application_info.cpp | 36 void AceApplicationInfoImpl::ChangeLocale(const std::string& language, const std::string& countryOrRegion) in ChangeLocale() argument 41 std::string countryOrRegionUpper = countryOrRegion; in ChangeLocale() 42 std::transform(countryOrRegion.begin(), countryOrRegion.end(), countryOrRegionUpper.begin(), ::tolower); in ChangeLocale() 53 auto script = Localization::ComputeScript(language, countryOrRegion); in ChangeLocale() 60 void AceApplicationInfoImpl::SetLocale(const std::string& language, const std::string& countryOrRegion, in SetLocale() argument 64 countryOrRegion_ = countryOrRegion; in SetLocale() 65 script_ = (!script.empty()) ? script : Localization::ComputeScript(language, countryOrRegion); in SetLocale() 76 icu::Locale locale(language_.c_str(), countryOrRegion.c_str()); in SetLocale()
|
H A D | ace_application_info.h | 29 void SetLocale(const std::string& language, const std::string& countryOrRegion, const std::string& script, 31 void ChangeLocale(const std::string& language, const std::string& countryOrRegion) override;
|
/foundation/arkui/ace_engine/adapter/ohos/entrance/ |
H A D | ace_application_info.cpp | 40 void AceApplicationInfoImpl::ChangeLocale(const std::string& language, const std::string& countryOrRegion) in ChangeLocale() argument 45 std::string countryOrRegionUpper = countryOrRegion; in ChangeLocale() 46 std::transform(countryOrRegion.begin(), countryOrRegion.end(), countryOrRegionUpper.begin(), ::tolower); in ChangeLocale() 53 auto script = Localization::ComputeScript(language, countryOrRegion); in ChangeLocale() 60 void AceApplicationInfoImpl::SetLocale(const std::string& language, const std::string& countryOrRegion, in SetLocale() argument 64 countryOrRegion_ = countryOrRegion; in SetLocale() 76 icu::Locale locale(language_.c_str(), countryOrRegion.c_str()); in SetLocale()
|
H A D | ace_application_info.h | 38 void SetLocale(const std::string& language, const std::string& countryOrRegion, const std::string& script, 40 void ChangeLocale(const std::string& language, const std::string& countryOrRegion) override;
|
/foundation/arkui/ace_engine/interfaces/napi/kits/configuration/ |
H A D | js_configuration.cpp | 32 std::string countryOrRegion = OHOS::Ace::AceApplicationInfo::GetInstance().GetCountryOrRegion(); in JSConfigurationGetLocale() local 37 size_t countryOrRegionLen = countryOrRegion.length(); in JSConfigurationGetLocale() 46 napi_create_string_utf8(env, countryOrRegion.c_str(), countryOrRegionLen, &resultArray[1]); in JSConfigurationGetLocale() 53 napi_set_named_property(env, result, "countryOrRegion", resultArray[1]); in JSConfigurationGetLocale()
|
/foundation/arkui/ace_engine/test/mock/adapter/ |
H A D | mock_ace_application_info.cpp | 20 void SetLocale(const std::string& language, const std::string& countryOrRegion, const std::string& script, 23 void ChangeLocale(const std::string& language, const std::string& countryOrRegion) override {}
|
/foundation/arkui/ace_engine/test/mock/core/common/ |
H A D | mock_ace_application_info.cpp | 20 void SetLocale(const std::string& language, const std::string& countryOrRegion, const std::string& script, 25 void ChangeLocale(const std::string& language, const std::string& countryOrRegion) override {}
|
/foundation/arkui/ace_engine/test/unittest/core/pattern/time_picker/ |
H A D | time_picker_order_test_ng.cpp | 160 const std::string countryOrRegion = "CN"; in HWTEST_F() local 224 const std::string countryOrRegion = "US"; in HWTEST_F() local 288 const std::string countryOrRegion = ""; in HWTEST_F() local 352 const std::string countryOrRegion = ""; in HWTEST_F() local 416 const std::string countryOrRegion = ""; in HWTEST_F() local 480 const std::string countryOrRegion = ""; in HWTEST_F() local 544 const std::string countryOrRegion = ""; in HWTEST_F() local 608 const std::string countryOrRegion = ""; in HWTEST_F() local 672 const std::string countryOrRegion = "CN"; in HWTEST_F() local 737 const std::string countryOrRegion in HWTEST_F() local 806 const std::string countryOrRegion = ""; HWTEST_F() local 875 const std::string countryOrRegion = ""; HWTEST_F() local 944 const std::string countryOrRegion = ""; HWTEST_F() local 1013 const std::string countryOrRegion = ""; HWTEST_F() local 1082 const std::string countryOrRegion = ""; HWTEST_F() local 1151 const std::string countryOrRegion = ""; HWTEST_F() local 1220 const std::string countryOrRegion = ""; HWTEST_F() local 1285 const std::string countryOrRegion = ""; HWTEST_F() local 1350 const std::string countryOrRegion = "CN"; HWTEST_F() local 1417 const std::string countryOrRegion = "US"; HWTEST_F() local 1484 const std::string countryOrRegion = "CN"; HWTEST_F() local 1551 const std::string countryOrRegion = "CN"; HWTEST_F() local 1615 const std::string countryOrRegion = "US"; HWTEST_F() local 1679 const std::string countryOrRegion = ""; HWTEST_F() local 1743 const std::string countryOrRegion = ""; HWTEST_F() local 1807 const std::string countryOrRegion = ""; HWTEST_F() local 1871 const std::string countryOrRegion = ""; HWTEST_F() local [all...] |
/foundation/arkui/ace_engine/frameworks/core/common/ |
H A D | ace_application_info.h | 55 virtual void SetLocale(const std::string& language, const std::string& countryOrRegion, const std::string& script, 57 virtual void ChangeLocale(const std::string& language, const std::string& countryOrRegion) = 0;
|
/foundation/arkui/ace_engine/frameworks/base/i18n/ |
H A D | localization.h | 76 static void SetLocale(const std::string& language, const std::string& countryOrRegion, const std::string& script, 272 void SetLocaleImpl(const std::string& language, const std::string& countryOrRegion, const std::string& script,
|
H A D | localization.cpp | 39 LocaleProxy(const char* language, const char* countryOrRegion, const char* variant, const char* keywordsAndValues) in LocaleProxy() 40 : instance(language, countryOrRegion, variant, keywordsAndValues) in LocaleProxy() 179 void Localization::SetLocaleImpl(const std::string& language, const std::string& countryOrRegion, in SetLocaleImpl() argument 182 locale_ = std::make_unique<LocaleProxy>(language.c_str(), countryOrRegion.c_str(), "", keywordsAndValues.c_str()); in SetLocaleImpl() 203 if (!countryOrRegion.empty()) { in SetLocaleImpl() 204 languageTag_.append("-").append(countryOrRegion); in SetLocaleImpl() 970 void Localization::SetLocale(const std::string& language, const std::string& countryOrRegion, const std::string& script, in SetLocale() argument 994 instance->SetLocaleImpl(language, countryOrRegion, script, selectLanguage, keywordsAndValues); in SetLocale()
|
/foundation/arkui/ace_engine/test/mock/base/ |
H A D | mock_localization.cpp | 27 void Localization::SetLocaleImpl(const std::string& language, const std::string& countryOrRegion, in SetLocaleImpl() argument
|
/foundation/arkui/ace_engine/test/unittest/core/pattern/calendar_picker/ |
H A D | calendar_picker_test_ng.cpp | 277 const std::string countryOrRegion = ""; in HWTEST_F() local 281 Localization::GetInstance()->SetLocaleImpl(language, countryOrRegion, script, selected, keywordsAndValues); in HWTEST_F() 320 const std::string countryOrRegion = ""; in HWTEST_F() local 324 Localization::GetInstance()->SetLocaleImpl(language, countryOrRegion, script, selected, keywordsAndValues); in HWTEST_F() 364 const std::string countryOrRegion = ""; in HWTEST_F() local 368 Localization::GetInstance()->SetLocaleImpl(language, countryOrRegion, script, selected, keywordsAndValues); in HWTEST_F() 1898 const std::string countryOrRegion = ""; in HWTEST_F() local 1902 Localization::GetInstance()->SetLocaleImpl(language, countryOrRegion, script, selected, keywordsAndValues); in HWTEST_F() 1927 const std::string countryOrRegion = ""; in HWTEST_F() local 1931 Localization::GetInstance()->SetLocaleImpl(language, countryOrRegion, scrip in HWTEST_F() 1957 const std::string countryOrRegion = ""; HWTEST_F() local [all...] |
/foundation/arkui/ace_engine/frameworks/bridge/plugin_frontend/ |
H A D | plugin_frontend_delegate.h | 194 void ChangeLocale(const std::string& language, const std::string& countryOrRegion) override;
|
H A D | plugin_frontend_delegate.cpp | 133 void PluginFrontendDelegate::ChangeLocale(const std::string& language, const std::string& countryOrRegion) in ChangeLocale() argument 136 [language, countryOrRegion]() { AceApplicationInfo::GetInstance().ChangeLocale(language, countryOrRegion); }, in ChangeLocale()
|
/foundation/arkui/ace_engine/frameworks/bridge/js_frontend/ |
H A D | frontend_delegate.h | 217 virtual void ChangeLocale(const std::string& language, const std::string& countryOrRegion) = 0;
|
H A D | frontend_delegate_impl.h | 299 void ChangeLocale(const std::string& language, const std::string& countryOrRegion) override;
|
H A D | frontend_delegate_impl.cpp | 160 void FrontendDelegateImpl::ChangeLocale(const std::string& language, const std::string& countryOrRegion) in ChangeLocale() argument 163 [language, countryOrRegion]() { AceApplicationInfo::GetInstance().ChangeLocale(language, countryOrRegion); }, in ChangeLocale()
|
/foundation/arkui/ace_engine/test/unittest/core/pattern/picker/ |
H A D | date_picker_order_test.cpp | 241 const std::string countryOrRegion = "US"; in HWTEST_F() local 273 AceApplicationInfo::GetInstance().SetLocale(language, countryOrRegion, script, keywordsAndValues); in HWTEST_F() 303 const std::string countryOrRegion = "CN"; in HWTEST_F() local 335 AceApplicationInfo::GetInstance().SetLocale(language, countryOrRegion, script, keywordsAndValues); in HWTEST_F() 365 const std::string countryOrRegion = "CN"; in HWTEST_F() local 397 AceApplicationInfo::GetInstance().SetLocale(language, countryOrRegion, script, keywordsAndValues); in HWTEST_F()
|
/foundation/arkui/ace_engine/frameworks/bridge/declarative_frontend/ng/ |
H A D | frontend_delegate_declarative_ng.cpp | 551 void FrontendDelegateDeclarativeNG::ChangeLocale(const std::string& language, const std::string& countryOrRegion) in ChangeLocale() argument 554 [language, countryOrRegion]() { AceApplicationInfo::GetInstance().ChangeLocale(language, countryOrRegion); }, in ChangeLocale()
|
H A D | frontend_delegate_declarative_ng.h | 205 void ChangeLocale(const std::string& language, const std::string& countryOrRegion) override;
|
/foundation/arkui/ace_engine/frameworks/bridge/js_frontend/engine/jsi/ |
H A D | jsi_engine.cpp | 706 shared_ptr<JsValue> countryOrRegion = runtime->NewString(AceApplicationInfo::GetInstance().GetCountryOrRegion()); in GetLocale() local 712 res->SetProperty(runtime, LOCALE_COUNTRY_OR_REGION, countryOrRegion); in GetLocale() 726 std::string countryOrRegion; in SetLocale() local 729 countryOrRegion = localeJson->GetValue(LOCALE_COUNTRY_OR_REGION)->GetString(); in SetLocale() 731 if (!countryOrRegion.empty() && !language.empty()) { in SetLocale() 732 GetFrontendDelegate(runtime)->ChangeLocale(language, countryOrRegion); in SetLocale()
|
/foundation/arkui/ace_engine/frameworks/bridge/declarative_frontend/ |
H A D | frontend_delegate_declarative.h | 268 void ChangeLocale(const std::string& language, const std::string& countryOrRegion) override;
|
H A D | frontend_delegate_declarative.cpp | 202 void FrontendDelegateDeclarative::ChangeLocale(const std::string& language, const std::string& countryOrRegion) in ChangeLocale() argument 205 [language, countryOrRegion]() { AceApplicationInfo::GetInstance().ChangeLocale(language, countryOrRegion); }, in ChangeLocale()
|
/foundation/arkui/ace_engine/test/unittest/core/pattern/text_picker/ |
H A D | text_picker_pattern_test_ng.cpp | 1004 const std::string countryOrRegion = "US"; in HWTEST_F() local 1030 AceApplicationInfo::GetInstance().SetLocale(language, countryOrRegion, script, keywordsAndValues); in HWTEST_F()
|