TranslatorService.DetectLanguageWithResponseAsync(String) Method

Definition

Detects the language of a text.

public System.Threading.Tasks.Task<Microsoft.Toolkit.Services.MicrosoftTranslator.DetectedLanguageResponse> DetectLanguageWithResponseAsync (string input);
abstract member DetectLanguageWithResponseAsync : string -> System.Threading.Tasks.Task<Microsoft.Toolkit.Services.MicrosoftTranslator.DetectedLanguageResponse>
override this.DetectLanguageWithResponseAsync : string -> System.Threading.Tasks.Task<Microsoft.Toolkit.Services.MicrosoftTranslator.DetectedLanguageResponse>
Public Function DetectLanguageWithResponseAsync (input As String) As Task(Of DetectedLanguageResponse)

Parameters

input
String

A string representing the text whose language must be detected.

Returns

A DetectedLanguageResponse object containing information about the detected language.

Implements

Exceptions

The provided SubscriptionKey isn't valid or has expired.

Remarks

This method performs a non-blocking request for language detection.

For more information, go to https://docs.microsoft.com/azure/cognitive-services/translator/reference/v3-0-detect.

Applies to

See also