<!--
{
  "availability" : [
    "iOS: 2.0.0 -",
    "iPadOS: 2.0.0 -",
    "macCatalyst: 13.0.0 -",
    "macOS: 10.0.0 -",
    "tvOS: 9.0.0 -",
    "visionOS: 1.0.0 -",
    "watchOS: 2.0.0 -"
  ],
  "documentType" : "symbol",
  "framework" : "Foundation",
  "identifier" : "/documentation/Foundation/NSLocale/Key",
  "metadataVersion" : "0.1.0",
  "role" : "Structure",
  "symbol" : {
    "kind" : "Structure",
    "modules" : [
      "Foundation"
    ],
    "preciseIdentifier" : "c:@T@NSLocaleKey"
  },
  "title" : "NSLocale.Key"
}
-->

# NSLocale.Key

The keys used to access components of a locale.

```
struct Key
```

## Discussion

Use these keys with the methods [`object(forKey:)`](/documentation/Foundation/NSLocale/object(forKey:)) and [`displayName(forKey:value:)`](/documentation/Foundation/NSLocale/displayName(forKey:value:)).

## Topics

### Initializers

[`init(rawValue:)`](/documentation/Foundation/NSLocale/Key/init(rawValue:))

### Keys

[`NSLocaleIdentifier`](/documentation/Foundation/NSLocale/Key/identifier)

The locale identifier.

[`NSLocaleCountryCode`](/documentation/Foundation/NSLocale/Key/countryCode)

The locale country or region code.

[`NSLocaleLanguageCode`](/documentation/Foundation/NSLocale/Key/languageCode)

The locale language code.

[`NSLocaleScriptCode`](/documentation/Foundation/NSLocale/Key/scriptCode)

The locale script code.

[`NSLocaleVariantCode`](/documentation/Foundation/NSLocale/Key/variantCode)

The locale variant code.

[`NSLocaleExemplarCharacterSet`](/documentation/Foundation/NSLocale/Key/exemplarCharacterSet)

The exemplar character set for the locale.

[`NSLocaleCalendar`](/documentation/Foundation/NSLocale/Key/calendar)

The calendar associated with the locale.

[`NSLocaleCollationIdentifier`](/documentation/Foundation/NSLocale/Key/collationIdentifier)

The collation associated with the locale.

[`NSLocaleCollatorIdentifier`](/documentation/Foundation/NSLocale/Key/collatorIdentifier)

The collation identifier for the locale.

[`NSLocaleUsesMetricSystem`](/documentation/Foundation/NSLocale/Key/usesMetricSystem)

A flag that indicates whether the locale uses the metric system.

[`NSLocaleMeasurementSystem`](/documentation/Foundation/NSLocale/Key/measurementSystem)

The measurement system associated with the locale.

[`NSLocaleDecimalSeparator`](/documentation/Foundation/NSLocale/Key/decimalSeparator)

The decimal separator associated with the locale.

[`NSLocaleGroupingSeparator`](/documentation/Foundation/NSLocale/Key/groupingSeparator)

The numeric grouping separator associated with the locale.

[`NSLocaleCurrencySymbol`](/documentation/Foundation/NSLocale/Key/currencySymbol)

The currency symbol associated with the locale.

[`NSLocaleCurrencyCode`](/documentation/Foundation/NSLocale/Key/currencyCode)

The currency code associated with the locale.

[`NSLocaleQuotationEndDelimiterKey`](/documentation/Foundation/NSLocale/Key/quotationEndDelimiterKey)

The end quotation symbol associated with the locale.

[`NSLocaleQuotationBeginDelimiterKey`](/documentation/Foundation/NSLocale/Key/quotationBeginDelimiterKey)

The begin quotation symbol associated with the locale.

[`NSLocaleAlternateQuotationEndDelimiterKey`](/documentation/Foundation/NSLocale/Key/alternateQuotationEndDelimiterKey)

The alternate end quotation symbol associated with the locale.

[`NSLocaleAlternateQuotationBeginDelimiterKey`](/documentation/Foundation/NSLocale/Key/alternateQuotationBeginDelimiterKey)

The alternating begin quotation symbol associated with the locale.

## Relationships

### Conforms To

[`Sendable`](/documentation/Swift/Sendable)

[`Hashable`](/documentation/Swift/Hashable)

[`Equatable`](/documentation/Swift/Equatable)

[`SendableMetatype`](/documentation/Swift/SendableMetatype)

[`RawRepresentable`](/documentation/Swift/RawRepresentable)

---

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)