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

# TranslationError

Error codes describing why the framework can’t perform a translation.

```
struct TranslationError
```

## Topics

### Handling general errors

[`nothingToTranslate`](/documentation/Translation/TranslationError/nothingToTranslate)

No content to translate.

[`unableToIdentifyLanguage`](/documentation/Translation/TranslationError/unableToIdentifyLanguage)

The framework can’t identify the source language automatically.

[`internalError`](/documentation/Translation/TranslationError/internalError)

An error occurred internal to the translation engine.

[`alreadyCancelled`](/documentation/Translation/TranslationError/alreadyCancelled)

An error describing a translation session that you’ve cancelled before, which prevents the session from producing additional results.

[`notInstalled`](/documentation/Translation/TranslationError/notInstalled)

The device doesn’t have the necessary languages downloaded to perform a translation and the
session can’t request the person to download them.

### Handling unsupported errors

[`unsupportedSourceLanguage`](/documentation/Translation/TranslationError/unsupportedSourceLanguage)

The framework doesn’t support the specified or detected source language.

[`unsupportedTargetLanguage`](/documentation/Translation/TranslationError/unsupportedTargetLanguage)

The framework doesn’t support the specified or chosen target language.

[`unsupportedLanguagePairing`](/documentation/Translation/TranslationError/unsupportedLanguagePairing)

The framework doesn’t support the specified source and target language pairing.

### Describing errors

[`errorDescription`](/documentation/Translation/TranslationError/errorDescription)

A localized message describing the error.

[`failureReason`](/documentation/Translation/TranslationError/failureReason)

A localized message describing the reason for the failure.

### Comparing errors

[`~=(_:_:)`](/documentation/Translation/TranslationError/~=(_:_:))

This operator allows you to check for a given value of a translation error and handle each error case.

## Relationships

### Conforms To

[`LocalizedError`](/documentation/Foundation/LocalizedError)

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

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

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

---

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)