Home
last modified time | relevance | path

Searched refs:LocaleConfig (Results 1 - 25 of 43) sorted by relevance

12

/base/global/i18n/frameworks/intl/test/unittest/
H A Dlocale_config_test.cpp46 originalLanguage = LocaleConfig::GetSystemLanguage(); in SetUpTestCase()
47 originalRegion = LocaleConfig::GetSystemRegion(); in SetUpTestCase()
48 originalLocale = LocaleConfig::GetSystemLocale(); in SetUpTestCase()
49 LocaleConfig::SetSystemLanguage("zh-Hans"); in SetUpTestCase()
50 LocaleConfig::SetSystemRegion("CN"); in SetUpTestCase()
51 LocaleConfig::SetSystemLocale("zh-Hans-CN"); in SetUpTestCase()
56 LocaleConfig::SetSystemLanguage(originalLanguage); in TearDownTestCase()
57 LocaleConfig::SetSystemRegion(originalRegion); in TearDownTestCase()
58 LocaleConfig::SetSystemLocale(originalLocale); in TearDownTestCase()
69 * @tc.desc: Test LocaleConfig GetSystemLanguag
[all...]
H A Dintl_test_extent.cpp74 * @tc.desc: Test Intl LocaleConfig GetBlockedLanguages
79 std::unordered_set<std::string> languageSet = LocaleConfig::GetBlockedLanguages(); in HWTEST_F()
85 * @tc.desc: Test Intl LocaleConfig GetBlockedRegions
90 std::unordered_set<std::string> regionSet = LocaleConfig::GetBlockedRegions(); in HWTEST_F()
96 * @tc.desc: Test Intl LocaleConfig GetLanguageBlockedRegions
101 std::unordered_set<std::string> blockedRegionSet = LocaleConfig::GetLanguageBlockedRegions(); in HWTEST_F()
103 I18nErrorCode status = LocaleConfig::SetSystemLanguage("zh-Hans"); in HWTEST_F()
105 std::string systemLanguage = LocaleConfig::GetSystemLanguage(); in HWTEST_F()
108 status = LocaleConfig::SetSystemRegion("CN"); in HWTEST_F()
110 std::string systemRegion = LocaleConfig in HWTEST_F()
[all...]
H A Dintl_test.cpp69 originalLanguage = LocaleConfig::GetSystemLanguage(); in SetUpTestCase()
70 originalRegion = LocaleConfig::GetSystemRegion(); in SetUpTestCase()
71 originalLocale = LocaleConfig::GetSystemLocale(); in SetUpTestCase()
72 LocaleConfig::SetSystemLanguage("zh-Hans"); in SetUpTestCase()
73 LocaleConfig::SetSystemRegion("CN"); in SetUpTestCase()
74 LocaleConfig::SetSystemLocale("zh-Hans-CN"); in SetUpTestCase()
79 LocaleConfig::SetSystemLanguage(originalLanguage); in TearDownTestCase()
80 LocaleConfig::SetSystemRegion(originalRegion); in TearDownTestCase()
81 LocaleConfig::SetSystemLocale(originalLocale); in TearDownTestCase()
792 std::string systemLocale = LocaleConfig in HWTEST_F()
[all...]
/base/global/i18n/frameworks/intl/test/fuzztest/localeconfigget_fuzzer/
H A Dlocaleconfigget_fuzzer.cpp27 LocaleConfig::GetSystemLanguage(); in DoSomethingInterestingWithMyAPI()
28 LocaleConfig::GetSystemRegion(); in DoSomethingInterestingWithMyAPI()
29 LocaleConfig::GetSystemLocale(); in DoSomethingInterestingWithMyAPI()
31 LocaleConfig::GetSystemLanguages(ret); in DoSomethingInterestingWithMyAPI()
32 LocaleConfig::GetSystemCountries(ret); in DoSomethingInterestingWithMyAPI()
35 LocaleConfig::IsSuggested(input); in DoSomethingInterestingWithMyAPI()
40 LocaleConfig::IsSuggested(firstInput, secondInput); in DoSomethingInterestingWithMyAPI()
41 LocaleConfig::GetDisplayLanguage(firstInput, secondInput, true); in DoSomethingInterestingWithMyAPI()
42 LocaleConfig::GetDisplayLanguage(firstInput, secondInput, false); in DoSomethingInterestingWithMyAPI()
43 LocaleConfig in DoSomethingInterestingWithMyAPI()
[all...]
/base/global/i18n/frameworks/intl/test/fuzztest/localeconfigset_fuzzer/
H A Dlocaleconfigset_fuzzer.cpp28 LocaleConfig::SetSystemLanguage(input); in DoSomethingInterestingWithMyAPI()
29 LocaleConfig::SetSystemRegion(input); in DoSomethingInterestingWithMyAPI()
30 LocaleConfig::SetSystemLocale(input); in DoSomethingInterestingWithMyAPI()
31 LocaleConfig::Set24HourClock("true"); in DoSomethingInterestingWithMyAPI()
32 LocaleConfig::Set24HourClock("false"); in DoSomethingInterestingWithMyAPI()
33 LocaleConfig::SetUsingLocalDigit(true); in DoSomethingInterestingWithMyAPI()
34 LocaleConfig::SetUsingLocalDigit(false); in DoSomethingInterestingWithMyAPI()
/base/global/i18n/frameworks/intl/src/
H A Dlocale_config.cpp53 const char *LocaleConfig::LANGUAGE_KEY = "persist.global.language";
54 const char *LocaleConfig::LOCALE_KEY = "persist.global.locale";
55 const char *LocaleConfig::HOUR_KEY = "persist.global.is24Hour";
56 const char *LocaleConfig::DEFAULT_LOCALE_KEY = "const.global.locale";
57 const char *LocaleConfig::DEFAULT_LANGUAGE_KEY = "const.global.language";
58 const char *LocaleConfig::DEFAULT_REGION_KEY = "const.global.region";
59 const char *LocaleConfig::SIM_COUNTRY_CODE_KEY = "telephony.sim.countryCode0";
60 const char *LocaleConfig::SUPPORTED_LOCALES_NAME = "supported_locales";
61 const char *LocaleConfig::REGIONS_LANGUAGES_PATH = "etc/xml/i18n_param_config.xml";
62 const char *LocaleConfig
[all...]
H A Dsystem_locale_manager.cpp55 std::unordered_set<std::string> blockedLanguages = LocaleConfig::GetBlockedLanguages(); in GetLanguageInfoArray()
60 std::string languageDisplayName = LocaleConfig::GetDisplayLanguage(*it, options.localeTag, true); in GetLanguageInfoArray()
64 languageNativeName = LocaleConfig::GetDisplayLanguage(*it, *it, true); in GetLanguageInfoArray()
67 bool isSuggestedWithSystemRegion = LocaleConfig::IsSuggested(*it, LocaleConfig::GetSystemRegion()); in GetLanguageInfoArray()
71 isSuggestedWithSimRegion = LocaleConfig::IsSuggested(*it, simRegion); in GetLanguageInfoArray()
102 std::unordered_set<std::string> blockedRegions = LocaleConfig::GetBlockedRegions(); in GetCountryInfoArray()
103 std::unordered_set<std::string> blockedLanguageRegions = LocaleConfig::GetLanguageBlockedRegions(); in GetCountryInfoArray()
110 std::string regionDisplayName = LocaleConfig::GetDisplayRegion(*it, options.localeTag, true); in GetCountryInfoArray()
112 bool isSuggestedRegion = LocaleConfig in GetCountryInfoArray()
[all...]
H A Dmulti_users.cpp170 std::string language = ReadSystemParameter(LocaleConfig::GetLanguageKey().data(), CONFIG_LEN); in SaveGlobalParam()
171 std::string locale = ReadSystemParameter(LocaleConfig::GetLocaleKey().data(), CONFIG_LEN); in SaveGlobalParam()
172 std::string is24Hour = ReadSystemParameter(LocaleConfig::GetHourKey().data(), CONFIG_LEN); in SaveGlobalParam()
194 if (!newLocale.empty() && SetParameter(LocaleConfig::GetLocaleKey().data(), newLocale.data()) != 0) { in LoadGlobalParam()
200 if (!newLanguage.empty() && LocaleConfig::SetSystemLanguage(newLanguage) != 0) { in LoadGlobalParam()
206 if (!newIs24Hour.empty() && LocaleConfig::Set24HourClock(newIs24Hour) != 0) { in LoadGlobalParam()
H A Dpreferred_language.cpp48 std::string systemLanguage = GetMatchedLanguage(LocaleConfig::GetSystemLanguage()); in GetPreferredLanguageList()
113 LocaleConfig::GetSystemLanguages(supportLanguageList); in GetMatchedLanguage()
181 return LocaleConfig::GetSystemLocale(); in GetAppPreferredLanguage()
185 return LocaleConfig::GetSystemLocale(); in GetAppPreferredLanguage()
215 std::string systemLocale = LocaleConfig::GetSystemLocale(); in GetPreferredLocale()
302 if (LocaleConfig::SetSystemLanguage(preferredLanguages[0]) != I18nErrorCode::SUCCESS) { in RemovePreferredLanguage()
320 if (LocaleConfig::SetSystemLanguage(preferredLanguages[0]) != I18nErrorCode::SUCCESS) { in AddNonExistPreferredLanguage()
347 if (LocaleConfig::SetSystemLanguage(preferredLanguages[0]) != I18nErrorCode::SUCCESS) { in AddExistPreferredLanguage()
H A Dutils.cpp189 if (LocaleConfig::IsValidRegion(country)) { in GetISO3Country()
191 } else if (LocaleConfig::IsValidTag(country)) { in GetISO3Country()
279 std::string systemLocale = LocaleConfig::GetSystemLocale(); in GetPseudoLocalizationEnforce()
H A Dindex_util.cpp31 icu::Locale locale(LocaleConfig::GetSystemLocale().c_str()); in IndexUtil()
H A Di18n_timezone.cpp690 std::string localeStr = LocaleConfig::GetSystemLocale(); in GetDisplayName()
696 std::string localeStr = LocaleConfig::GetSystemLocale(); in GetDisplayName()
710 std::string systemLocale = LocaleConfig::GetSystemLocale(); in GetDisplayName()
713 if (LocaleConfig::IsValidTag(localeStr)) { in GetDisplayName()
/base/global/i18n_lite/tools/i18n-dat-tool/src/main/java/ohos/global/i18n/
H A DLocaleMaskItem.java38 private ArrayList<LocaleConfig> configs;
46 public LocaleMaskItem(String languageTag, ArrayList<LocaleConfig> configs) { in LocaleMaskItem()
49 configs.sort(new Comparator<LocaleConfig>() { in LocaleMaskItem()
51 public int compare(LocaleConfig first, LocaleConfig second) { in LocaleMaskItem()
100 public ArrayList<LocaleConfig> getConfigs() { in getConfigs()
H A DLocaleConfig.java23 public class LocaleConfig { class
34 * Constructor of class LocaleConfig
40 public LocaleConfig(String str, int nameId, int stringId) { in LocaleConfig() method in LocaleConfig
H A DLocaleList.java44 ArrayList<LocaleConfig>> localeConfigs, StringPool stringPool) { in LocaleList()
80 ArrayList<LocaleConfig> configs = localeMaskItem2.getConfigs(); in write()
83 LocaleConfig localeConfig = configs.get(j); in write()
H A DDataFetcher.java67 private static final HashMap<Integer, ArrayList<LocaleConfig>> LOCALE_CONFIGS = new HashMap<>(64);
160 Fetcher fallbackFetcher, ArrayList<LocaleConfig> temp) { in countData()
171 temp.add(new LocaleConfig(targetMetaData, i, ID_MAP.get(myData))); in countData()
196 ArrayList<LocaleConfig> temp = new ArrayList<>(); in buildLocaleConfigs()
/base/global/i18n/services/src/
H A Di18n_service_ability.cpp47 return LocaleConfig::SetSystemLanguage(language); in SetSystemLanguage()
52 return LocaleConfig::SetSystemRegion(region); in SetSystemRegion()
57 return LocaleConfig::SetSystemLocale(locale); in SetSystemLocale()
62 return LocaleConfig::Set24HourClock(flag); in Set24HourClock()
67 return LocaleConfig::SetUsingLocalDigit(flag); in SetUsingLocalDigit()
/base/global/i18n/interfaces/cj/
H A Di18n_ffi.cpp49 std::string language = OHOS::Global::I18n::LocaleConfig::GetSystemLanguage(); in FfiI18nSystemGetSystemLanguage()
54 std::string region = OHOS::Global::I18n::LocaleConfig::GetSystemRegion(); in FfiI18nSystemGetSystemRegion()
/base/location/services/utils/resource/source/
H A Dlbs_resources.cpp45 std::string result = Global::I18n::LocaleConfig::GetSystemRegion(); in GetSystemRegion()
/base/global/i18n/services/test/unittest/src/
H A Di18n_service_test.cpp86 LocaleConfig::SetSystemLanguage("zh-Hans"); in InitTestEnvironment()
87 LocaleConfig::SetSystemRegion("CN"); in InitTestEnvironment()
88 LocaleConfig::SetSystemLocale("zh-Hans-CN"); in InitTestEnvironment()
89 LocaleConfig::Set24HourClock("true"); in InitTestEnvironment()
199 LocaleConfig::GetDisplayLanguage("zh", "en-US", true); in HWTEST_F()
/base/global/i18n/frameworks/intl/test/fuzztest/systemlocalemanager_fuzzer/
H A Dsystemlocalemanager_fuzzer.cpp33 std::string systemLocale = LocaleConfig::GetSystemLocale(); in DoSomethingInterestingWithMyAPI()
/base/global/i18n/interfaces/js/kits/src/
H A Di18n_system_addon.cpp108 LocaleConfig::GetSystemLanguages(systemLanguages); in GetSystemLanguages()
153 std::string value = LocaleConfig::GetSystemLanguage(); in GetSystemLanguage()
175 std::string value = LocaleConfig::GetSystemRegion(); in GetSystemRegion()
197 std::string value = LocaleConfig::GetSystemLocale(); in GetSystemLocale()
219 bool is24HourClock = LocaleConfig::Is24HourClock(); in Is24HourClock()
364 bool res = LocaleConfig::GetUsingLocalDigit(); in GetUsingLocalDigitAddon()
401 if (!LocaleConfig::IsValidRegion(localeBuf.data()) && localeInfo.GetRegion() == "") { in GetDisplayCountryImpl()
404 } else if (!LocaleConfig::IsValidTag(displayLocaleBuf.data())) { in GetDisplayCountryImpl()
412 std::string value = LocaleConfig::GetDisplayRegion(localeBuf.data(), displayLocaleBuf.data(), sentenceCase); in GetDisplayCountryImpl()
464 if (!LocaleConfig in GetDisplayLanguageImpl()
[all...]
H A Dentity_recognizer_addon.cpp73 localeStr = LocaleConfig::GetSystemLocale(); in constructor()
/base/global/i18n/frameworks/intl/test/fuzztest/regexrule_fuzzer/
H A Dregexrule_fuzzer.cpp39 std::string country = LocaleConfig::GetSystemRegion(); in DoSomethingInterestingWithMyAPI()
/base/global/i18n/frameworks/intl/include/
H A Dlocale_config.h35 class LocaleConfig { class
37 LocaleConfig() = default;
38 virtual ~LocaleConfig() = default;

Completed in 17 milliseconds

12