<!--
{
  "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/Collation-swift.struct",
  "metadataVersion" : "0.1.0",
  "role" : "Structure",
  "symbol" : {
    "kind" : "Structure",
    "modules" : [
      "Foundation"
    ],
    "preciseIdentifier" : "s:10Foundation6LocaleV9CollationV"
  },
  "title" : "Locale.Collation"
}
-->

# Locale.Collation

A type that represents the string sort order used by the locale.

```
struct Collation
```

## Topics

### Creating a collation

[`init(String)`](/documentation/Foundation/Locale/Collation-swift.struct/init(_:))

Creates a collation from a BCP 47 identifier.

[`init(stringLiteral: String)`](/documentation/Foundation/Locale/Collation-swift.struct/init(stringLiteral:))

Creates a collation from a BCP 47 identifier as a string literal.

### Examining collation properties

[`var identifier: String`](/documentation/Foundation/Locale/Collation-swift.struct/identifier)

The collation’s BCP 47 identifier.

### Using special-purpose collations

[`static let standard: Locale.Collation`](/documentation/Foundation/Locale/Collation-swift.struct/standard)

A collation that provides the default ordering for each language.

[`static let searchRules: Locale.Collation`](/documentation/Foundation/Locale/Collation-swift.struct/searchRules)

A collation used for string search.

### Type Properties

[`static var availableCollations: [Locale.Collation]`](/documentation/Foundation/Locale/Collation-swift.struct/availableCollations)

A list of available collations on the system.

### Type Methods

[`static func availableCollations(for: Locale.Language) -> [Locale.Collation]`](/documentation/Foundation/Locale/Collation-swift.struct/availableCollations(for:))

A list of available collations for the specified `language` in the order that it is most likely to make a difference.

## Relationships

### Conforms To

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

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

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

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

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

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

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

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

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

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

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

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

---

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)