@Generated(value="com.amazonaws:aws-java-sdk-code-generator") public interface AmazonTranslate
Note: Do not directly implement this interface, new methods are added to it regularly. Extend from
AbstractAmazonTranslate
instead.
Provides translation between English and one of six languages, or between one of the six languages and English.
Modifier and Type | Field and Description |
---|---|
static String |
ENDPOINT_PREFIX
The region metadata service name for computing region endpoints.
|
Modifier and Type | Method and Description |
---|---|
ResponseMetadata |
getCachedResponseMetadata(AmazonWebServiceRequest request)
Returns additional metadata for a previously executed successful request, typically used for debugging issues
where a service isn't acting as expected.
|
void |
shutdown()
Shuts down this client object, releasing any resources that might be held open.
|
TranslateTextResult |
translateText(TranslateTextRequest translateTextRequest)
Translates input text from the source language to the target language.
|
static final String ENDPOINT_PREFIX
TranslateTextResult translateText(TranslateTextRequest translateTextRequest)
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.
Arabic (ar)
Chinese (Simplified) (zh)
French (fr)
German (de)
Portuguese (pt)
Spanish (es)
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.
translateTextRequest
- InvalidRequestException
- The request is invalid.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.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.ServiceUnavailableException
- Amazon Translate is unavailable. Retry your request later.void shutdown()
ResponseMetadata getCachedResponseMetadata(AmazonWebServiceRequest request)
Response metadata is only cached for a limited period of time, so if you need to access this extra diagnostic information for an executed request, you should use this method to retrieve it as soon as possible after executing a request.
request
- The originally executed request.Copyright © 2013 Amazon Web Services, Inc. All Rights Reserved.