/foundation/ability/form_fwk/services/src/ |
H A D | form_resource_observer.cpp | 12 * See the License for the specific language governing permissions and 46 std::string language = configuration.GetItem(AAFwk::GlobalConfigurationKey::SYSTEM_LANGUAGE); in OnConfigurationUpdated() local 47 if (!language.empty() && language != language_) { in OnConfigurationUpdated() 48 HILOG_INFO("language:%{public}s", language.c_str()); in OnConfigurationUpdated() 50 language_ = language; in OnConfigurationUpdated()
|
/foundation/arkui/ace_engine_lite/frameworks/src/core/base/ |
H A D | locale_util.cpp | 12 * See the License for the specific language governing permissions and
46 // set the language and region info
in GetLocaleInfo() 49 // set the language, region and script info
in GetLocaleInfo() 64 char *language = nullptr;
in GetSystemLocaleInfo() local 67 language = reinterpret_cast<char *>(ace_malloc(MAX_LANGUAGE_LENGTH));
in GetSystemLocaleInfo() 69 if ((language == nullptr) || (region == nullptr)) {
in GetSystemLocaleInfo() 73 int langRet = GLOBAL_GetLanguage(language, MAX_LANGUAGE_LENGTH);
in GetSystemLocaleInfo() 76 HILOG_ERROR(HILOG_MODULE_ACE, "get system language info failed");
in GetSystemLocaleInfo() 79 info = new LocaleInfo(language, region);
in GetSystemLocaleInfo() 81 ACE_FREE(language);
in GetSystemLocaleInfo() [all...] |
/foundation/arkui/ace_engine/adapter/preview/entrance/ |
H A D | ace_application_info.cpp | 12 * See the License for the specific language governing permissions and 36 void AceApplicationInfoImpl::ChangeLocale(const std::string& language, const std::string& countryOrRegion) in ChangeLocale() argument 38 std::string languageLower = language; in ChangeLocale() 39 std::transform(language.begin(), language.end(), languageLower.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 63 language_ = language; in SetLocale() 65 script_ = (!script.empty()) ? script : Localization::ComputeScript(language, countryOrRegion); in SetLocale() 68 localeTag_ = language; in SetLocale() [all...] |
H A D | ace_application_info.h | 12 * See the License for the specific language governing permissions and 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 | 12 * See the License for the specific language governing permissions and 40 void AceApplicationInfoImpl::ChangeLocale(const std::string& language, const std::string& countryOrRegion) in ChangeLocale() argument 42 std::string languageLower = language; in ChangeLocale() 43 std::transform(language.begin(), language.end(), languageLower.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 63 language_ = language; in SetLocale() 68 localeTag_ = language; in SetLocale()
|
H A D | ace_application_info.h | 12 * See the License for the specific language governing permissions and 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/bundlemanager/bundle_framework/services/bundlemgr/src/bundle_resource/ |
H A D | bundle_resource_observer.cpp | 12 * See the License for the specific language governing permissions and 46 std::string language = configuration.GetItem(AAFwk::GlobalConfigurationKey::SYSTEM_LANGUAGE); in OnConfigurationUpdated() local 47 if (!language.empty() && (language != BundleSystemState::GetInstance().GetSystemLanguage())) { in OnConfigurationUpdated() 48 APP_LOGI("language change %{public}s", language.c_str()); in OnConfigurationUpdated() 68 std::thread systemLanguageChangedThread(OnSystemLanguageChange, language, type); in OnConfigurationUpdated() 78 BundleSystemState::GetInstance().SetSystemLanguage(language); in OnConfigurationUpdated() 94 void BundleResourceObserver::OnSystemLanguageChange(const std::string &language, const uint32_t type) in OnSystemLanguageChange() argument 97 callback.OnSystemLanguageChange(language, typ in OnSystemLanguageChange() [all...] |
H A D | bundle_resource_param.cpp | 12 * See the License for the specific language governing permissions and 32 std::string language = GetSystemParam(SYSTEM_LANGUAGE); in GetSystemLanguage() local 33 return language.empty() ? DEFAULT_LANGUAGE : language; in GetSystemLanguage()
|
H A D | bundle_resource_callback.cpp | 12 * See the License for the specific language governing permissions and 60 bool BundleResourceCallback::OnSystemLanguageChange(const std::string &language, const uint32_t type) in OnSystemLanguageChange() argument 62 APP_LOGI("start, language %{public}s", language.c_str()); in OnSystemLanguageChange() 63 if (language == BundleSystemState::GetInstance().GetSystemLanguage()) { in OnSystemLanguageChange() 64 APP_LOGD("current language is %{public}s no change", language.c_str()); in OnSystemLanguageChange() 67 BundleSystemState::GetInstance().SetSystemLanguage(language); in OnSystemLanguageChange() 84 APP_LOGI("end, language %{public}s", language in OnSystemLanguageChange() [all...] |
/foundation/ability/idl_tool/codegen/ |
H A D | code_generator.cpp | 12 * See the License for the specific language governing permissions and 29 MetaComponent* mc, const String& language, const String& dir, const Options::Attribute& att) in CodeGenerator() 30 : targetLanguage_(language), in CodeGenerator() 34 if (language.Equals("rust")) { in CodeGenerator() 36 } else if (language.Equals("cpp")) { in CodeGenerator() 38 } else if (language.Equals("ts")) { in CodeGenerator() 41 Logger::E(tag, "Unknown language: %s.", language.string()); in CodeGenerator() 28 CodeGenerator( MetaComponent* mc, const String& language, const String& dir, const Options::Attribute& att) CodeGenerator() argument
|
/foundation/arkui/ace_engine_lite/frameworks/tools/qt/simulator/jsfwk/targets/simulator/mock/ |
H A D | global_impl_mock.cpp | 12 * See the License for the specific language governing permissions and 26 int32_t GLOBAL_GetLanguage(char *language, uint8_t len) in GLOBAL_GetLanguage() argument 28 if (language == nullptr || len == 0) { in GLOBAL_GetLanguage() 32 // language must be the element 0; in GLOBAL_GetLanguage() 33 return (strncpy_s(language, len, "zh", MAX_LANGUAGE_LENGTH - 1) != EOK) ? -1 : 0; in GLOBAL_GetLanguage()
|
/foundation/arkui/ace_engine/frameworks/base/i18n/ |
H A D | date_time_sequence.cpp | 12 * See the License for the specific language governing permissions and 32 const char* language = localeObj.getBaseName(); in GetDateOrder() local 33 if (language == nullptr) { in GetDateOrder() 44 std::string languageTag = language; in GetDateOrder() 85 const char* language = localeObj.getBaseName(); in GetDateTimeOrder() local 86 std::string languageTag = language == nullptr ? "" : language; in GetDateTimeOrder() 121 const char* language = localeObj.getBaseName(); in GetAmPmTimeOrder() local 131 std::string languageTag = language == nullptr ? "" : language; in GetAmPmTimeOrder() [all...] |
H A D | localization.cpp | 12 * See the License for the specific language governing permissions and 39 LocaleProxy(const char* language, const char* countryOrRegion, const char* variant, const char* keywordsAndValues) in LocaleProxy() 40 : instance(language, countryOrRegion, variant, keywordsAndValues) in LocaleProxy() 145 void GetLocalJsonObject(InternalResource::ResourceId id, std::string language, std::unique_ptr<JsonValue>& indexJson, in GetLocalJsonObject() argument 164 if (indexJson->Contains(language) && indexJson->GetValue(language)->IsObject()) { in GetLocalJsonObject() 165 json = indexJson->GetValue(language); in GetLocalJsonObject() 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() 199 languageTag_ = language; in SetLocaleImpl() 373 std::string language = locale_->instance.getLanguage(); GetDateOrder() local 512 auto language = locale_->instance.getLanguage(); GetWeekdays() local 759 std::string language = locale_->instance.getLanguage(); GetLetters() local 808 auto language = selectLanguage_; GetEntryLetters() local 845 auto language = selectLanguage_; GetErrorDescription() local 870 GetLanguageList(const std::string& language) GetLanguageList() argument 970 SetLocale(const std::string& language, const std::string& countryOrRegion, const std::string& script, const std::string& selectLanguage, const std::string& keywordsAndValues) SetLocale() argument 997 ComputeScript(const std::string& language, const std::string& region) ComputeScript() argument 1008 ParseLocaleTag( const std::string& localeTag, std::string& language, std::string& script, std::string& region, bool needAddSubtags) ParseLocaleTag() argument [all...] |
H A D | localization.h | 12 * See the License for the specific language governing permissions and 68 * Get language list to select the best language. 69 * @return language list which is supported 72 static const std::vector<std::string>& GetLanguageList(const std::string& language); 76 static void SetLocale(const std::string& language, const std::string& countryOrRegion, const std::string& script, 79 static std::string ComputeScript(const std::string& language, const std::string& region); 81 static void ParseLocaleTag(const std::string& languageTag, std::string& language, std::string& script, 272 void SetLocaleImpl(const std::string& language, const std::string& countryOrRegion, const std::string& script,
|
/foundation/ability/form_fwk/services/config/ |
H A D | form_resource_param.cpp | 12 * See the License for the specific language governing permissions and 33 std::string language = GetSystemParam(SYSTEM_LANGUAGE); in GetSystemLanguage() local 34 return language.empty() ? DEFAULT_LANGUAGE : language; in GetSystemLanguage()
|
/foundation/arkui/ace_engine/test/mock/core/common/ |
H A D | mock_ace_application_info.cpp | 12 * See the License for the specific language governing permissions and 20 void SetLocale(const std::string& language, const std::string& countryOrRegion, const std::string& script, 23 language_ = language; 25 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 | 12 * See the License for the specific language governing permissions and 31 std::string language = OHOS::Ace::AceApplicationInfo::GetInstance().GetLanguage(); in JSConfigurationGetLocale() local 36 size_t languageLen = language.length(); in JSConfigurationGetLocale() 45 napi_create_string_utf8(env, language.c_str(), languageLen, &resultArray[0]); in JSConfigurationGetLocale() 52 napi_set_named_property(env, result, "language", resultArray[0]); in JSConfigurationGetLocale()
|
/foundation/ability/idl_tool/test/unittest/codegen_code_generator_test/ |
H A D | codegen_code_generator_test.cpp | 12 * See the License for the specific language governing permissions and 56 String language = "cpp"; in HWTEST_F() local 68 CodeGenerator codeGenerator(&mc, language, dir, att); in HWTEST_F()
|
/foundation/arkui/ace_engine/test/mock/adapter/ |
H A D | mock_ace_application_info.cpp | 12 * See the License for the specific language governing permissions and 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/frameworks/base/resource/ |
H A D | ace_res_config.h | 12 * See the License for the specific language governing permissions and 37 AceResConfig(const std::string& language, const std::string& script, const std::string& region) in AceResConfig() argument 38 : language_(language), script_(script), region_(region) in AceResConfig() 47 AceResConfig(const std::string& language, const std::string& script, const std::string& region, in AceResConfig() argument 50 : language_(language), script_(script), region_(region), screenLong_(screenLong), screenShape_(screenShape), in AceResConfig()
|
/foundation/arkui/ace_engine/frameworks/core/common/ |
H A D | connect_server_manager.h | 12 * See the License for the specific language governing permissions and 35 int32_t instanceId, const std::string& language = "", const std::string& instanceName = "PandaDebugger"); 50 std::string GetInstanceMapMessage(const char* messageType, int32_t instanceId, const std::string& language = "");
|
/foundation/ability/ability_runtime/frameworks/js/napi/inner/napi_common/ |
H A D | napi_common_configuration.cpp | 12 * See the License for the specific language governing permissions and 55 SetPropertyValueByPropertyName(env, jsObject, "language", jsValue); in WrapConfiguration() 104 std::string language {""}; in UnwrapConfiguration() 105 if (UnwrapStringByPropertyName(env, param, "language", language)) { in UnwrapConfiguration() 106 TAG_LOGD(AAFwkTag::JSNAPI, "The parsed language part %{public}s", language.c_str()); in UnwrapConfiguration() 107 if (!config.AddItem(AAFwk::GlobalConfigurationKey::SYSTEM_LANGUAGE, language)) { in UnwrapConfiguration() 108 TAG_LOGE(AAFwkTag::JSNAPI, "language Parsing failed"); in UnwrapConfiguration()
|
/foundation/ability/idl_tool/scripts/ |
H A D | idl.py | 14 # See the License for the specific language governing permissions and 31 parser.add_argument('--language', help='language switch, default cpp') 65 if input_arguments.language == "rust": 67 elif input_arguments.language == "ts":
|
/foundation/arkui/ace_engine/frameworks/bridge/cj_frontend/interfaces/cj_ffi/state_manage/ |
H A D | cj_environment.cpp | 12 * See the License for the specific language governing permissions and 94 LOGW("Initialize is not complete, cannot get the language"); in FfiOHOSAceFrameworkEnvironmentGetLanguageCode() 98 auto language = location->GetLanguage(); in FfiOHOSAceFrameworkEnvironmentGetLanguageCode() local 100 result.value = Utils::MallocCString(language).value; in FfiOHOSAceFrameworkEnvironmentGetLanguageCode()
|
/foundation/bundlemanager/bundle_framework/interfaces/inner_api/appexecfwk_base/src/bundle_resource/ |
H A D | bundle_system_state.cpp | 12 * See the License for the specific language governing permissions and 25 const char* JSON_KEY_LANGUAGE = "language"; 40 void BundleSystemState::SetSystemLanguage(const std::string &language) in SetSystemLanguage() argument 43 language_ = language; in SetSystemLanguage()
|