---
title: unableToIdentifyLanguage
framework: translation
role: symbol
role_heading: Type Property
path: translation/translationerror/unabletoidentifylanguage
---

# unableToIdentifyLanguage

The framework can’t identify the source language automatically.

## Declaration

```swift
static let unableToIdentifyLanguage: TranslationError
```

## Discussion

Discussion The framework throws this error when you call prepareTranslation() without specifying the source language, or when using 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.

## See Also

### Handling general errors

- [nothingToTranslate](translation/translationerror/nothingtotranslate.md)
- [internalError](translation/translationerror/internalerror.md)
- [alreadyCancelled](translation/translationerror/alreadycancelled.md)
- [notInstalled](translation/translationerror/notinstalled.md)
