Share via


TextTranslationClient.GetLanguagesAsync Method

Definition

Gets the set of languages currently supported by other operations of the Translator.

public virtual System.Threading.Tasks.Task<Azure.Response<Azure.AI.Translation.Text.GetLanguagesResult>> GetLanguagesAsync (string clientTraceId = default, string scope = default, string acceptLanguage = default, string ifNoneMatch = default, System.Threading.CancellationToken cancellationToken = default);
abstract member GetLanguagesAsync : string * string * string * string * System.Threading.CancellationToken -> System.Threading.Tasks.Task<Azure.Response<Azure.AI.Translation.Text.GetLanguagesResult>>
override this.GetLanguagesAsync : string * string * string * string * System.Threading.CancellationToken -> System.Threading.Tasks.Task<Azure.Response<Azure.AI.Translation.Text.GetLanguagesResult>>
Public Overridable Function GetLanguagesAsync (Optional clientTraceId As String = Nothing, Optional scope As String = Nothing, Optional acceptLanguage As String = Nothing, Optional ifNoneMatch As String = Nothing, Optional cancellationToken As CancellationToken = Nothing) As Task(Of Response(Of GetLanguagesResult))

Parameters

clientTraceId
String

A client-generated GUID to uniquely identify the request.

scope
String

A comma-separated list of names defining the group of languages to return. Allowed group names are: translation, transliteration and dictionary. If no scope is given, then all groups are returned, which is equivalent to passing scope=translation,transliteration,dictionary. To decide which set of supported languages is appropriate for your scenario, see the description of the response object.

acceptLanguage
String

The language to use for user interface strings. Some of the fields in the response are names of languages or names of regions. Use this parameter to define the language in which these names are returned. The language is specified by providing a well-formed BCP 47 language tag. For instance, use the value fr to request names in French or use the value zh-Hant to request names in Chinese Traditional. Names are provided in the English language when a target language is not specified or when localization is not available.

ifNoneMatch
String

Passing the value of the ETag response header in an If-None-Match field will allow the service to optimize the response. If the resource has not been modified, the service will return status code 304 and an empty response body.

cancellationToken
CancellationToken

The cancellation token to use.

Returns

Applies to