Home
last modified time | relevance | path

Searched refs:countryOrRegion (Results 1 - 25 of 27) sorted by relevance

12

/foundation/arkui/ace_engine/adapter/preview/entrance/
H A Dace_application_info.cpp36 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 Dace_application_info.h29 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 Dace_application_info.cpp40 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 Dace_application_info.h38 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 Djs_configuration.cpp32 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 Dmock_ace_application_info.cpp20 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 Dmock_ace_application_info.cpp20 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 Dtime_picker_order_test_ng.cpp160 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 Dace_application_info.h55 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 Dlocalization.h76 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 Dlocalization.cpp39 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 Dmock_localization.cpp27 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 Dcalendar_picker_test_ng.cpp277 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 Dplugin_frontend_delegate.h194 void ChangeLocale(const std::string& language, const std::string& countryOrRegion) override;
H A Dplugin_frontend_delegate.cpp133 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 Dfrontend_delegate.h217 virtual void ChangeLocale(const std::string& language, const std::string& countryOrRegion) = 0;
H A Dfrontend_delegate_impl.h299 void ChangeLocale(const std::string& language, const std::string& countryOrRegion) override;
H A Dfrontend_delegate_impl.cpp160 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 Ddate_picker_order_test.cpp241 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 Dfrontend_delegate_declarative_ng.cpp551 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 Dfrontend_delegate_declarative_ng.h205 void ChangeLocale(const std::string& language, const std::string& countryOrRegion) override;
/foundation/arkui/ace_engine/frameworks/bridge/js_frontend/engine/jsi/
H A Djsi_engine.cpp706 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 Dfrontend_delegate_declarative.h268 void ChangeLocale(const std::string& language, const std::string& countryOrRegion) override;
H A Dfrontend_delegate_declarative.cpp202 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 Dtext_picker_pattern_test_ng.cpp1004 const std::string countryOrRegion = "US"; in HWTEST_F() local
1030 AceApplicationInfo::GetInstance().SetLocale(language, countryOrRegion, script, keywordsAndValues); in HWTEST_F()

Completed in 43 milliseconds

12