---
title: CFLocale
framework: corefoundation
role: symbol
role_heading: Class
path: corefoundation/cflocale
---

# CFLocale

## Declaration

```swift
class CFLocale
```

## Overview

Overview Unicode operations such as collation and text boundary determination can be affected by the conventions of a particular language or region. CFLocale objects specify language-specific or region-specific information for locale-sensitive operations. The CFLocale opaque type provides support for obtaining available locales, obtaining localized locale names, and converting among locale data formats. Locale identifiers in macOS follow the IETF’s BCP 47. CFLocale never uses Script Manager codes (except for the legacy support provided by CFLocaleCreateCanonicalLocaleIdentifierFromScriptManagerCodes(_:_:_:))—the Script Manager and all its concepts are deprecated. For more information on locale identifiers, read Internationalization and Localization Guide. It is also useful to read the ICU’s User Guide for the Locale Class. CFLocale is “toll-free bridged” with its Cocoa Foundation counterpart, NSLocale. This means that the Core Foundation type is interchangeable in function or method calls with the bridged Foundation object. Therefore, in a method where you see an NSLocale * parameter, you can pass in a CFLocaleRef, and in a function where you see a CFLocaleRef parameter, you can pass in an NSLocale instance. See Toll-Free Bridged Types for more information on toll-free bridging.

## Topics

### Creating a Locale

- [CFLocaleCopyCurrent()](corefoundation/cflocalecopycurrent().md)
- [CFLocaleCreate(_:_:)](corefoundation/cflocalecreate(_:_:).md)
- [CFLocaleCreateCopy(_:_:)](corefoundation/cflocalecreatecopy(_:_:).md)
- [CFLocaleGetSystem()](corefoundation/cflocalegetsystem().md)

### Getting System Locale Information

- [CFLocaleCopyAvailableLocaleIdentifiers()](corefoundation/cflocalecopyavailablelocaleidentifiers().md)

### Getting ISO Information

- [CFLocaleCopyISOCountryCodes()](corefoundation/cflocalecopyisocountrycodes().md)
- [CFLocaleCopyISOLanguageCodes()](corefoundation/cflocalecopyisolanguagecodes().md)
- [CFLocaleCopyISOCurrencyCodes()](corefoundation/cflocalecopyisocurrencycodes().md)
- [CFLocaleCopyCommonISOCurrencyCodes()](corefoundation/cflocalecopycommonisocurrencycodes().md)

### Language Preferences

- [CFLocaleCopyPreferredLanguages()](corefoundation/cflocalecopypreferredlanguages().md)

### Getting Information About a Locale

- [CFLocaleCopyDisplayNameForPropertyValue(_:_:_:)](corefoundation/cflocalecopydisplaynameforpropertyvalue(_:_:_:).md)
- [CFLocaleGetValue(_:_:)](corefoundation/cflocalegetvalue(_:_:).md)
- [CFLocaleGetIdentifier(_:)](corefoundation/cflocalegetidentifier(_:).md)

### Getting and Creating Locale Identifiers

- [CFLocaleCreateCanonicalLocaleIdentifierFromScriptManagerCodes(_:_:_:)](corefoundation/cflocalecreatecanonicallocaleidentifierfromscriptmanagercodes(_:_:_:).md)
- [CFLocaleCreateCanonicalLanguageIdentifierFromString(_:_:)](corefoundation/cflocalecreatecanonicallanguageidentifierfromstring(_:_:).md)
- [CFLocaleCreateCanonicalLocaleIdentifierFromString(_:_:)](corefoundation/cflocalecreatecanonicallocaleidentifierfromstring(_:_:).md)
- [CFLocaleCreateComponentsFromLocaleIdentifier(_:_:)](corefoundation/cflocalecreatecomponentsfromlocaleidentifier(_:_:).md)
- [CFLocaleCreateLocaleIdentifierFromComponents(_:_:)](corefoundation/cflocalecreatelocaleidentifierfromcomponents(_:_:).md)
- [CFLocaleCreateLocaleIdentifierFromWindowsLocaleCode(_:_:)](corefoundation/cflocalecreatelocaleidentifierfromwindowslocalecode(_:_:).md)
- [CFLocaleGetWindowsLocaleCodeFromLocaleIdentifier(_:)](corefoundation/cflocalegetwindowslocalecodefromlocaleidentifier(_:).md)

### Getting Line and Character Direction for a Language

- [CFLocaleGetLanguageCharacterDirection(_:)](corefoundation/cflocalegetlanguagecharacterdirection(_:).md)
- [CFLocaleGetLanguageLineDirection(_:)](corefoundation/cflocalegetlanguagelinedirection(_:).md)

### Getting the CFLocale Type ID

- [CFLocaleGetTypeID()](corefoundation/cflocalegettypeid().md)

### Constants

- [CFLocaleLanguageDirection](corefoundation/cflocalelanguagedirection.md)
- [Locale Property Keys](corefoundation/locale-property-keys.md)
- [Locale Calendar Identifiers](corefoundation/locale-calendar-identifiers.md)
- [Locale Change Notification](corefoundation/locale-change-notification.md)

## Relationships

### Conforms To

- [Equatable](swift/equatable.md)
- [Hashable](swift/hashable.md)

## See Also

### Related Documentation

- [Internationalization and Localization Guide](apple-archive/documentation/MacOSX/Conceptual/BPInternational/Introduction.md)

### Opaque Types

- [CFAllocator](corefoundation/cfallocator.md)
- [CFArray](corefoundation/cfarray.md)
- [CFAttributedString](corefoundation/cfattributedstring.md)
- [CFBag](corefoundation/cfbag.md)
- [CFBinaryHeap](corefoundation/cfbinaryheap.md)
- [CFBitVector](corefoundation/cfbitvector.md)
- [CFBoolean](corefoundation/cfboolean.md)
- [CFBundle](corefoundation/cfbundle.md)
- [CFCalendar](corefoundation/cfcalendar.md)
- [CFCharacterSet](corefoundation/cfcharacterset.md)
- [CFData](corefoundation/cfdata.md)
- [CFDate](corefoundation/cfdate.md)
- [CFDateFormatter](corefoundation/cfdateformatter.md)
- [CFDictionary](corefoundation/cfdictionary.md)
- [CFError](corefoundation/cferror.md)
