ITranslatorService.TranslateWithResponseAsync Method

Definition

Overloads

TranslateWithResponseAsync(IEnumerable<String>, IEnumerable<String>)

Translates a list of sentences into the specified languages.

TranslateWithResponseAsync(String, IEnumerable<String>)

Translates a text string into the specified languages.

TranslateWithResponseAsync(String, String)

Translates a text string into the specified language.

TranslateWithResponseAsync(IEnumerable<String>, String, IEnumerable<String>)

Translates a list of sentences into the specified languages.

TranslateWithResponseAsync(IEnumerable<String>, String, String)

Translates a list of sentences into the specified language.

TranslateWithResponseAsync(String, String, IEnumerable<String>)

Translates a text into the specified languages.

TranslateWithResponseAsync(String, String, String)

Translates a text string into the specified languages.

TranslateWithResponseAsync(IEnumerable<String>, IEnumerable<String>)

Translates a list of sentences into the specified languages.

C#
public System.Threading.Tasks.Task<System.Collections.Generic.IEnumerable<Microsoft.Toolkit.Services.MicrosoftTranslator.TranslationResponse>> TranslateWithResponseAsync (System.Collections.Generic.IEnumerable<string> input, System.Collections.Generic.IEnumerable<string> to = default);

Parameters

input
IEnumerable<String>

A string array containing the sentences to translate.

to
IEnumerable<String>

A string array representing the language codes to translate the text into. The code must be present in the list of codes returned from the GetLanguagesAsync() method. If the parameter is set to null, the language specified in the property will be used.

Returns

A TranslationResponse array with one result for each language code in the to array. Each object contains translated text and information.

Exceptions

The provided SubscriptionKey isn't valid or has expired.

Remarks

This method perform a non-blocking request for text translation.

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

See also

Applies to

Windows Community Toolkit 6.1.1
Producto Versiones
Windows Community Toolkit 6.1.1

TranslateWithResponseAsync(String, IEnumerable<String>)

Translates a text string into the specified languages.

C#
public System.Threading.Tasks.Task<Microsoft.Toolkit.Services.MicrosoftTranslator.TranslationResponse> TranslateWithResponseAsync (string input, System.Collections.Generic.IEnumerable<string> to);

Parameters

input
String

A string representing the text to translate.

to
IEnumerable<String>

A string array representing the language codes to translate the text into. The code must be present in the list of codes returned from the GetLanguagesAsync() method. If the parameter is set to null, the language specified in the property will be used.

Returns

A TranslationResponse object containing translated text and information.

Exceptions

The provided SubscriptionKey isn't valid or has expired.

Remarks

This method perform a non-blocking request for text translation.

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

See also

Applies to

Windows Community Toolkit 6.1.1
Producto Versiones
Windows Community Toolkit 6.1.1

TranslateWithResponseAsync(String, String)

Translates a text string into the specified language.

C#
public System.Threading.Tasks.Task<Microsoft.Toolkit.Services.MicrosoftTranslator.TranslationResponse> TranslateWithResponseAsync (string input, string to = default);

Parameters

input
String

A string representing the text to translate.

to
String

A string representing the language code to translate the text into. The code must be present in the list of codes returned from the GetLanguagesAsync() method. If the parameter is set to null, the language specified in the property will be used.

Returns

A TranslationResponse object containing translated text and information.

Exceptions

The input parameter is longer than 1000 characters.

The provided SubscriptionKey isn't valid or has expired.

Remarks

This method perform a non-blocking request for text translation.

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

See also

Applies to

Windows Community Toolkit 6.1.1
Producto Versiones
Windows Community Toolkit 6.1.1

TranslateWithResponseAsync(IEnumerable<String>, String, IEnumerable<String>)

Translates a list of sentences into the specified languages.

C#
public System.Threading.Tasks.Task<System.Collections.Generic.IEnumerable<Microsoft.Toolkit.Services.MicrosoftTranslator.TranslationResponse>> TranslateWithResponseAsync (System.Collections.Generic.IEnumerable<string> input, string from, System.Collections.Generic.IEnumerable<string> to);

