Lines Matching refs:locale

82  * service to expose multiple backends for a single locale. Each one of them can have a different
93 * {@link #onGetDefaultVoiceNameFor(String, String, String)} is a link between locale and voice
98 * If the client uses a voice instead of a locale, {@link SynthesisRequest} will contain the
102 * pre-existing locale-based implementation.
171 * @return Code indicating the support status for the locale.
211 * @return Code indicating the support status for the locale.
255 private int getExpectedLanguageAvailableStatus(Locale locale) {
257 if (locale.getVariant().isEmpty()) {
258 if (locale.getCountry().isEmpty()) {
274 * the locale's BCP-47 language tag as the voice name) for the ones that are supported.
276 * for a single locale. Also, this implementation won't work with Locales not listed in the
284 for (Locale locale : Locale.getAvailableLocales()) {
285 int expectedStatus = getExpectedLanguageAvailableStatus(locale);
287 int localeStatus = onIsLanguageAvailable(locale.getISO3Language(),
288 locale.getISO3Country(), locale.getVariant());
293 // Ignore locale without iso 3 codes
296 Set<String> features = onGetFeaturesForLanguage(locale.getISO3Language(),
297 locale.getISO3Country(), locale.getVariant());
298 voices.add(new Voice(locale.toLanguageTag(), locale, Voice.QUALITY_NORMAL,
305 * Return a name of the default voice for a given locale.
312 * the default locale.
318 * @return A name of the default voice for a given locale.
354 * a BCP-47 tag for the locale), and passes it to
361 Locale locale = Locale.forLanguageTag(voiceName);
362 if (locale == null) {
365 int expectedStatus = getExpectedLanguageAvailableStatus(locale);
367 int localeStatus = onIsLanguageAvailable(locale.getISO3Language(),
368 locale.getISO3Country(), locale.getVariant());
372 onLoadLanguage(locale.getISO3Language(),
373 locale.getISO3Country(), locale.getVariant());
392 Locale locale = Locale.forLanguageTag(voiceName);
393 if (locale == null) {
396 int expectedStatus = getExpectedLanguageAvailableStatus(locale);
398 int localeStatus = onIsLanguageAvailable(locale.getISO3Language(),
399 locale.getISO3Country(), locale.getVariant());
414 final Locale locale = mEngineHelper.getLocalePrefForEngine(mPackageName);
415 return TtsEngines.toOldLocaleStringFormat(locale);