2017/11/29 - Amazon Translate - 1 new api methods
Changes Public preview release of Amazon Translate and the Amazon Translate Developer Guide. For more information, see the Amazon Translate Developer Guide.
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)
See also: AWS API Documentation
Request Syntax
client.translate_text( Text='string', SourceLanguageCode='string', TargetLanguageCode='string' )
string
[REQUIRED]
The text to translate.
string
[REQUIRED]
One of the supported language codes for the source text. If the TargetLanguageCode is not "en", the SourceLanguageCode must be "en".
string
[REQUIRED]
One of the supported language codes for the target text. If the SourceLanguageCode is not "en", the TargetLanguageCode must be "en".
dict
Response Syntax
{ 'TranslatedText': 'string', 'SourceLanguageCode': 'string', 'TargetLanguageCode': 'string' }
Response Structure
(dict) --
TranslatedText (string) --
The text translated into the target language.
SourceLanguageCode (string) --
The language code for the language of the input text.
TargetLanguageCode (string) --
The language code for the language of the translated text.