TranslatorService.DetectLanguageWithResponseAsync(String) Method
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
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.