<!--
{
  "availability" : [
    "iOS: 16.0.0 -",
    "iPadOS: 16.0.0 -",
    "macCatalyst: 16.0.0 -",
    "macOS: 13.0.0 -",
    "tvOS: 16.0.0 -",
    "visionOS: 1.0.0 -",
    "watchOS: 9.0.0 -"
  ],
  "documentType" : "symbol",
  "framework" : "Foundation",
  "identifier" : "/documentation/Foundation/Locale/Language-swift.struct",
  "metadataVersion" : "0.1.0",
  "role" : "Structure",
  "symbol" : {
    "kind" : "Structure",
    "modules" : [
      "Foundation"
    ],
    "preciseIdentifier" : "s:10Foundation6LocaleV8LanguageV"
  },
  "title" : "Locale.Language"
}
-->

# Locale.Language

A type that represents a language, as used in a locale.

```
struct Language
```

## Topics

### Creating a language

[`init(identifier:)`](/documentation/Foundation/Locale/Language-swift.struct/init(identifier:))

Creates a language from an identifier.

[`init(components:)`](/documentation/Foundation/Locale/Language-swift.struct/init(components:))

Creates a language from its component values.

[`Locale.Language.Components`](/documentation/Foundation/Locale/Language-swift.struct/Components)

A type that identifies a language by its various components.

[`init(languageCode:script:region:)`](/documentation/Foundation/Locale/Language-swift.struct/init(languageCode:script:region:))

Creates a language from a given language code, script, and region.

### Examining language properties

[`languageCode`](/documentation/Foundation/Locale/Language-swift.struct/languageCode)

The language code that identifies the language.

[`Locale.LanguageCode`](/documentation/Foundation/Locale/LanguageCode-swift.struct)

An alphabetical code associated with a language.

[`region`](/documentation/Foundation/Locale/Language-swift.struct/region)

The region used with the language.

[`Locale.Region`](/documentation/Foundation/Locale/Region-swift.struct)

A type that represents a geographic region, for use in specifying a locale or language.

[`script`](/documentation/Foundation/Locale/Language-swift.struct/script)

The written script of the language.

[`Locale.Script`](/documentation/Foundation/Locale/Script)

The written script used with a given language.

[`characterDirection`](/documentation/Foundation/Locale/Language-swift.struct/characterDirection)

The ordering of characters within a line.

[`Locale.LanguageDirection`](/documentation/Foundation/Locale/LanguageDirection)

An alias for the standard set of language directions.

### Examining language relationships

[`parent`](/documentation/Foundation/Locale/Language-swift.struct/parent)

The parent language of this language, if available.

[`hasCommonParent(with:)`](/documentation/Foundation/Locale/Language-swift.struct/hasCommonParent(with:))

Returns a Boolean value that indicates if the given language shares a common parent with this language.

[`isEquivalent(to:)`](/documentation/Foundation/Locale/Language-swift.struct/isEquivalent(to:))

Returns a Boolean value that indicates whether this language and another language are equivalent after expanding missing components.

### Using system languages

[`systemLanguages`](/documentation/Foundation/Locale/Language-swift.struct/systemLanguages)

An array of the system’s supported languages.



---

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)