Home
last modified time | relevance | path

Searched refs:LocaleConfig (Results 1 – 25 of 60) sorted by relevance

123

/ohos5.0/base/global/i18n/frameworks/intl/test/unittest/
H A Dlocale_config_test.cpp49 LocaleConfig::SetSystemLanguage("zh-Hans"); in SetUpTestCase()
50 LocaleConfig::SetSystemRegion("CN"); in SetUpTestCase()
51 LocaleConfig::SetSystemLocale("zh-Hans-CN"); in SetUpTestCase()
116 LocaleConfig::SetSystemLanguage("zh-Hans");
118 LocaleConfig::SetSystemLanguage("%$=");
325 current = LocaleConfig::Is24HourClock();
329 LocaleConfig::Set24HourClock("");
359 isRTL = LocaleConfig::IsRTL(localeTag);
424 LocaleConfig::SetUsingLocalDigit(true);
425 LocaleConfig::SetUsingLocalDigit(false);
[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::GetSystemLocale();
[all …]
H A Dintl_test_extent.cpp104 std::string systemLanguage = LocaleConfig::GetSystemLanguage();
107 status = LocaleConfig::SetSystemRegion("CN");
109 std::string systemRegion = LocaleConfig::GetSystemRegion();
111 std::string systemLocale = LocaleConfig::GetSystemLocale();
115 bool isRTL = LocaleConfig::IsRTL(locale);
117 std::string validLocale = LocaleConfig::GetValidLocale(locale);
120 status = LocaleConfig::Set24HourClock("false");
122 bool is24HourClock = LocaleConfig::Is24HourClock();
125 status = LocaleConfig::SetUsingLocalDigit(true);
127 bool usingLocalDigit = LocaleConfig::GetUsingLocalDigit();
[all …]
/ohos5.0/base/global/i18n/frameworks/intl/src/
H A Dlocale_config.cpp142 set<std::string> LocaleConfig::validCaTag {
285 bool LocaleConfig::listsInitialized = LocaleConfig::InitializeLists();
287 string LocaleConfig::GetSystemLanguage() in GetSystemLanguage()
296 string LocaleConfig::GetSystemRegion() in GetSystemRegion()
329 string LocaleConfig::GetSystemLocale() in GetSystemLocale()
461 void LocaleConfig::ExtendWhiteLanguages() in ExtendWhiteLanguages()
580 bool LocaleConfig::InitializeLists() in InitializeLists()
1079 bool LocaleConfig::IsEmpty24HourClock() in IsEmpty24HourClock()
1085 bool LocaleConfig::Is24HourClock() in Is24HourClock()
1158 bool LocaleConfig::GetUsingLocalDigit() in GetUsingLocalDigit()
[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::IsSuggested(LocaleConfig::GetSystemLanguage(), *it); in GetCountryInfoArray()
173 SortTimezoneCityItemList(LocaleConfig::GetSystemLocale(), result); in GetTimezoneCityInfoArray()
[all …]
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.cpp176 if (LocaleConfig::IsValidRegion(country)) { in GetISO3Country()
178 } else if (LocaleConfig::IsValidTag(country)) { in GetISO3Country()
266 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()
/ohos5.0/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()
43 LocaleConfig::GetDisplayRegion(firstInput, secondInput, true); in DoSomethingInterestingWithMyAPI()
44 LocaleConfig::GetDisplayRegion(firstInput, secondInput, false); in DoSomethingInterestingWithMyAPI()
46 LocaleConfig::IsRTL(input); in DoSomethingInterestingWithMyAPI()
[all …]
/ohos5.0/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()
/ohos5.0/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
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()
/ohos5.0/base/global/i18n/services/src/
H A Di18n_service_ability.cpp46 return LocaleConfig::SetSystemLanguage(language); in SetSystemLanguage()
51 return LocaleConfig::SetSystemRegion(region); in SetSystemRegion()
56 return LocaleConfig::SetSystemLocale(locale); in SetSystemLocale()
61 return LocaleConfig::Set24HourClock(flag); in Set24HourClock()
66 return LocaleConfig::SetUsingLocalDigit(flag); in SetUsingLocalDigit()
/ohos5.0/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()
404 } else if (!LocaleConfig::IsValidTag(displayLocaleBuf.data())) { in GetDisplayCountryImpl()
464 if (!LocaleConfig::IsValidTag(displayLocaleBuf.data())) { in GetDisplayLanguageImpl()
520 LocaleConfig::GetSystemCountries(systemCountries); in GetSystemCountriesImpl()
575 isSuggested = LocaleConfig::IsSuggested(languageBuf.data(), regionBuf.data()); in IsSuggestedImpl()
[all …]
H A Dsystem_locale_manager_addon.cpp265 localeTag = LocaleConfig::GetSystemLocale(); in GetSortOptionsFromJsParam()
272 localeTag = LocaleConfig::GetSystemLocale(); in GetSortOptionsFromJsParam()
/ohos5.0/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);
/ohos5.0/foundation/bundlemanager/bundle_framework/services/bundlemgr/src/bundle_resource/
H A Dbundle_resource_configuration.cpp48 OHOS::Global::I18n::LocaleInfo locale(Global::I18n::LocaleConfig::GetSystemLocale(), configs); in InitResourceGlobalConfig()
83 OHOS::Global::I18n::LocaleInfo locale(Global::I18n::LocaleConfig::GetSystemLocale(), configs); in InitResourceGlobalConfig()
/ohos5.0/base/global/i18n/frameworks/intl/include/
H A Dlocale_config.h35 class LocaleConfig {
37 LocaleConfig() = default;
38 virtual ~LocaleConfig() = default;
/ohos5.0/base/location/services/utils/resource/source/
H A Dlbs_resources.cpp45 std::string result = Global::I18n::LocaleConfig::GetSystemRegion(); in GetSystemRegion()
/ohos5.0/base/global/i18n/frameworks/intl/test/fuzztest/systemlocalemanager_fuzzer/
H A Dsystemlocalemanager_fuzzer.cpp33 std::string systemLocale = LocaleConfig::GetSystemLocale(); in DoSomethingInterestingWithMyAPI()
/ohos5.0/base/global/i18n/frameworks/intl/test/fuzztest/regexrule_fuzzer/
H A Dregexrule_fuzzer.cpp39 std::string country = LocaleConfig::GetSystemRegion(); in DoSomethingInterestingWithMyAPI()
/ohos5.0/foundation/multimedia/player_framework/services/services/screen_capture/server/
H A Daudio_capturer_wrapper.cpp68 std::string region = Global::I18n::LocaleConfig::GetSystemRegion(); in Start()
211 std::string region = Global::I18n::LocaleConfig::GetSystemRegion(); in SetInnerStreamUsage()
238 std::string region = Global::I18n::LocaleConfig::GetSystemRegion(); in CreateAudioCapturer()

123