Contents

TranslationSession.Request

A translation request containing a single item of text to translate.

Declaration

struct Request

Overview

Create a translation request to translate a string of text. Initialize the request using init(sourceText:clientIdentifier:). Set the sourceText to the string of text you want to translate. Then pass that request in an array to one of the batch translation functions.

Keep track of the correspondence between the responses and requests by setting the clientIdentifier on the sent request, then matching it with the clientIdentifier of the received response when the translation completes.

Topics

Initializing a translation request

Specifying text to translate

Identifying requests

See Also

Translating the text