Home
last modified time | relevance | path

Searched refs:candidateLocales (Results 1 – 5 of 5) sorted by relevance

/ohos5.0/base/global/i18n/frameworks/intl/src/
H A Dlocale_matcher.cpp30 const std::vector<LocaleInfo*>& candidateLocales) in GetBestMatchedLocale() argument
32 if (candidateLocales.size() == 0) { in GetBestMatchedLocale()
35 LocaleInfo* bestMatch = candidateLocales[0]; in GetBestMatchedLocale()
36 for (size_t i = 1; i < candidateLocales.size(); ++i) { in GetBestMatchedLocale()
37 if (IsMoreSuitable(bestMatch, candidateLocales[i], requestLocale) < 0) { in GetBestMatchedLocale()
38 bestMatch = candidateLocales[i]; in GetBestMatchedLocale()
H A Dpreferred_language.cpp111 std::vector<LocaleInfo*> candidateLocales; in GetMatchedLanguage() local
124 candidateLocales.push_back(supportLocaleInfo); in GetMatchedLanguage()
129 …std::string matchedLanguage = LocaleMatcher::GetBestMatchedLocale(requestLocale, candidateLocales); in GetMatchedLanguage()
130 for (LocaleInfo* supportLocaleInfo : candidateLocales) { in GetMatchedLanguage()
/ohos5.0/base/global/i18n/interfaces/js/kits/src/
H A Di18n_addon.cpp338 candidateLocales.push_back(temp); in ProcessJsParamLocaleList()
346 void ReleaseParam(LocaleInfo *locale, std::vector<LocaleInfo*> &candidateLocales) in ReleaseParam() argument
349 for (auto it = candidateLocales.begin(); it != candidateLocales.end(); ++it) { in ReleaseParam()
369 std::vector<LocaleInfo*> candidateLocales; in GetBestMatchLocale() local
370 bool isValidParam = ProcessJsParamLocaleList(env, argv[1], candidateLocales, requestLocale); in GetBestMatchLocale()
372 ReleaseParam(requestLocale, candidateLocales); in GetBestMatchLocale()
376 if (candidateLocales.size() > 0) { in GetBestMatchLocale()
377 LocaleInfo *bestMatch = candidateLocales[0]; in GetBestMatchLocale()
378 for (size_t i = 1; i < candidateLocales.size(); ++i) { in GetBestMatchLocale()
380 bestMatch = candidateLocales[i]; in GetBestMatchLocale()
[all …]
/ohos5.0/base/global/i18n/interfaces/native/inner_api/i18n/include/
H A Dlocale_matcher.h34 const std::vector<LocaleInfo*>& candidateLocales);
/ohos5.0/base/global/i18n/frameworks/intl/test/unittest/
H A Dintl_test_extent.cpp1432 std::vector<LocaleInfo*> candidateLocales; variable
1437 candidateLocales.push_back(locale0);
1438 candidateLocales.push_back(locale1);
1439 candidateLocales.push_back(locale2);
1440 candidateLocales.push_back(locale3);
1441 std::string bestMatch = LocaleMatcher::GetBestMatchedLocale(request.get(), candidateLocales);