AWS SDK Version 3 for .NET
API Reference

AWS services or capabilities described in AWS Documentation may vary by region/location. Click Getting Started with Amazon AWS to see specific differences applicable to the China (Beijing) Region.

Translates input text from the source language to the target language. You can translate between English (en) and one of the following languages, or between one of the following languages and English.

To have Amazon Translate determine the source language of your text, you can specify auto in the SourceLanguageCode field. If you specify auto, Amazon Translate will call Amazon Comprehend to determine the source language.


For .NET Core and PCL this operation is only available in asynchronous form. Please refer to TranslateTextAsync.

Namespace: Amazon.Translate
Assembly: AWSSDK.Translate.dll
Version: 3.x.y.z


public virtual TranslateTextResponse TranslateText(
         TranslateTextRequest request
Type: Amazon.Translate.Model.TranslateTextRequest

Container for the necessary parameters to execute the TranslateText service method.

Return Value
The response from the TranslateText service method, as returned by Translate.


DetectedLanguageLowConfidenceException The confidence that Amazon Comprehend accurately detected the source language is low. If a low confidence level is acceptable for your application, you can use the language in the exception to call Amazon Translate again. For more information, see the DetectDominantLanguage operation in the Amazon Comprehend Developer Guide.
InternalServerException An internal server error occurred. Retry your request.
InvalidRequestException The request is invalid.
ServiceUnavailableException Amazon Translate is unavailable. Retry your request later.
TextSizeLimitExceededException The size of the input text exceeds the length constraint for the Text field. Try again with a shorter text.
TooManyRequestsException The number of requests exceeds the limit. Resubmit your request later.
UnsupportedLanguagePairException Amazon Translate cannot translate input text in the source language into this target language. For more information, see how-to-error-msg.

Version Information

.NET Framework:
Supported in: 4.5, 4.0, 3.5

Portable Class Library:
Supported in: Windows Store Apps
Supported in: Windows Phone 8.1
Supported in: Xamarin Android
Supported in: Xamarin iOS (Unified)
Supported in: Xamarin.Forms

See Also