<!--
{
  "availability" : [
    "iOS: 18.0.0 -",
    "iPadOS: 18.0.0 -",
    "macCatalyst: 26.0.0 -",
    "macOS: 15.0.0 -"
  ],
  "documentType" : "symbol",
  "framework" : "Translation",
  "identifier" : "/documentation/Translation/TranslationSession/Request",
  "metadataVersion" : "0.1.0",
  "role" : "Structure",
  "symbol" : {
    "kind" : "Structure",
    "modules" : [
      "Translation"
    ],
    "preciseIdentifier" : "s:11Translation0A7SessionC7RequestV"
  },
  "title" : "TranslationSession.Request"
}
-->

# TranslationSession.Request

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

```
struct Request
```

## Overview

Create a translation request to translate a string of text.
Initialize the request using [`init(sourceText:clientIdentifier:)`](/documentation/Translation/TranslationSession/Request/init(sourceText:clientIdentifier:)-ruyz).
Set the [`sourceText`](/documentation/Translation/TranslationSession/Request/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`](/documentation/Translation/TranslationSession/Request/clientIdentifier)
on the sent request, then matching it with the [`clientIdentifier`](/documentation/Translation/TranslationSession/Response/clientIdentifier)
of the received response when the translation completes.

## Topics

### Initializing a translation request

[`init(sourceText:clientIdentifier:)`](/documentation/Translation/TranslationSession/Request/init(sourceText:clientIdentifier:)-8fung)

Creates a request for translating a single attributed string.

[`init(sourceText:clientIdentifier:)`](/documentation/Translation/TranslationSession/Request/init(sourceText:clientIdentifier:)-ruyz)

Creates a request for translating a single string of text.

### Specifying text to translate

[`sourceText`](/documentation/Translation/TranslationSession/Request/sourceText)

The plain text input to translate.

[`attributedSourceText`](/documentation/Translation/TranslationSession/Request/attributedSourceText)

The text to translate, including styling like bold text, italics, and hyperlink data for linking
between data sources.

### Identifying requests

[`clientIdentifier`](/documentation/Translation/TranslationSession/Request/clientIdentifier)

An optional unique identifier to associate a translation request with its response.



---

Copyright &copy; 2026 Apple Inc. All rights reserved. | [Terms of Use](https://www.apple.com/legal/internet-services/terms/site.html) | [Privacy Policy](https://www.apple.com/privacy/privacy-policy)