/base/global/i18n_lite/interfaces/kits/js/builtin/src/ |
D | locale_module.cpp | 41 char *region = reinterpret_cast<char *>(ace_malloc(MAX_REGION_LENGTH)); in GetRegion() local 42 if (region == nullptr) { in GetRegion() 45 (void)memset_s(region, MAX_REGION_LENGTH, 0x0, MAX_REGION_LENGTH); in GetRegion() 46 if (GLOBAL_GetRegion(region, MAX_REGION_LENGTH) != 0) { in GetRegion() 47 ace_free(region); in GetRegion() 50 return region; in GetRegion() 74 char *region = GetRegion(); in GetLocale() local 75 if (region == nullptr) { in GetLocale() 79 JSI::SetStringProperty(result, "countryOrRegion", region); in GetLocale() 80 ace_free(region); in GetLocale()
|
/base/global/resmgr_lite/frameworks/resmgr_lite/test/unittest/lite/common/ |
D | global_test.cpp | 86 char region[10]; variable 92 ret = GLOBAL_GetRegion(region, 10); 94 ASSERT_EQ(std::string("US"), region); 100 ret = GLOBAL_GetRegion(region, 10); 102 ASSERT_EQ(std::string("US"), region); 108 ret = GLOBAL_GetRegion(region, 10); 110 ASSERT_EQ(std::string("US"), region); 116 ret = GLOBAL_GetRegion(region, 10); 118 ASSERT_EQ(std::string("US"), region);
|
D | test_common.cpp | 69 ResConfig *CreateResConfig(const char *language, const char *script, const char *region) in CreateResConfig() argument 75 resConfig->SetLocaleInfo(language, script, region); in CreateResConfig()
|
D | test_common.h | 40 ResConfig *CreateResConfig(const char *language, const char *script, const char *region);
|
/base/global/i18n_standard/frameworks/intl/include/ |
D | measure_data.h | 25 uint32_t GetMask(const std::string ®ion); 26 void GetDefaultPreferredUnit(const std::string ®ion, const std::string &type, std::vector<std::s… 27 void GetFallbackPreferredUnit(const std::string ®ion, const std::string &usage, std::vector<std:… 28 void GetRestPreferredUnit(const std::string ®ion, const std::string &usage, std::vector<std::str… 29 void GetPreferredUnit(const std::string ®ion, const std::string &usage, std::vector<std::string>…
|
D | locale_config.h | 33 static bool SetSystemRegion(const std::string ®ion); 41 static bool IsSuggested(const std::string &language, const std::string ®ion); 44 static std::string GetDisplayRegion(const std::string ®ion, const std::string &displayLocale, 54 static bool IsValidRegion(const std::string ®ion); 91 …tatic std::string GetRegionChangeLocale(const std::string &languageTag, const std::string ®ion);
|
/base/global/i18n_lite/frameworks/i18n/src/ |
D | locale_info.cpp | 60 region = NewArrayAndCopy(newRegion, regionLength); in Init() 77 if ((region != nullptr) && (LenCharArray(region) > 0)) { in InitIdstr() 78 idStr = idStr + "-" + region; in InitIdstr() 119 Init(o.language, o.script, o.region, status); in LocaleInfo() 134 I18nFree((void *)region); in FreeResource() 149 ret = CompareLocaleItem(region, other.region); in operator ==() 165 if (o.region != nullptr) { in operator =() 166 region = NewArrayAndCopy(o.region, strlen(o.region)); in operator =() 189 return region; in GetRegion() 275 if ((region != nullptr) && (LenCharArray(region) > 1)) { in GetMask() [all …]
|
/base/global/i18n_standard/frameworks/intl/src/ |
D | measure_data.cpp | 291 uint32_t GetMask(const string ®ion) in GetMask() argument 293 uint32_t firstChar = (region.c_str()[0] - CHAR_OFFSET); in GetMask() 294 uint32_t secondChar = (region.c_str()[1] - CHAR_OFFSET); in GetMask() 298 void GetDefaultPreferredUnit(const string ®ion, const string &type, vector<string> &units) in GetDefaultPreferredUnit() argument 300 switch (GetMask(region)) { in GetDefaultPreferredUnit() 322 void GetFallbackPreferredUnit(const string ®ion, const string &usage, vector<string> &units) in GetFallbackPreferredUnit() argument 324 switch (GetMask(region)) { in GetFallbackPreferredUnit() 372 void GetRestPreferredUnit(const string ®ion, const string &usage, vector<string> &units) in GetRestPreferredUnit() argument 374 switch (GetMask(region)) { in GetRestPreferredUnit() 414 GetFallbackPreferredUnit(region, usage, units); in GetRestPreferredUnit() [all …]
|
D | locale_info.cpp | 59 region = locale.getCountry(); in LocaleInfo() 64 if (region.length() == REGION_LEN) { in LocaleInfo() 65 baseName += "-" + region; in LocaleInfo() 87 region = locale.getCountry(); in LocaleInfo() 107 if (!region.empty()) { in ComputeFinalLocaleTag() 108 finalLocaleTag += "-" + region; in ComputeFinalLocaleTag() 169 region = configs["region"]; in ParseConfigs() 205 return region; in GetRegion()
|
D | locale_config.cpp | 398 bool LocaleConfig::SetSystemRegion(const string ®ion) in SetSystemRegion() argument 403 if (!IsValidRegion(region)) { in SetSystemRegion() 411 newLocale = GetRegionChangeLocale(tag, region); in SetSystemRegion() 416 icu::Locale temp("", region.c_str()); in SetSystemRegion() 473 bool LocaleConfig::IsValidRegion(const string ®ion) in IsValidRegion() argument 475 string::size_type size = region.size(); in IsValidRegion() 480 if ((region[i] > 'Z') || (region[i] < 'A')) { in IsValidRegion() 556 bool LocaleConfig::IsSuggested(const std::string &language, const std::string ®ion) in IsSuggested() argument 559 vector<string> countries { region }; in IsSuggested() 667 string LocaleConfig::GetRegionChangeLocale(const string &languageTag, const string ®ion) in GetRegionChangeLocale() argument [all …]
|
/base/global/resmgr_lite/frameworks/resmgr_lite/src/ |
D | global.cpp | 59 std::string language, script, region; in GLOBAL_ConfigLanguage() local 76 region.assign(appLanguage + indexEnd + 1); in GLOBAL_ConfigLanguage() 77 g_resConfig->SetLocaleInfo(language.c_str(), script.c_str(), region.c_str()); in GLOBAL_ConfigLanguage() 80 region.assign(appLanguage + indexStart + 1); in GLOBAL_ConfigLanguage() 81 g_resConfig->SetLocaleInfo(language.c_str(), nullptr, region.c_str()); in GLOBAL_ConfigLanguage() 104 int32_t GLOBAL_GetRegion(char *region, uint8_t len) in GLOBAL_GetRegion() argument 110 if (region == nullptr || len == 0) { in GLOBAL_GetRegion() 113 if (strncpy_s(region, len, g_resConfig->GetLocaleInfo()->GetRegion(), in GLOBAL_GetRegion()
|
D | res_locale.cpp | 63 RState ResLocale::SetRegion(const char *region, size_t len) in SetRegion() argument 78 *(temp + i) = toupper(*(region + i)); in SetRegion() 112 const char *region, size_t regionLen) in Init() argument 122 r = this->SetRegion(region, regionLen); in Init() 266 const char *region, in BuildFromParts() argument 299 len = Utils::StrLen(region); in BuildFromParts() 301 if (LocaleMatcher::IsRegionTag(region, len)) { in BuildFromParts() 302 tempRegion = region; in BuildFromParts() 375 LocaleInfo *BuildFromParts(const char *language, const char *script, const char *region, RState &rS… in BuildFromParts() argument 394 len = Utils::StrLen(region); in BuildFromParts() [all …]
|
/base/global/i18n_lite/interfaces/kits/i18n/include/ |
D | locale_info.h | 63 LocaleInfo(const char *lang, const char *script, const char *region); 73 LocaleInfo(const char *lang, const char *region); 206 char *region = nullptr; variable 212 void Init(const char *lang, const char *script, const char *region, int &status);
|
/base/global/resmgr_standard/frameworks/resmgr/src/utils/ |
D | utils.cpp | 112 const char *region) in EncodeLocale() argument 116 uint16_t regionData = Utils::EncodeRegion(region); in EncodeLocale() 146 uint16_t Utils::EncodeRegion(const char *region) in EncodeRegion() argument 148 if (Utils::IsStrEmpty(region)) { in EncodeRegion() 151 if (region[0] >= '0' && region[0] <= '9') { in EncodeRegion() 152 return Utils::EncodeLanguageOrRegion(region, '0'); in EncodeRegion() 154 return Utils::EncodeLanguageOrRegion(region, 'A'); in EncodeRegion()
|
/base/global/resmgr_lite/frameworks/resmgr_lite/src/utils/ |
D | utils.cpp | 112 const char *region) in EncodeLocale() argument 116 uint16_t regionData = Utils::EncodeRegion(region); in EncodeLocale() 146 uint16_t Utils::EncodeRegion(const char *region) in EncodeRegion() argument 148 if (Utils::IsStrEmpty(region)) { in EncodeRegion() 151 if (region[0] >= '0' && region[0] <= '9') { in EncodeRegion() 152 return Utils::EncodeLanguageOrRegion(region, '0'); in EncodeRegion() 154 return Utils::EncodeLanguageOrRegion(region, 'A'); in EncodeRegion()
|
/base/global/resmgr_lite/frameworks/resmgr_lite/include/ |
D | res_locale.h | 58 …static ResLocale *BuildFromParts(const char *language, const char *script, const char *region, RSt… 77 RState SetRegion(const char *region, size_t len); 84 const char *region, size_t regionLen);
|
D | res_config.h | 29 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/resmgr_standard/frameworks/resmgr/include/ |
D | res_locale.h | 58 …static ResLocale *BuildFromParts(const char *language, const char *script, const char *region, RSt… 77 RState SetRegion(const char *region, size_t len); 84 const char *region, size_t regionLen);
|
/base/global/resmgr_standard/frameworks/resmgr/src/ |
D | res_locale.cpp | 63 RState ResLocale::SetRegion(const char *region, size_t len) in SetRegion() argument 78 *(temp + i) = toupper(*(region + i)); in SetRegion() 112 const char *region, size_t regionLen) in Init() argument 122 r = this->SetRegion(region, regionLen); in Init() 272 const char *region, in BuildFromParts() argument 305 len = Utils::StrLen(region); in BuildFromParts() 307 if (LocaleMatcher::IsRegionTag(region, len)) { in BuildFromParts() 308 tempRegion = region; in BuildFromParts() 384 Locale *BuildFromParts(const char *language, const char *script, const char *region, RState &rState) in BuildFromParts() argument 403 len = Utils::StrLen(region); in BuildFromParts() [all …]
|
/base/global/resmgr_standard/frameworks/resmgr/include/utils/ |
D | utils.h | 45 static uint16_t EncodeRegion(const char *region); 51 const char *region);
|
/base/global/resmgr_lite/frameworks/resmgr_lite/include/utils/ |
D | utils.h | 45 static uint16_t EncodeRegion(const char *region); 51 const char *region);
|
/base/global/resmgr_standard/interfaces/innerkits/include/ |
D | res_config.h | 29 virtual RState SetLocaleInfo(const char *language, const char *script, const char *region) = 0; 64 EXPORT_FUNC Locale *BuildFromParts(const char *language, const char *script, const char *region, RS…
|
/base/hiviewdfx/hiview/base/include/ |
D | logger.h | 30 #define DEFINE_LOG_LABEL(region, name) \ argument 31 static unsigned int logLabelDomain = region; \
|
/base/global/resmgr_standard/frameworks/resmgr/test/unittest/common/ |
D | test_common.cpp | 72 ResConfig *CreateResConfig(const char *language, const char *script, const char *region) in CreateResConfig() argument 78 resConfig->SetLocaleInfo(language, script, region); in CreateResConfig()
|
D | test_common.h | 40 ResConfig *CreateResConfig(const char *language, const char *script, const char *region);
|