Lines Matching defs:locale
39 * @param locale the Locale for which we want the layout direction. Can be null.
47 public static int getLayoutDirectionFromLocale(Locale locale) {
48 if (locale != null && !locale.equals(Locale.ROOT)) {
49 final String scriptSubtag = ICU.getScript(ICU.addLikelySubtags(locale.toString()));
50 if (scriptSubtag == null) return getLayoutDirectionFromFirstChar(locale);
62 * Fallback algorithm to detect the locale direction. Rely on the fist char of the
63 * localized locale name. This will not work if the localized locale name is in English
66 * @param locale
74 private static int getLayoutDirectionFromFirstChar(Locale locale) {
75 switch(Character.getDirectionality(locale.getDisplayName(locale).charAt(0))) {