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 the input document from the source language to the target language. This
synchronous operation supports text, HTML, or Word documents as the input document.
TranslateDocument
supports translations from English to any supported language,
and from any supported language to English. Therefore, specify either the source language
code or the target language code as “en” (English).
If you set the Formality
parameter, the request will fail if the target language
does not support formality. For a list of target languages that support formality,
see Setting
formality.
For .NET Core this operation is only available in asynchronous form. Please refer to TranslateDocumentAsync.
Namespace: Amazon.Translate
Assembly: AWSSDK.Translate.dll
Version: 3.x.y.z
public abstract TranslateDocumentResponse TranslateDocument( TranslateDocumentRequest request )
Container for the necessary parameters to execute the TranslateDocument service method.
Exception | Condition |
---|---|
InternalServerException | An internal server error occurred. Retry your request. |
InvalidRequestException | The request that you made is not valid. Check your request to determine why it's not valid and then retry the request. |
LimitExceededException | The specified limit has been exceeded. Review your request and retry it with a quantity below the stated limit. |
ResourceNotFoundException | The resource you are looking for has not been found. Review the resource you're looking for and see if a different resource will accomplish your needs before retrying the revised request. |
ServiceUnavailableException | The Amazon Translate service is temporarily unavailable. Wait a bit and then retry your request. |
TooManyRequestsException | You have made too many requests within a short period of time. Wait for a short time and then try your request again. |
UnsupportedLanguagePairException | Amazon Translate does not support translation from the language of the source text into the requested target language. For more information, see Supported languages. |
.NET Framework:
Supported in: 4.5 and newer, 3.5