Parameters

input
IEnumerable<String>

A string array containing the sentences to translate.

from
String

A string representing the language code of the original text. The code must be present in the list of codes returned from the GetLanguagesAsync() method. If the parameter is set to null, the language specified in the property will be used.

to
IEnumerable<String>

A string array representing the language codes to translate the text into. The code must be present in the list of codes returned from the GetLanguagesAsync() method. If the parameter is set to null, the language specified in the property will be used.

Returns

A TranslationResponse array with one result for each language code in the to array. Each object contains translated text and information.

Exceptions

The provided SubscriptionKey isn't valid or has expired.

Remarks

This method perform a non-blocking request for text translation.

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

See also

Applies to

Windows Community Toolkit 6.1.1
Producto Versiones
Windows Community Toolkit 6.1.1

TranslateWithResponseAsync(IEnumerable<String>, String, String)

Translates a list of sentences into the specified language.

C#
public System.Threading.Tasks.Task<System.Collections.Generic.IEnumerable<Microsoft.Toolkit.Services.MicrosoftTranslator.TranslationResponse>> TranslateWithResponseAsync (System.Collections.Generic.IEnumerable<string> input, string from, string to);

Parameters

input
IEnumerable<String>

A string array containing the sentences to translate.

from
String

A string representing the language code of the original text. The code must be present in the list of codes returned from the GetLanguagesAsync() method. If the parameter is set to null, the language specified in the property will be used.

to
String

A string representing the language code to translate the text into. The code must be present in the list of codes returned from the GetLanguagesAsync() method. If the parameter is set to null, the language specified in the property will be used.

Returns

A TranslationResponse array with one result for each language code in the to array. Each object contains translated text and information.

Exceptions

The provided SubscriptionKey isn't valid or has expired.

Remarks

This method perform a non-blocking request for text translation.

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

See also

Applies to

Windows Community Toolkit 6.1.1
Producto Versiones
Windows Community Toolkit 6.1.1

TranslateWithResponseAsync(String, String, IEnumerable<String>)

Translates a text into the specified languages.

C#
public System.Threading.Tasks.Task<Microsoft.Toolkit.Services.MicrosoftTranslator.TranslationResponse> TranslateWithResponseAsync (string input, string from, System.Collections.Generic.IEnumerable<string> to);

Parameters

input
String

A string representing the text to translate.

from
String

A string representing the language code of the original text. The code must be present in the list of codes returned from the GetLanguagesAsync() method. If the parameter is set to null, the language specified in the property will be used.

to
IEnumerable<String>

A string array representing the language codes to translate the text into. The code must be present in the list of codes returned from the GetLanguagesAsync() method. If the parameter is set to null, the language specified in the property will be used.

Returns

A TranslationResponse object containing translated text and information.

Exceptions

The provided SubscriptionKey isn't valid or has expired.

Remarks

This method perform a non-blocking request for text translation.

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

See also

Applies to

Windows Community Toolkit 6.1.1
Producto Versiones
Windows Community Toolkit 6.1.1

TranslateWithResponseAsync(String, String, String)

Translates a text string into the specified languages.

C#
public System.Threading.Tasks.Task<Microsoft.Toolkit.Services.MicrosoftTranslator.TranslationResponse> TranslateWithResponseAsync (string input, string from, string to);

Parameters

input
String

A string representing the text to translate.

from
String

A string representing the language code of the original text. The code must be present in the list of codes returned from the GetLanguagesAsync() method. If the parameter is set to null, the language specified in the property will be used.

to
String

A string representing the language code to translate the text into. The code must be present in the list of codes returned from the GetLanguagesAsync() method. If the parameter is set to null, the language specified in the property will be used.

Returns

A TranslationResponse object containing translated text and information.

Exceptions

The input parameter is longer than 1000 characters.

The provided SubscriptionKey isn't valid or has expired.

Remarks

This method perform a non-blocking request for text translation.

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

See also

Applies to

Windows Community Toolkit 6.1.1
Producto Versiones
Windows Community Toolkit 6.1.1