Contents

CFLocaleCreateLocaleIdentifierFromComponents(_:_:)

Returns a locale identifier consisting of language, script, country or region, variant, and keyword/value pairs derived from a dictionary containing the source information.

Declaration

func CFLocaleCreateLocaleIdentifierFromComponents(_ allocator: CFAllocator!, _ dictionary: CFDictionary!) -> CFLocaleIdentifier!

Parameters

  • allocator:

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

  • dictionary:

    The dictionary to use when creating the locale identifier.

Return Value

A locale identifier consisting of language, script, country or region, variant, and keyword/value pairs derived from dictionary. Returns NULL if there was a problem creating the string. Ownership follows the The Create Rule.

Discussion

Reverses the actions of CFLocaleCreateComponentsFromLocaleIdentifier(_:_:), creating a single string from the data in the specified dictionary. For example, the dictionary {kCFLocaleLanguageCode``=en``, kCFLocaleCountryCode``=US``, kCFLocaleCalendarIdentifier``=``kCFJapaneseCalendar``} becomes "en_US@calendar=japanese".

See Also

Getting and Creating Locale Identifiers