Lines Matching defs:language

13  * See the License for the specific language governing permissions and
134 * an ISO 2-3 character language code if available.
146 // Choose English as the default language for India.
151 // Ask CLDR for the language this country uses...
281 * Return Locale for the language and country or null if no good match.
284 * @param language Two character language code desired
289 private static Locale getLocaleForLanguageCountry(Context context, String language,
291 if (language == null) {
292 Slog.d(LOG_TAG, "getLocaleForLanguageCountry: skipping no language");
299 final Locale target = new Locale(language, country);
312 // Only consider locales with both language and country.
325 // We've only matched the language, not the country.
331 Slog.d(LOG_TAG, "getLocaleForLanguageCountry: no locales for language " + language);
344 // with the same language and script has translation assets.
357 // Somewhat arbitrarily take the first locale for the language,
361 Slog.d(LOG_TAG, "getLocaleForLanguageCountry: got language-only match: "
362 + language);
396 * @param simLanguage (nullable) the language from the SIM records (if present).
402 String language = hasSimLanguage ? simLanguage : MccTable.defaultLanguageForMcc(mcc);
405 Slog.d(LOG_TAG, "getLocaleFromMcc(" + language + ", " + country + ", " + mcc);
406 final Locale locale = getLocaleForLanguageCountry(context, language, country);
408 // If we couldn't find a locale that matches the SIM language, give it a go again
409 // with the "likely" language for the given country.
411 language = MccTable.defaultLanguageForMcc(mcc);
412 Slog.d(LOG_TAG, "[retry ] getLocaleFromMcc(" + language + ", " + country + ", " + mcc);
413 return getLocaleForLanguageCountry(context, language, country);