<!--
{
  "availability" : [
    "iOS: 27.0.0 -",
    "iPadOS: 27.0.0 -",
    "macCatalyst: 27.0.0 -",
    "macOS: 27.0.0 -",
    "tvOS: 27.0.0 -",
    "visionOS: 27.0.0 -",
    "watchOS: 27.0.0 -"
  ],
  "documentType" : "symbol",
  "framework" : "FoundationModels",
  "identifier" : "/documentation/FoundationModels/LanguageModelError/UnsupportedLanguageOrLocale/init(languageCode:debugDescription:metadata:)",
  "metadataVersion" : "0.1.0",
  "role" : "Initializer",
  "symbol" : {
    "kind" : "Initializer",
    "modules" : [
      "Foundation Models",
      "FoundationModels"
    ],
    "preciseIdentifier" : "s:16FoundationModels18LanguageModelErrorO011UnsupportedC8OrLocaleV12languageCode16debugDescription8metadataAE0A00H0V0cJ0V_SSSDySSs8Sendable_pGtcfc"
  },
  "title" : "init(languageCode:debugDescription:metadata:)"
}
-->

# init(languageCode:debugDescription:metadata:)

Creates information describing a language or locale the model doesn’t support.

```
init(languageCode: Locale.LanguageCode, debugDescription: String, metadata: [String : any Sendable] = [:])
```

## Parameters

`languageCode`

The language code that the model doesn’t support.

`debugDescription`

A debug description to help developers diagnose issues during development.

`metadata`

Additional information about the failure, keyed by name.

---

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)