Lines Matching refs:locale
93 * Returns the language component of a given locale string.
95 private static String parseLanguageFromLocaleString(String locale) {
96 final int idx = locale.indexOf('_');
98 return locale;
100 return locale.substring(0, idx);
106 * @param locale the locale for the spell checker. If {@code locale} is null and
107 * referToSpellCheckerLanguageSettings is true, the locale specified in Settings will be
108 * returned. If {@code locale} is not null and referToSpellCheckerLanguageSettings is true,
109 * the locale specified in Settings will be returned only when it is same as {@code locale}.
110 * Exceptionally, when referToSpellCheckerLanguageSettings is true and {@code locale} is
111 * only language (e.g. "en"), the specified locale in Settings (e.g. "en_US") will be
118 public SpellCheckerSession newSpellCheckerSession(Bundle bundle, Locale locale,
123 if (!referToSpellCheckerLanguageSettings && locale == null) {
147 if (locale != null) {
150 if (subtypeLanguage.length() < 2 || !locale.getLanguage().equals(subtypeLanguage)) {
155 final String localeStr = locale.toString();
164 locale.getLanguage().equals(tempSubtypeLanguage)) {
205 // Passing null as a locale for ICS
238 // Passing null as a locale until we support multiple enabled spell checker subtypes.