---
title: NSLocale.Key
framework: foundation
role: symbol
role_heading: Structure
path: foundation/nslocale/key
---

# NSLocale.Key

The keys used to access components of a locale.

## Declaration

```swift
struct Key
```

## Discussion

Discussion Use these keys with the methods object(forKey:) and displayName(forKey:value:).

## Topics

### Initializers

- [init(rawValue:)](foundation/nslocale/key/init(rawvalue:).md)

### Keys

- [identifier](foundation/nslocale/key/identifier.md)
- [countryCode](foundation/nslocale/key/countrycode.md)
- [languageCode](foundation/nslocale/key/languagecode.md)
- [scriptCode](foundation/nslocale/key/scriptcode.md)
- [variantCode](foundation/nslocale/key/variantcode.md)
- [exemplarCharacterSet](foundation/nslocale/key/exemplarcharacterset.md)
- [calendar](foundation/nslocale/key/calendar.md)
- [collationIdentifier](foundation/nslocale/key/collationidentifier.md)
- [collatorIdentifier](foundation/nslocale/key/collatoridentifier.md)
- [usesMetricSystem](foundation/nslocale/key/usesmetricsystem.md)
- [measurementSystem](foundation/nslocale/key/measurementsystem.md)
- [decimalSeparator](foundation/nslocale/key/decimalseparator.md)
- [groupingSeparator](foundation/nslocale/key/groupingseparator.md)
- [currencySymbol](foundation/nslocale/key/currencysymbol.md)
- [currencyCode](foundation/nslocale/key/currencycode.md)
- [quotationEndDelimiterKey](foundation/nslocale/key/quotationenddelimiterkey.md)
- [quotationBeginDelimiterKey](foundation/nslocale/key/quotationbegindelimiterkey.md)
- [alternateQuotationEndDelimiterKey](foundation/nslocale/key/alternatequotationenddelimiterkey.md)
- [alternateQuotationBeginDelimiterKey](foundation/nslocale/key/alternatequotationbegindelimiterkey.md)

## Relationships

### Conforms To

- [Equatable](swift/equatable.md)
- [Hashable](swift/hashable.md)
- [RawRepresentable](swift/rawrepresentable.md)
- [Sendable](swift/sendable.md)
- [SendableMetatype](swift/sendablemetatype.md)

## See Also

### Accessing Locale Information by Key

- [object(forKey:)](foundation/nslocale/object(forkey:).md)
- [displayName(forKey:value:)](foundation/nslocale/displayname(forkey:value:).md)
