<!--
{
  "availability" : [
    "iOS: 18.4.0 -",
    "iPadOS: 18.4.0 -",
    "macCatalyst: 18.4.0 -"
  ],
  "documentType" : "symbol",
  "framework" : "TranslationUIProvider",
  "identifier" : "/documentation/TranslationUIProvider/TranslationUIProviderContext/finish(translation:)",
  "metadataVersion" : "0.1.0",
  "role" : "Instance Method",
  "symbol" : {
    "kind" : "Instance Method",
    "modules" : [
      "TranslationUIProvider"
    ],
    "preciseIdentifier" : "s:21TranslationUIProvider0aB7ContextP6finish11translationy10Foundation16AttributedStringVSg_tF"
  },
  "title" : "finish(translation:)"
}
-->

# finish(translation:)

Completes the translation after which the framework closes the sheet.

```
func finish(translation: AttributedString?)
```

## Parameters

`translation`

The optional translation result. If `nil` and the source text allows replacement, no replacement takes place. If non-`nil` and the source text doesn’t allow replacement, framework ignores the parameter. It is recommended that providers attempt to preserve any attributes of the source text, but it is not a requirement.

---

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)