<!--
{
  "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/unableToIdentifyLanguage",
  "metadataVersion" : "0.1.0",
  "role" : "Type Property",
  "symbol" : {
    "kind" : "Type Property",
    "modules" : [
      "Translation"
    ],
    "preciseIdentifier" : "s:11Translation0A5ErrorV24unableToIdentifyLanguageACvpZ"
  },
  "title" : "unableToIdentifyLanguage"
}
-->

# unableToIdentifyLanguage

The framework can’t identify the source language automatically.

```
static let unableToIdentifyLanguage: TranslationError
```

## Discussion

The framework throws this error when you call
[`prepareTranslation()`](/documentation/Translation/TranslationSession/prepareTranslation()) without specifying the source language,
or when using [`status(for:to:)`](/documentation/Translation/LanguageAvailability/status(for:to:)) and it
can’t automatically identify the source language of the sample text you pass in.

> Note: For best results in automatic language detection, pass in a sample string
> of at least 20 characters in length.

---

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)