<!--
{
  "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/Response",
  "metadataVersion" : "0.1.0",
  "role" : "Structure",
  "symbol" : {
    "kind" : "Structure",
    "modules" : [
      "Translation"
    ],
    "preciseIdentifier" : "s:11Translation0A7SessionC8ResponseV"
  },
  "title" : "TranslationSession.Response"
}
-->

# TranslationSession.Response

The response to a translation request.

```
struct Response
```

## Overview

You get a single response structure after you translate a string, or when
you call one of the batch translation methods passing in an array of translation requests.
When the translation completes, a response instance returns with the translation result
along with properties the framework used to perform the translation.

## Topics

### Initializing a response

[`init(sourceLanguage:targetLanguage:sourceText:targetText:clientIdentifier:)`](/documentation/Translation/TranslationSession/Response/init(sourceLanguage:targetLanguage:sourceText:targetText:clientIdentifier:))

Creates an instance of a translation response.

[`init(sourceLanguage:targetLanguage:sourceAttributedText:targetAttributedText:clientIdentifier:)`](/documentation/Translation/TranslationSession/Response/init(sourceLanguage:targetLanguage:sourceAttributedText:targetAttributedText:clientIdentifier:))

Creates an instance of a translation response with formatted text.

### Getting translation results

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

The original text to translate from.

[`targetText`](/documentation/Translation/TranslationSession/Response/targetText)

The translated text.

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

The original translated text, including style formatting and links.

[`attributedTargetText`](/documentation/Translation/TranslationSession/Response/attributedTargetText)

The translated formatted text.

### Getting translation details

[`sourceLanguage`](/documentation/Translation/TranslationSession/Response/sourceLanguage)

The language that the framework translated the text from.

[`targetLanguage`](/documentation/Translation/TranslationSession/Response/targetLanguage)

The language that the framework translated the text into.

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

The unique identifier matching the client identifier set in the translation request.

## Relationships

### Conforms To

[`SendableMetatype`](/documentation/Swift/SendableMetatype)

[`Sendable`](/documentation/Swift/Sendable)

---

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)