<!--
{
  "availability" : [
    "iOS: 18.0.0 -",
    "iPadOS: 18.0.0 -",
    "macCatalyst: 26.0.0 -",
    "macOS: 15.0.0 -"
  ],
  "documentType" : "symbol",
  "framework" : "Translation",
  "identifier" : "/documentation/Translation/LanguageAvailability/status(for:to:)",
  "metadataVersion" : "0.1.0",
  "role" : "Instance Method",
  "symbol" : {
    "kind" : "Instance Method",
    "modules" : [
      "Translation"
    ],
    "preciseIdentifier" : "s:11Translation20LanguageAvailabilityC6status3for2toAC6StatusOSS_10Foundation6LocaleV0B0VSgtYaKF"
  },
  "title" : "status(for:to:)"
}
-->

# status(for:to:)

Checks to see if the framework supports the language pairing based off a string of sample text.

```
func status(for text: String, to target: Locale.Language?) async throws -> LanguageAvailability.Status
```

## Parameters

`text`

A sample string of text representing the source language you want to translation from.

`target`

The target language you want to translate content into. When set to `nil`,
the system picks an appropriate target based on the person’s preferred languages and returns
the status for those languages.

## Return Value

The availability status for the language pairing to use in the translation.

## Discussion

Use this function when you don’t know the source language and want the framework to
attempt a translation based on the sample text you pass in.

Pass in a string of sample `text` representing the language you want to translate from.
When you do, the system automatically tries to detect the language of the text you pass in.
If it can’t, it throws a [`TranslationError`](/documentation/Translation/TranslationError).

If it can detect the source language of the text, it checks for necessary language
asset downloads and whether they’re ready for use.

> 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)