Partager via


TextToSpeechService.OnGetLanguage Method

Definition

Returns the language, country and variant currently being used by the TTS engine.

[Android.Runtime.Register("onGetLanguage", "()[Ljava/lang/String;", "GetOnGetLanguageHandler")]
protected abstract string[]? OnGetLanguage ();
[<Android.Runtime.Register("onGetLanguage", "()[Ljava/lang/String;", "GetOnGetLanguageHandler")>]
abstract member OnGetLanguage : unit -> string[]

Returns

String[]

A 3-element array, containing language (ISO 3-letter code), country (ISO 3-letter code) and variant used by the engine. The country and variant may be "". If country is empty, then variant must be empty too.

Attributes

Remarks

Returns the language, country and variant currently being used by the TTS engine.

This method will be called only on Android 4.2 and before (API <= 17). In later versions this method is not called by the Android TTS framework.

Can be called on multiple threads.

Java documentation for android.speech.tts.TextToSpeechService.onGetLanguage().

Portions of this page are modifications based on work created and shared by the Android Open Source Project and used according to terms described in the Creative Commons 2.5 Attribution License.

Applies to

See also