TranslationLanguage Class
- java.
lang. Object - com.
azure. ai. translation. text. models. TranslationLanguage
- com.
Implements
public final class TranslationLanguage
implements JsonSerializable<TranslationLanguage>
The value of the translation property is a dictionary of (key, value) pairs. Each key is a BCP 47 language tag. A key identifies a language for which text can be translated to or translated from.
Method Summary
| Modifier and Type | Method and Description |
|---|---|
|
static
Translation |
fromJson(JsonReader jsonReader)
Reads an instance of Translation |
|
Language |
getDirectionality()
Get the directionality property: Directionality, which is rtl for right-to-left languages or ltr for left-to-right languages. |
| List<String> |
getModels()
Get the models property: LLM models supported for translation. |
| String |
getName()
Get the name property: Display name of the language in the locale requested via Accept-Language header. |
| String |
getNativeName()
Get the native |
|
Json |
toJson(JsonWriter jsonWriter) |
Methods inherited from java.lang.Object
Method Details
fromJson
public static TranslationLanguage fromJson(JsonReader jsonReader)
Reads an instance of TranslationLanguage from the JsonReader.
Parameters:
Returns:
Throws:
getDirectionality
public LanguageDirectionality getDirectionality()
Get the directionality property: Directionality, which is rtl for right-to-left languages or ltr for left-to-right languages.
Returns:
getModels
public List<String> getModels()
Get the models property: LLM models supported for translation.
Returns:
getName
public String getName()
Get the name property: Display name of the language in the locale requested via Accept-Language header.
Returns:
getNativeName
public String getNativeName()
Get the nativeName property: Display name of the language in the locale native for this language.
Returns: