Class: AWS.Translate
- Inherits:
-
AWS.Service
- Object
- AWS.Service
- AWS.Translate
- Identifier:
- translate
- API Version:
- 2017-07-01
- Defined in:
- (unknown)
Overview
Constructs a service interface object. Each API operation is exposed as a function on service.
Service Description
Provides translation between one source language and another of the same set of languages.
Sending a Request Using Translate
var translate = new AWS.Translate();
translate.deleteTerminology(params, function (err, data) {
if (err) console.log(err, err.stack); // an error occurred
else console.log(data); // successful response
});
Locking the API Version
In order to ensure that the Translate object uses this specific API, you can
construct the object by passing the apiVersion
option to the constructor:
var translate = new AWS.Translate({apiVersion: '2017-07-01'});
You can also set the API version globally in AWS.config.apiVersions
using
the translate service identifier:
AWS.config.apiVersions = {
translate: '2017-07-01',
// other service API versions
};
var translate = new AWS.Translate();
Constructor Summary
-
new AWS.Translate(options = {}) ⇒ Object
constructor
Constructs a service object.
Property Summary
-
endpoint ⇒ AWS.Endpoint
readwrite
An Endpoint object representing the endpoint URL for service requests.
Properties inherited from AWS.Service
Method Summary
-
deleteTerminology(params = {}, callback) ⇒ AWS.Request
A synchronous action that deletes a custom terminology.
-
getTerminology(params = {}, callback) ⇒ AWS.Request
Retrieves a custom terminology.
-
importTerminology(params = {}, callback) ⇒ AWS.Request
Creates or updates a custom terminology, depending on whether or not one already exists for the given terminology name.
-
listTerminologies(params = {}, callback) ⇒ AWS.Request
Provides a list of custom terminologies associated with your account.
-
translateText(params = {}, callback) ⇒ AWS.Request
Translates input text from the source language to the target language.
Methods inherited from AWS.Service
makeRequest, makeUnauthenticatedRequest, waitFor, setupRequestListeners, defineService
Constructor Details
Property Details
Method Details
deleteTerminology(params = {}, callback) ⇒ AWS.Request
A synchronous action that deletes a custom terminology.
importTerminology(params = {}, callback) ⇒ AWS.Request
Creates or updates a custom terminology, depending on whether or not one already exists for the given terminology name. Importing a terminology with the same name as an existing one will merge the terminologies based on the chosen merge strategy. Currently, the only supported merge strategy is OVERWRITE, and so the imported terminology will overwrite an existing terminology of the same name.
If you import a terminology that overwrites an existing one, the new terminology take up to 10 minutes to fully propagate and be available for use in a translation due to cache policies with the DataPlane service that performs the translations.
listTerminologies(params = {}, callback) ⇒ AWS.Request
Provides a list of custom terminologies associated with your account.
translateText(params = {}, callback) ⇒ AWS.Request
Translates input text from the source language to the target language. It is not necessary to use English (en) as either the source or the target language but not all language combinations are supported by Amazon Translate. For more information, see Supported Language Pairs.
-
Arabic (ar)
-
Chinese (Simplified) (zh)
-
Chinese (Traditional) (zh-TW)
-
Czech (cs)
-
Danish (da)
-
Dutch (nl)
-
English (en)
-
Finnish (fi)
-
French (fr)
-
German (de)
-
Hebrew (he)
-
Indonesian (id)
-
Italian (it)
-
Japanese (ja)
-
Korean (ko)
-
Polish (pl)
-
Portuguese (pt)
-
Russian (ru)
-
Spanish (es)
-
Swedish (sv)
-
Turkish (tr)
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.