Language class Core
Complete language specification used throughout the SDK.
Language encapsulates a language's display name and the standard codes used by the SDK (ISO 639-3 language code, ISO 3166-1 region code, ISO 15924 script code) together with rendering hints such as ScriptVariant and a flag for right-to-left scripts.
See also:
- SdkSettings.getBestLanguageMatch — Find the best available language match.
- SdkSettings.languageList — List of supported languages provided by the SDK.
- ISOCodeConversions.convertLanguageIso — Helper to convert language ISO codes.
- SdkSettings.language — The currently selected language.
- Voice - Represents a voice containing language and other voice settings.
Constructors
- Language({String name = '', String languagecode = '', String regioncode = '', String scriptcode = '', ScriptVariant scriptvariant = ScriptVariant.native, bool isRightToLeft = false})
- Creates a Language instance.
-
Language.fromJson(Map<
String, dynamic> json) -
Deserializes a JSON-compatible map to create an instance.
factory
Properties
- hashCode → int
-
The hash code for this object.
no setteroverride
- isRightToLeft ↔ bool
-
True if and only if the text is right to left.
getter/setter pair
- languagecode ↔ String
-
ISO 639-3 three-letter language code.
getter/setter pair
- name ↔ String
-
Language name.
getter/setter pair
- regioncode ↔ String
-
ISO 3166-1 three-letter region code.
getter/setter pair
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
- scriptcode ↔ String
-
ISO 15924 four-letter script code.
getter/setter pair
- scriptvariant ↔ ScriptVariant
-
Script variant.
getter/setter pair
Methods
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
toJson(
) → Map< String, dynamic> - Serializes this instance to a JSON-compatible map.
-
toString(
) → String -
A string representation of this object.
inherited
Operators
-
operator ==(
covariant Language other) → bool -
The equality operator.
override