Home
last modified time | relevance | path

Searched refs:uloc (Results 1 – 25 of 77) sorted by relevance

1234

/third_party/icu/icu4j/main/classes/localespi/src/com/ibm/icu/impl/javaspi/
DICULocaleServiceProvider.java137 for (ULocale uloc : icuLocales) { in getLocales()
138 String language = uloc.getLanguage(); in getLocales()
142 addULocale(uloc, localeSet); in getLocales()
144 if (uloc.getScript().length() > 0 && uloc.getCountry().length() > 0) { in getLocales()
149 locBld.setLocale(uloc); in getLocales()
185 private static void addULocale(ULocale uloc, Set<Locale> locales) { in addULocale() argument
186 locales.add(uloc.toLocale()); in addULocale()
190 StringBuilder var = new StringBuilder(uloc.getVariant()); in addULocale()
198 locBld.setLocale(uloc); in addULocale()
/third_party/icu/ohos_icu4j/src/main/tests/ohos/global/icu/dev/test/serializable/
DFormatHandler.java719 private static DateFormatSymbols getCannedDateFormatSymbols(ULocale uloc) in getCannedDateFormatSymbols() argument
721 DateFormatSymbols dfs =new DateFormatSymbols(GregorianCalendar.class, uloc); in getCannedDateFormatSymbols()
722 String key = uloc.toString(); in getCannedDateFormatSymbols()
730 private static SimpleDateFormat getCannedSimpleDateFormat(String pattern, ULocale uloc) in getCannedSimpleDateFormat() argument
732 DateFormatSymbols dfs = getCannedDateFormatSymbols(uloc); in getCannedSimpleDateFormat()
736 SimpleDateFormat cannedSDF = new SimpleDateFormat(pattern, dfs, uloc); in getCannedSimpleDateFormat()
1001 private static DecimalFormatSymbols getCannedDecimalFormatSymbols(ULocale uloc) in getCannedDecimalFormatSymbols() argument
1003 DecimalFormatSymbols dfs = new DecimalFormatSymbols(uloc); in getCannedDecimalFormatSymbols()
1005 setSymbols(dfs, (String[]) cannedDecimalFormatSymbols.get(uloc.toString())); in getCannedDecimalFormatSymbols()
1010 private static DecimalFormat getCannedDecimalFormat(String pattern, ULocale uloc) in getCannedDecimalFormat() argument
[all …]
/third_party/icu/icu4j/main/classes/core/src/com/ibm/icu/text/
DCurrencyPluralInfo.java277 private void initialize(ULocale uloc) { in initialize() argument
278 ulocale = uloc; in initialize()
279 pluralRules = PluralRules.forLocale(uloc); in initialize()
280 setupCurrencyPluralPattern(uloc); in initialize()
283 private void setupCurrencyPluralPattern(ULocale uloc) { in setupCurrencyPluralPattern() argument
286 String numberStylePattern = NumberFormat.getPattern(uloc, NumberFormat.NUMBERSTYLE); in setupCurrencyPluralPattern()
294 Map<String, String> map = CurrencyData.provider.getInstance(uloc, true).getUnitPatterns(); in setupCurrencyPluralPattern()
DNumberFormatServiceShim.java104 ULocale uloc = actualLoc[0]; in createInstance() local
105 fmt.setLocale(uloc, uloc); // services make no distinction between actual & valid in createInstance()
DBreakIteratorFactory.java162 ULocale uloc = ULocale.forLocale(rb.getLocale()); in createBreakInstance() local
163 iter.setLocale(uloc, uloc); in createBreakInstance()
/third_party/icu/ohos_icu4j/src/main/java/ohos/global/icu/text/
DCurrencyPluralInfo.java259 private void initialize(ULocale uloc) { in initialize() argument
260 ulocale = uloc; in initialize()
261 pluralRules = PluralRules.forLocale(uloc); in initialize()
262 setupCurrencyPluralPattern(uloc); in initialize()
265 private void setupCurrencyPluralPattern(ULocale uloc) { in setupCurrencyPluralPattern() argument
268 String numberStylePattern = NumberFormat.getPattern(uloc, NumberFormat.NUMBERSTYLE); in setupCurrencyPluralPattern()
276 Map<String, String> map = CurrencyData.provider.getInstance(uloc, true).getUnitPatterns(); in setupCurrencyPluralPattern()
DNumberFormatServiceShim.java105 ULocale uloc = actualLoc[0]; in createInstance() local
106 fmt.setLocale(uloc, uloc); // services make no distinction between actual & valid in createInstance()
DBreakIteratorFactory.java163 ULocale uloc = ULocale.forLocale(rb.getLocale()); in createBreakInstance() local
164 iter.setLocale(uloc, uloc); in createBreakInstance()
/third_party/icu/ohos_icu4j/src/main/java/ohos/global/icu/util/
DGlobalizationPreferences.java795 for (ULocale uloc : inputLocales) { in processLocales()
796 String language = uloc.getLanguage(); in processLocales()
797 String script = uloc.getScript(); in processLocales()
798 String country = uloc.getCountry(); in processLocales()
799 String variant = uloc.getVariant(); in processLocales()
815 result.add(j, uloc); in processLocales()
820 result.add(j, uloc); in processLocales()
825 result.add(j, uloc); in processLocales()
833 result.add(j, uloc); in processLocales()
839 result.add(j, uloc); in processLocales()
[all …]
DUResourceBundle.java184 ULocale uloc = ULocale.getDefault(); in getBundleInstance() local
185 … return getBundleInstance(baseName, uloc.getBaseName(), ICUResourceBundle.ICU_DATA_CLASS_LOADER, in getBundleInstance()
203 ULocale uloc = locale == null ? ULocale.getDefault() : ULocale.forLocale(locale); in getBundleInstance() local
205 return getBundleInstance(baseName, uloc.getBaseName(), in getBundleInstance()
244 ULocale uloc = locale == null ? ULocale.getDefault() : ULocale.forLocale(locale); in getBundleInstance() local
245 return getBundleInstance(baseName, uloc.getBaseName(), loader, false); in getBundleInstance()
/third_party/icu/icu4j/main/classes/collate/src/com/ibm/icu/util/
DGlobalizationPreferences.java793 for (ULocale uloc : inputLocales) { in processLocales()
794 String language = uloc.getLanguage(); in processLocales()
795 String script = uloc.getScript(); in processLocales()
796 String country = uloc.getCountry(); in processLocales()
797 String variant = uloc.getVariant(); in processLocales()
813 result.add(j, uloc); in processLocales()
818 result.add(j, uloc); in processLocales()
823 result.add(j, uloc); in processLocales()
831 result.add(j, uloc); in processLocales()
837 result.add(j, uloc); in processLocales()
[all …]
/third_party/icu/ohos_icu4j/src/main/tests/ohos/global/icu/dev/test/util/
DULocaleTest.java182 ULocale uloc = new ULocale("en_Latn_US"); in TestSetULocaleKeywords() local
183 uloc = uloc.setKeywordValue("Foo", "FooValue"); in TestSetULocaleKeywords()
184 if (!"en_Latn_US@foo=FooValue".equals(uloc.getName())) { in TestSetULocaleKeywords()
185 errln("failed to add foo keyword, got: " + uloc.getName()); in TestSetULocaleKeywords()
187 uloc = uloc.setKeywordValue("Bar", "BarValue"); in TestSetULocaleKeywords()
188 if (!"en_Latn_US@bar=BarValue;foo=FooValue".equals(uloc.getName())) { in TestSetULocaleKeywords()
189 errln("failed to add bar keyword, got: " + uloc.getName()); in TestSetULocaleKeywords()
191 uloc = uloc.setKeywordValue("BAR", "NewBarValue"); in TestSetULocaleKeywords()
192 if (!"en_Latn_US@bar=NewBarValue;foo=FooValue".equals(uloc.getName())) { in TestSetULocaleKeywords()
193 errln("failed to change bar keyword, got: " + uloc.getName()); in TestSetULocaleKeywords()
[all …]
/third_party/icu/icu4j/main/tests/core/src/com/ibm/icu/dev/test/serializable/
DFormatHandler.java717 private static DateFormatSymbols getCannedDateFormatSymbols(ULocale uloc) in getCannedDateFormatSymbols() argument
719 DateFormatSymbols dfs =new DateFormatSymbols(GregorianCalendar.class, uloc); in getCannedDateFormatSymbols()
720 String key = uloc.toString(); in getCannedDateFormatSymbols()
728 private static SimpleDateFormat getCannedSimpleDateFormat(String pattern, ULocale uloc) in getCannedSimpleDateFormat() argument
730 DateFormatSymbols dfs = getCannedDateFormatSymbols(uloc); in getCannedSimpleDateFormat()
734 SimpleDateFormat cannedSDF = new SimpleDateFormat(pattern, dfs, uloc); in getCannedSimpleDateFormat()
999 private static DecimalFormatSymbols getCannedDecimalFormatSymbols(ULocale uloc) in getCannedDecimalFormatSymbols() argument
1001 DecimalFormatSymbols dfs = new DecimalFormatSymbols(uloc); in getCannedDecimalFormatSymbols()
1003 setSymbols(dfs, (String[]) cannedDecimalFormatSymbols.get(uloc.toString())); in getCannedDecimalFormatSymbols()
1008 private static DecimalFormat getCannedDecimalFormat(String pattern, ULocale uloc) in getCannedDecimalFormat() argument
[all …]
/third_party/icu/icu4j/main/tests/core/src/com/ibm/icu/dev/test/util/
DULocaleTest.java181 ULocale uloc = new ULocale("en_Latn_US"); in TestSetULocaleKeywords() local
182 uloc = uloc.setKeywordValue("Foo", "FooValue"); in TestSetULocaleKeywords()
183 if (!"en_Latn_US@foo=FooValue".equals(uloc.getName())) { in TestSetULocaleKeywords()
184 errln("failed to add foo keyword, got: " + uloc.getName()); in TestSetULocaleKeywords()
186 uloc = uloc.setKeywordValue("Bar", "BarValue"); in TestSetULocaleKeywords()
187 if (!"en_Latn_US@bar=BarValue;foo=FooValue".equals(uloc.getName())) { in TestSetULocaleKeywords()
188 errln("failed to add bar keyword, got: " + uloc.getName()); in TestSetULocaleKeywords()
190 uloc = uloc.setKeywordValue("BAR", "NewBarValue"); in TestSetULocaleKeywords()
191 if (!"en_Latn_US@bar=NewBarValue;foo=FooValue".equals(uloc.getName())) { in TestSetULocaleKeywords()
192 errln("failed to change bar keyword, got: " + uloc.getName()); in TestSetULocaleKeywords()
[all …]
/third_party/icu/icu4j/main/tests/localespi/src/com/ibm/icu/dev/test/localespi/
DTestUtil.java35 ULocale uloc = ULocale.forLocale(locale); in toICUExtendedLocale() local
36 if (uloc.getScript().length() == 0) { in toICUExtendedLocale()
45 locBld.setLocale(uloc); in toICUExtendedLocale()
DDateFormatSymbolsTest.java195 ULocale uloc = new ULocale("en_US_" + TestUtil.ICU_VARIANT + "@calendar=japanese"); in TestCalendarKeyword() local
196 Locale loc = uloc.toLocale(); in TestCalendarKeyword()
198 … com.ibm.icu.text.DateFormatSymbols icuDfs = com.ibm.icu.text.DateFormatSymbols.getInstance(uloc); in TestCalendarKeyword()
DDecimalFormatSymbolsTest.java170 ULocale uloc = new ULocale("en_US_" + TestUtil.ICU_VARIANT + "@numbers=Arab;currency=EUR"); in TestKeywords() local
171 Locale loc = uloc.toLocale(); in TestKeywords()
173 …m.icu.text.DecimalFormatSymbols icuDecfs = com.ibm.icu.text.DecimalFormatSymbols.getInstance(uloc); in TestKeywords()
DNumberFormatTest.java301 ULocale uloc = new ULocale("en_US_" + TestUtil.ICU_VARIANT + "@numbers=arab;currency=EUR"); in TestKeywords() local
302 Locale loc = uloc.toLocale(); in TestKeywords()
304 … com.ibm.icu.text.NumberFormat icuNfmt = com.ibm.icu.text.NumberFormat.getCurrencyInstance(uloc); in TestKeywords()
DCollatorTest.java143 ULocale uloc = new ULocale("de_DE_" + TestUtil.ICU_VARIANT + "@collation=phonebook"); in TestCollationKeyword() local
144 Locale loc = uloc.toLocale(); in TestCollationKeyword()
/third_party/icu/icu4j/main/classes/core/src/com/ibm/icu/util/
DUResourceBundle.java189 ULocale uloc = ULocale.getDefault(); in getBundleInstance() local
190 … return getBundleInstance(baseName, uloc.getBaseName(), ICUResourceBundle.ICU_DATA_CLASS_LOADER, in getBundleInstance()
209 ULocale uloc = locale == null ? ULocale.getDefault() : ULocale.forLocale(locale); in getBundleInstance() local
211 return getBundleInstance(baseName, uloc.getBaseName(), in getBundleInstance()
252 ULocale uloc = locale == null ? ULocale.getDefault() : ULocale.forLocale(locale); in getBundleInstance() local
253 return getBundleInstance(baseName, uloc.getBaseName(), loader, false); in getBundleInstance()
/third_party/icu/ohos_icu4j/src/main/tests/ohos/global/icu/dev/test/rbbi/
DBreakIteratorTest.java242 ULocale uloc = null; in TestNullLocale() local
253 brk = BreakIterator.getCharacterInstance(uloc); in TestNullLocale()
263 brk = BreakIterator.getLineInstance(uloc); in TestNullLocale()
273 brk = BreakIterator.getSentenceInstance(uloc); in TestNullLocale()
283 brk = BreakIterator.getTitleInstance(uloc); in TestNullLocale()
293 brk = BreakIterator.getWordInstance(uloc); in TestNullLocale()
/third_party/icu/icu4j/main/tests/core/src/com/ibm/icu/dev/test/rbbi/
DBreakIteratorTest.java239 ULocale uloc = null; in TestNullLocale() local
250 brk = BreakIterator.getCharacterInstance(uloc); in TestNullLocale()
260 brk = BreakIterator.getLineInstance(uloc); in TestNullLocale()
270 brk = BreakIterator.getSentenceInstance(uloc); in TestNullLocale()
280 brk = BreakIterator.getTitleInstance(uloc); in TestNullLocale()
290 brk = BreakIterator.getWordInstance(uloc); in TestNullLocale()
/third_party/icu/ohos_icu4j/src/main/tests/ohos/global/icu/dev/test/format/
DListFormatterTest.java277 ULocale uloc = new ULocale((String) cas[0]); in TestCreateStyled() local
282 ListFormatter fmt2 = ListFormatter.getInstance(uloc, type, width); in TestCreateStyled()
344 ULocale uloc = new ULocale(locale); in TestContextual() local
346 ListFormatter fmt = ListFormatter.getInstance(uloc, type, width); in TestContextual()
348 + uloc + " type=" in TestContextual()
/third_party/icu/icu4j/main/tests/core/src/com/ibm/icu/dev/test/format/
DListFormatterTest.java352 ULocale uloc = new ULocale((String) cas[0]); in TestCreateStyled() local
357 ListFormatter fmt2 = ListFormatter.getInstance(uloc, type, width); in TestCreateStyled()
419 ULocale uloc = new ULocale(locale); in TestContextual() local
421 ListFormatter fmt = ListFormatter.getInstance(uloc, type, width); in TestContextual()
423 + uloc + " type=" in TestContextual()
/third_party/icu/icu4j/main/classes/collate/src/com/ibm/icu/text/
DCollatorServiceShim.java141 protected Object handleCreate(ULocale uloc, int kind, ICUService srvc) { in CService() argument
142 return makeInstance(uloc); in CService()

1234