Home
last modified time | relevance | path

Searched refs:language (Results 1 – 25 of 4135) sorted by relevance

12345678910>>...166

/base/update/update_app/product/oh/base/src/main/ets/MainAbility/
DMainAbility.ts35 private language: string = ''; property in MainAbility
42 this.language = this.context.config.language;
72 …his.log(`onConfigurationUpdated: this.language=${this.language}, config.language=${config?.languag…
73 if (config && this.language !== config.language) {
75 this.language = config.language;
76 AppStorage.SetOrCreate('configLanguage', config.language);
/base/global/i18n/frameworks/intl/src/
Dtaboo.cpp94 std::string Taboo::ReplaceLanguageName(const std::string& language, const std::string& displayLangu… in ReplaceLanguageName() argument
101 if (supportedLanguages.find(language) == supportedLanguages.end()) { in ReplaceLanguageName()
103 language.c_str()); in ReplaceLanguageName()
106 std::string key = languageKey + language; in ReplaceLanguageName()
127 language.c_str()); in ReplaceLanguageName()
214 std::tuple<std::string, std::string> Taboo::LanguageFallBack(const std::string& language) in LanguageFallBack() argument
222 int32_t score = LocaleCompare::Compare(language, resLanguage); in LanguageFallBack()
247 std::string language = GetLanguageFromFileName(fileName); in ReadResourceList() local
248 resources[language] = fileName; in ReadResourceList()
258 std::string language = fileName.substr(4); in GetLanguageFromFileName() local
[all …]
Dlocale_config.cpp236 string GetDisplayLanguageInner(const string &language, const string &displayLocaleTag, bool sentenc… in GetDisplayLanguageInner() argument
240 …if (!language.compare(0, 2, "zh") || !language.compare(0, 2, "fa") || !language.compare(0, 2, "ro"… in GetDisplayLanguageInner()
248 icu::Locale tempLocale = icu::Locale::forLanguageTag(language.c_str(), status); in GetDisplayLanguageInner()
260 icu::Locale locale = icu::Locale::forLanguageTag(language, status); in GetDisplayLanguageInner()
349 bool LocaleConfig::SetSystemLanguage(const string &language) in SetSystemLanguage() argument
354 if (!IsValidTag(language)) { in SetSystemLanguage()
358 if (SetParameter(LANGUAGE_KEY, language.data()) == 0) { in SetSystemLanguage()
359 bool isUpdateSuccess = UpdateSystemLocale(language); in SetSystemLanguage()
364 configuration.AddItem(AAFwk::GlobalConfigurationKey::SYSTEM_LANGUAGE, language); in SetSystemLanguage()
427 bool LocaleConfig::IsValidLanguage(const string &language) in IsValidLanguage() argument
[all …]
Dpreferred_language.cpp41 int index, const std::string& language) in AddPreferredLanguageExist() argument
56 preferredLanguageList[index] = language; in AddPreferredLanguageExist()
67 const std::string& language) in AddPreferredLanguageNonExist() argument
69 preferredLanguageList.insert(preferredLanguageList.begin() + index, language); in AddPreferredLanguageNonExist()
79 void PreferredLanguage::AddPreferredLanguage(const std::string &language, int index, I18nErrorCode … in AddPreferredLanguage() argument
85 if (!IsValidTag(language)) { in AddPreferredLanguage()
99 if (preferredLanguageList[i] == language) { in AddPreferredLanguage()
106 status = AddPreferredLanguageNonExist(preferredLanguageList, idx, language); in AddPreferredLanguage()
111 status = AddPreferredLanguageExist(preferredLanguageList, languageIdx, idx, language); in AddPreferredLanguage()
320 bool PreferredLanguage::IsValidLanguage(const std::string &language) in IsValidLanguage() argument
[all …]
Dlocale_compare.cpp225 std::string language = key.substr(0, languageLength); in HasMapRelation() local
227 extendedHantParent[language + hantSegment + region] = it->second; in HasMapRelation()
239 std::string language = key.substr(0, languageLength); in HasMapRelation() local
241 extendedLatnParent[language + latnSegment + region] = it->second; in HasMapRelation()
242 if (language.compare("en") == 0) { in HasMapRelation()
243 extendedLatnParent[language + qaagSegment + region] = it->second; in HasMapRelation()
Dtaboo_utils.cpp37 std::string TabooUtils::ReplaceLanguageName(const std::string& language, const std::string& display… in ReplaceLanguageName() argument
41 return taboo->ReplaceLanguageName(language, displayLanguage, name); in ReplaceLanguageName()
/base/update/update_app/common/src/main/ets/util/
DDeviceUtils.ets12 * See the License for the specific language governing permissions and
49 let language = i18n.getSystemLanguage();
50 if (language == "zh-Hans") {
51 language = "zh-cn";
53 language = "en-us";
55 return language;
/base/update/update_app/feature/ota/src/main/ets/util/
DChangelogParseUtils.ets12 * See the License for the specific language governing permissions and
53 changelog = { language: new Map() };
86 if (element['_type'] === 'element' && element['_name'] === 'default-language') {
88 logInfo('default-language :' + attribute);
105 let language: Language = { featuresArray: [] };
106 if (element['_type'] === 'element' && element['_name'] === 'language') {
109 logError('language is null :' + JSON.stringify(element['_attributes']));
114 language.language = attribute;
115 changelog.language.set(language.language, language);
121 parseFeatures(languageElement, language, icons);
[all …]
/base/global/i18n_lite/frameworks/i18n/src/
Dlocale_info.cpp49 I18nFree(static_cast<void *>(language)); in Init()
50 language = NewArrayAndCopy(newLang, langLength); in Init()
69 if (language == nullptr) { in InitIdstr()
72 std::string idStr(language); in InitIdstr()
119 Init(o.language, o.script, o.region, status); in LocaleInfo()
132 I18nFree(static_cast<void *>(language)); in FreeResource()
141 bool ret = CompareLocaleItem(language, other.language); in operator ==()
159 if (o.language != nullptr) { in operator =()
160 language = NewArrayAndCopy(o.language, strlen(o.language)); in operator =()
179 return language; in GetLanguage()
[all …]
/base/global/i18n/interfaces/native/inner_api/preferred_language/include/
Dpreferred_language.h28 …static void AddPreferredLanguage(const std::string& language, int index, I18nErrorCode &errorCode);
39 const std::string& language);
41 const std::string& language);
42 static bool IsValidLanguage(const std::string &language);
/base/update/update_app/feature/ota/src/main/ets/components/
DChangelogContent.ets12 * See the License for the specific language governing permissions and
112 let language = DeviceUtils.getSystemLanguage();
113 changelogInfo.headFeatures = this.getHeaderFeatures(data, language);
114 changelogInfo.endFeatures = this.getEndFeatures(data, language);
115 changelogInfo.contentFeatures = this.getContentFeatures(data, language);
128 private getHeaderFeatures(changelog: Changelog, language: string): Features {
129 return this.getTargetFeatures(changelog, language, 'header');
132 private getEndFeatures(changelog: Changelog, language: string): Features{
133 return this.getTargetFeatures(changelog, language, 'end');
136 private getContentFeatures(changelog: Changelog, language: string): Array<Features> {
[all …]
/base/global/resource_management_lite/frameworks/resmgr_lite/src/
Dglobal.c55 int32_t GLOBAL_GetLanguage(char *language, uint8_t len) in GLOBAL_GetLanguage() argument
57 if (language == NULL || len == 0) { in GLOBAL_GetLanguage()
73 …return (strncpy_s(language, len, localeArray[0], MAX_LANGUAGE_LENGTH - 1) != EOK) ? MC_FAILURE : M… in GLOBAL_GetLanguage()
98 char language[MAX_LANGUAGE_LENGTH] = { 0 }; in GLOBAL_IsRTL() local
99 if (strncpy_s(language, MAX_LANGUAGE_LENGTH, localeArray[0], MAX_LANGUAGE_LENGTH - 1) != EOK) { in GLOBAL_IsRTL()
102 …if ((strcmp(language, "fa") == 0) || (strcmp(language, "ar") == 0) || (strcmp(language, "ur") == 0… in GLOBAL_IsRTL()
103 … (strcmp(language, "ug") == 0) || (strcmp(language, "he") == 0) || (strcmp(language, "iw") == 0)) { in GLOBAL_IsRTL()
Dglobal.cpp70 std::string language; in GLOBAL_ConfigLanguage() local
75 language.assign(appLanguage, indexStart); in GLOBAL_ConfigLanguage()
78 g_resConfig->SetLocaleInfo(language.c_str(), script.c_str(), region.c_str()); in GLOBAL_ConfigLanguage()
80 language.assign(appLanguage, indexStart); in GLOBAL_ConfigLanguage()
82 g_resConfig->SetLocaleInfo(language.c_str(), nullptr, region.c_str()); in GLOBAL_ConfigLanguage()
89 int32_t GLOBAL_GetLanguage(char *language, uint8_t len) in GLOBAL_GetLanguage() argument
95 if (language == nullptr || len == 0) { in GLOBAL_GetLanguage()
98 if (strncpy_s(language, len, g_resConfig->GetLocaleInfo()->GetLanguage(), in GLOBAL_GetLanguage()
Dres_locale.cpp41 RState ResLocale::SetLanguage(const char *language, size_t len) in SetLanguage() argument
56 *(temp + i) = tolower(*(language + i)); in SetLanguage()
111 RState ResLocale::Init(const char *language, size_t languageLen, const char *script, size_t scriptL… in Init() argument
114 RState r = this->SetLanguage(language, languageLen); in Init()
270 ResLocale *ResLocale::BuildFromParts(const char *language, in BuildFromParts() argument
275 size_t len = Utils::StrLen(language); in BuildFromParts()
287 if (LocaleMatcher::IsLanguageTag(language, len)) { in BuildFromParts()
288 tempLanguage = language; in BuildFromParts()
381 LocaleInfo *BuildFromParts(const char *language, const char *script, const char *region, RState &rS… in BuildFromParts() argument
383 size_t len = Utils::StrLen(language); in BuildFromParts()
[all …]
/base/global/i18n/frameworks/intl/include/
Dlocale_config.h32 static bool SetSystemLanguage(const std::string &language);
40 static bool IsSuggested(const std::string &language);
41 static bool IsSuggested(const std::string &language, const std::string &region);
42 …static std::string GetDisplayLanguage(const std::string &language, const std::string &displayLocal…
58 static bool IsValidLanguage(const std::string &language);
62 static bool UpdateSystemLocale(const std::string &language);
113 static std::string GetMainLanguage(const std::string &language);
114 …static std::string GetDsiplayLanguageWithDialect(const std::string &language, const std::string &d…
/base/global/i18n/frameworks/intl/etc/
Dlanguage_config.para11 # See the License for the specific language governing permissions and
13 persist.global.language=zh-Hans
15 const.global.language=zh-Hans
Dlanguage_config.para.dac11 # See the License for the specific language governing permissions and
14 persist.global.language = root:root:0775
19 const.global.language = root:root:0444
/base/global/resource_management_lite/frameworks/resmgr_lite/include/
Dres_locale.h83 …static ResLocale *BuildFromParts(const char *language, const char *script, const char *region, RSt…
98 RState SetLanguage(const char *language, size_t len);
108 RState Init(const char *language, size_t languageLen, const char *script, size_t scriptLen,
Dres_config.h29 virtual RState SetLocaleInfo(const char *language, const char *script, const char *region) = 0;
60 LocaleInfo *BuildFromParts(const char *language, const char *script, const char *region, RState &rS…
/base/global/resource_management/frameworks/resmgr/include/
Dres_locale.h89 …static ResLocale *BuildFromParts(const char *language, const char *script, const char *region, RSt…
104 RState SetLanguage(const char *language, size_t len);
114 RState Init(const char *language, size_t languageLen, const char *script, size_t scriptLen,
/base/global/resource_management/frameworks/resmgr/src/
Dres_locale.cpp45 RState ResLocale::SetLanguage(const char *language, size_t len) in SetLanguage() argument
60 *(temp + i) = tolower(*(language + i)); in SetLanguage()
115 RState ResLocale::Init(const char *language, size_t languageLen, const char *script, size_t scriptL… in Init() argument
118 RState r = this->SetLanguage(language, languageLen); in Init()
276 ResLocale *ResLocale::BuildFromParts(const char *language, const char *script, const char *region, … in BuildFromParts() argument
278 size_t len = Utils::StrLen(language); in BuildFromParts()
290 if (!LocaleMatcher::IsLanguageTag(language, len)) { in BuildFromParts()
294 tempLanguage = language; in BuildFromParts()
387 Locale *BuildFromParts(const char *language, const char *script, const char *region, RState &rState) in BuildFromParts() argument
389 size_t len = Utils::StrLen(language); in BuildFromParts()
[all …]
/base/global/resource_management_lite/frameworks/resmgr_lite/include/utils/
Dutils.h35 static uint16_t EncodeLanguage(const char *language);
49 static uint64_t EncodeLocale(const char *language,
/base/update/update_app/common/src/main/ets/const/
Dupdate_const.ts220 language: Map<string, Language>; property
232 language?: string; property
/base/global/resource_management/
DREADME.md11 …oading multi-language GUI resources for applications, for example, displaying the application name…
32 **Development language**: JavaScript
/base/global/resource_management_lite/frameworks/resmgr_lite/src/utils/
Dutils.cpp91 uint16_t Utils::EncodeLanguage(const char *language) in EncodeLanguage() argument
93 if (Utils::IsStrEmpty(language)) { in EncodeLanguage()
96 return Utils::EncodeLanguageOrRegion(language, 'a'); in EncodeLanguage()
110 uint64_t Utils::EncodeLocale(const char *language, in EncodeLocale() argument
114 uint16_t languageData = Utils::EncodeLanguage(language); in EncodeLocale()

12345678910>>...166