TranslateClient Class

(QtAws::Translate::TranslateClient)

The TranslateClient class provides access to the Amazon Translate service. More...

Header: #include <TranslateClient>
Inherits: QtAws::Core::AwsAbstractClient

Public Functions

TranslateClient(const QtAws::Core::AwsRegion::Region region = QtAws::Core::AwsRegion::InvalidRegion, QtAws::Core::AwsAbstractCredentials *credentials = NULL, QNetworkAccessManager * const manager = NULL, QObject * const parent = 0)
TranslateClient(const QUrl &endpoint, QtAws::Core::AwsAbstractCredentials *credentials = NULL, QNetworkAccessManager * const manager = NULL, QObject * const parent = 0)

Public Slots

TranslateTextResponse *translateText(const TranslateTextRequest &request)

Additional Inherited Members

Detailed Description

The TranslateClient class provides access to the Amazon Translate service.

Provides translation between English and one of six languages, or between one of the six languages and

Member Function Documentation

TranslateClient::TranslateClient(const QtAws::Core::AwsRegion::Region region = QtAws::Core::AwsRegion::InvalidRegion, QtAws::Core::AwsAbstractCredentials *credentials = NULL, QNetworkAccessManager * const manager = NULL, QObject * const parent = 0)

Constructs a TranslateClient object.

The new client object will region, credentials, and manager for network operations.

The new object will be owned by parent, if set.

TranslateClient::TranslateClient(const QUrl &endpoint, QtAws::Core::AwsAbstractCredentials *credentials = NULL, QNetworkAccessManager * const manager = NULL, QObject * const parent = 0)

This function overloads TranslateClient().

This overload allows the caller to specify the specific endpoint to send requests to. Typically, it is easier to use the alternative constructor, which allows the caller to specify an AWS region instead, in which case this client will determine the correct endpoint for the given region automatically (via AwsEndpoint::getEndpoint).

See also QtAws::Core::AwsEndpoint::getEndpoint.

[slot] TranslateTextResponse *TranslateClient::translateText(const TranslateTextRequest &request)

Sends request to the TranslateClient service, and returns a pointer to an TranslateTextResponse object to track the result.

Note: The caller is to take responsbility for the resulting pointer.

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> <ul> <li>

Arabic

(ar> </li> <li>

Chinese (Simplified)

(zh> </li> <li>

French

(fr> </li> <li>

German

(de> </li> <li>

Portuguese

(pt> </li> <li>

Spanish

(es> </li> </ul>

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

© 2018 Paul Colby Documentation contributions included herein are the copyrights of their respective owners. The documentation provided herein is licensed under the terms of the GNU Free Documentation License version 1.3 as published by the Free Software Foundation. Qt and respective logos are trademarks of The Qt Company Ltd. in Finland and/or other countries worldwide. All other trademarks are property of their respective owners.