---
title: "CFLocaleCreate(_:_:)"
framework: corefoundation
role: symbol
role_heading: Function
path: "corefoundation/cflocalecreate(_:_:)"
---

# CFLocaleCreate(_:_:)

Creates a locale for the given arbitrary locale identifier.

## Declaration

```swift
func CFLocaleCreate(_ allocator: CFAllocator!, _ localeIdentifier: CFLocaleIdentifier!) -> CFLocale!
```

## Parameters

- `allocator`: The allocator to use to allocate memory for the new object. Pass NULL or kCFAllocatorDefault to use the current default allocator.
- `localeIdentifier`: A string representation of an arbitrary locale identifier.

## Return Value

Return Value A new locale that corresponds to the arbitrary locale identifier localeIdentifier. Returns NULL if there was a problem creating the object. Ownership follows the The Create Rule.

## See Also

### Creating a Locale

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