Returns a copy of a locale.


func CFLocaleCreateCopy(_ allocator: CFAllocator!, _ locale: CFLocale!) -> CFLocale!



The allocator to use to allocate memory for the new object. Pass NULL or kCFAllocatorDefault to use the current default allocator.


The locale object to copy.

Return Value

A new locale that is a copy of locale. Returns NULL if there was a problem creating the object. Ownership follows the The Create Rule.

See Also

Creating a Locale

func CFLocaleCopyCurrent() -> CFLocale!

Returns a copy of the logical locale for the current user.

func CFLocaleCreate(CFAllocator!, CFLocaleIdentifier!) -> CFLocale!

Creates a locale for the given arbitrary locale identifier.

func CFLocaleGetSystem() -> CFLocale!

Returns the root, canonical locale.

Beta Software

This documentation contains preliminary information about an API or technology in development. This information is subject to change, and software implemented according to this documentation should be tested with final operating system software.

Learn more about using Apple's beta software