CFLocale Reference
| Derived from | |
| Framework | CoreFoundation/CoreFoundation.h |
| Declared in | CFLocale.h |
| Companion guides |
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 OS X 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 and the use of CFLocale, see Locales Programming 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.
Functions by Task
Creating a Locale
Getting System Locale Information
Getting ISO Information
-
CFLocaleCopyISOCountryCodes -
CFLocaleCopyISOLanguageCodes -
CFLocaleCopyISOCurrencyCodes -
CFLocaleCopyCommonISOCurrencyCodes
Language Preferences
Getting Information About a Locale
Getting and Creating Locale Identifiers
-
CFLocaleCreateCanonicalLocaleIdentifierFromScriptManagerCodes -
CFLocaleCreateCanonicalLanguageIdentifierFromString -
CFLocaleCreateCanonicalLocaleIdentifierFromString -
CFLocaleCreateComponentsFromLocaleIdentifier -
CFLocaleCreateLocaleIdentifierFromComponents -
CFLocaleCreateLocaleIdentifierFromWindowsLocaleCode -
CFLocaleGetWindowsLocaleCodeFromLocaleIdentifier
Getting Line and Character Direction for a Language
Getting the CFLocale Type ID
Functions
CFLocaleCopyAvailableLocaleIdentifiers
Returns an array of CFString objects that represents all locales for which locale data is available.
CFArrayRef CFLocaleCopyAvailableLocaleIdentifiers ( void );
Return Value
An array of CFString objects that represents all locales for which locale data is available. Ownership follows the Create Rule.
Availability
- Available in iOS 2.0 and later.
Declared In
CFLocale.hCFLocaleCopyCommonISOCurrencyCodes
Returns an array of strings that represents ISO currency codes for currencies in common use.
CFArrayRef CFLocaleCopyCommonISOCurrencyCodes ( void );
Return Value
An array of CFString objects that represents ISO currency codes for currencies in common use. Ownership follows the Create Rule.
Availability
- Available in iOS 2.0 and later.
Declared In
CFLocale.hCFLocaleCopyCurrent
Returns a copy of the logical locale for the current user.
CFLocaleRef CFLocaleCopyCurrent ( void );
Return Value
The logical locale for the current user that is formed from the settings for the current user’s chosen system locale overlaid with any custom settings the user has specified in System Preferences. May return a retained cached object, not a new object. Ownership follows the Create Rule.
Discussion
Settings you get from this locale do not change as a user's preferences are changed so that your operations are consistent. Typically you perform some operations on the returned object and then release it. Since the returned object may be cached, you do not need to hold on to it indefinitely.
Note that locale settings are independent of the user’s language setting. The language of the current locale may not correspond to the language at the first index in the AppleLanguages array from user defaults. For more details, see “Locale Concepts” in Locales Programming Guide; see also CFLocaleCopyPreferredLanguages.
Availability
- Available in iOS 2.0 and later.
Declared In
CFLocale.hCFLocaleCopyDisplayNameForPropertyValue
Returns the display name for the given value.
CFStringRef CFLocaleCopyDisplayNameForPropertyValue ( CFLocaleRef displayLocale, CFStringRef key, CFStringRef value );
Parameters
- displayLocale
A locale object.
- key
A string that identifies the type that value is. It must be one of the standard locale property keys (see “Locale Property Keys”).
- value
The value for which the display name is required.
Return Value
The display name for value. Returns NULL if there was a problem creating the object. Ownership follows the Create Rule.
Discussion
Note that not all locale property keys have values with display name values.
Availability
- Available in iOS 2.0 and later.
Declared In
CFLocale.hCFLocaleCopyISOCountryCodes
Returns an array of CFString objects that represents all known legal ISO country codes.
CFArrayRef CFLocaleCopyISOCountryCodes ( void );
Return Value
An array of CFString objects that represents all known legal ISO country codes. Ownership follows the Create Rule.
Discussion
Note: many of these will not have any supporting locale data in OS X.
Availability
- Available in iOS 2.0 and later.
Declared In
CFLocale.hCFLocaleCopyISOCurrencyCodes
Returns an array of CFString objects that represents all known legal ISO currency codes.
CFArrayRef CFLocaleCopyISOCurrencyCodes ( void );
Return Value
An array of CFString objects that represents all known legal ISO currency codes.Ownership follows the Create Rule.
Discussion
Note: many of these will not have any supporting locale data in OS X.
Availability
- Available in iOS 2.0 and later.
Declared In
CFLocale.hCFLocaleCopyISOLanguageCodes
Returns an array of CFString objects that represents all known legal ISO language codes.
CFArrayRef CFLocaleCopyISOLanguageCodes ( void );
Return Value
An array of CFString objects that represents all known legal ISO language codes. Ownership follows the Create Rule.
Discussion
Note: many of these will not have any supporting locale data in OS X.
Availability
- Available in iOS 2.0 and later.
Declared In
CFLocale.hCFLocaleCopyPreferredLanguages
Returns the array of canonicalized locale IDs that the user prefers.
CFArrayRef CFLocaleCopyPreferredLanguages ( void );
Return Value
The array of canonicalized CFString locale IDs that the current user prefers. Ownership follows the Create Rule.
Availability
- Available in iOS 2.0 and later.
Declared In
CFLocale.hCFLocaleCreate
Creates a locale for the given arbitrary locale identifier.
CFLocaleRef CFLocaleCreate ( CFAllocatorRef allocator, CFStringRef localeIdentifier );
Parameters
- allocator
The allocator to use to allocate memory for the new object. Pass
NULLorkCFAllocatorDefaultto use the current default allocator.- localeIdentifier
A string representation of an arbitrary locale identifier.
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 Create Rule.
Availability
- Available in iOS 2.0 and later.
Declared In
CFLocale.hCFLocaleCreateCanonicalLanguageIdentifierFromString
Returns a canonical language identifier by mapping an arbitrary locale identification string to the canonical identifier
CFStringRef CFLocaleCreateCanonicalLanguageIdentifierFromString ( CFAllocatorRef allocator, CFStringRef localeIdentifier );
Parameters
- allocator
The allocator to use to allocate memory for the new object. Pass
NULLorkCFAllocatorDefaultto use the current default allocator.- localeIdentifier
A string representation of an arbitrary locale identifier.
Return Value
A string that represents the canonical language identifier for the specified arbitrary locale identifier. Returns NULL if there was a problem creating the object. Ownership follows the Create Rule.
Availability
- Available in iOS 2.0 and later.
Declared In
CFLocale.hCFLocaleCreateCanonicalLocaleIdentifierFromScriptManagerCodes
Returns a canonical locale identifier from given language and region codes.
CFStringRef CFLocaleCreateCanonicalLocaleIdentifierFromScriptManagerCodes ( CFAllocatorRef allocator, LangCode lcode, RegionCode rcode );
Parameters
- allocator
The allocator to use to allocate memory for the new object. Pass
NULLorkCFAllocatorDefaultto use the current default allocator.- lcode
An OS X language code.
- rcode
An OS X region code.
Return Value
A canonical locale identifier created by mapping lcode and rcode to a locale. Returns NULL if there was a problem creating the object. Ownership follows the Create Rule.
Availability
- Available in iOS 2.0 and later.
Declared In
CFLocale.hCFLocaleCreateCanonicalLocaleIdentifierFromString
Returns a canonical locale identifier by mapping an arbitrary locale identification string to the canonical identifier.
CFStringRef CFLocaleCreateCanonicalLocaleIdentifierFromString ( CFAllocatorRef allocator, CFStringRef localeIdentifier );
Parameters
- allocator
The allocator to use to allocate memory for the new object. Pass
NULLorkCFAllocatorDefaultto use the current default allocator.- localeIdentifier
A string representation of an arbitrary locale identifier (for example, “English”).
Return Value
A canonical locale identifier created by mapping the arbitrary locale identification string to the canonical identifier for the corresponding locale (for example, “en”). Returns NULL if there was a problem creating the object. Ownership follows the Create Rule.
Availability
- Available in iOS 2.0 and later.
Declared In
CFLocale.hCFLocaleCreateComponentsFromLocaleIdentifier
Returns a dictionary containing the result from parsing a locale ID consisting of language, script, country, variant, and keyword/value pairs.
CFDictionaryRef CFLocaleCreateComponentsFromLocaleIdentifier ( CFAllocatorRef allocator, CFStringRef localeID );
Parameters
- allocator
The allocator to use to allocate memory for the new object. Pass
NULLorkCFAllocatorDefaultto use the current default allocator.- localeID
The locale ID to be used when creating the locale dictionary.
Return Value
A dictionary containing the result from parsing a locale ID consisting of language, script, country, variant, and keyword/value pairs. Returns NULL if there was a problem creating the object. Ownership follows the Create Rule.
Discussion
The dictionary keys are the constant CFString objects that correspond to the locale ID components; the values correspond to constants where available. For example: the string "en_US@calendar=japanese" yields a dictionary with three entries: kCFLocaleLanguageCode=en, kCFLocaleCountryCode=US, and kCFLocaleCalendarIdentifier=kCFJapaneseCalendar. See also CFLocaleCreateLocaleIdentifierFromComponents.
Availability
- Available in iOS 2.0 and later.
Declared In
CFLocale.hCFLocaleCreateCopy
Returns a copy of a locale.
CFLocaleRef CFLocaleCreateCopy ( CFAllocatorRef allocator, CFLocaleRef locale );
Parameters
- allocator
The allocator to use to allocate memory for the new object. Pass
NULLorkCFAllocatorDefaultto use the current default allocator.- locale
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 Create Rule.
Availability
- Available in iOS 2.0 and later.
Declared In
CFLocale.hCFLocaleCreateLocaleIdentifierFromComponents
Returns a locale identifier consisting of language, script, country, variant, and keyword/value pairs derived from a dictionary containing the source information.
CFStringRef CFLocaleCreateLocaleIdentifierFromComponents ( CFAllocatorRef allocator, CFDictionaryRef dictionary );
Parameters
- allocator
The allocator to use to allocate memory for the new object. Pass
NULLorkCFAllocatorDefaultto 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, variant, and keyword/value pairs derived from dictionary. Returns NULL if there was a problem creating the string. Ownership follows 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".
Availability
- Available in iOS 2.0 and later.
Declared In
CFLocale.hCFLocaleCreateLocaleIdentifierFromWindowsLocaleCode
Returns a locale identifier from a Windows locale code.
CFStringRef CFLocaleCreateLocaleIdentifierFromWindowsLocaleCode ( CFAllocatorRef allocator, uint32_t lcid );
Parameters
- allocator
The allocator to use to allocate memory for the new object. Pass
NULLorkCFAllocatorDefaultto use the current default allocator.- lcid
The Windows locale code.
Return Value
The locale identifier.
Availability
- Available in iOS 4.0 and later.
Declared In
CFLocale.hCFLocaleGetIdentifier
Returns the given locale's identifier.
CFStringRef CFLocaleGetIdentifier ( CFLocaleRef locale );
Parameters
- locale
The locale object to examine.
Return Value
A string representation of locale’s identifier. This may not be the same string that was used to create the locale—it may be canonicalized. Ownership follows the Get Rule.
Availability
- Available in iOS 2.0 and later.
Declared In
CFLocale.hCFLocaleGetLanguageCharacterDirection
Returns the character direction for the specified ISO language code.
CFLocaleLanguageDirection CFLocaleGetLanguageCharacterDirection ( CFStringRef isoLangCode );
Parameters
- isoLangCode
The ISO language code.
Return Value
The character direction for the language. See “CFLocaleLanguageDirection” for possible values. If the appropriate direction can’t be determined, kCFLocaleLanguageDirectionUnknown is returned.
Availability
- Available in iOS 4.0 and later.
Declared In
CFLocale.hCFLocaleGetLanguageLineDirection
Returns the line direction for the specified ISO language code.
CFLocaleLanguageDirection CFLocaleGetLanguageLineDirection ( CFStringRef isoLangCode );
Parameters
- isoLangCode
The ISO language code.
Return Value
The line direction for the language. See “CFLocaleLanguageDirection” for possible values. If the appropriate direction can’t be determined, kCFLocaleLanguageDirectionUnknown is returned.
Availability
- Available in iOS 4.0 and later.
Declared In
CFLocale.hCFLocaleGetSystem
Returns the root, canonical locale.
CFLocaleRef CFLocaleGetSystem ( void );
Return Value
The root, canonical locale. Ownership follows the Get Rule.
Discussion
The root locale contains fixed backstop settings for all locale information.
Availability
- Available in iOS 2.0 and later.
Declared In
CFLocale.hCFLocaleGetTypeID
Returns the type identifier for the CFLocale opaque type.
CFTypeID CFLocaleGetTypeID ( void );
Return Value
The type identifier for the CFLocale opaque type.
Availability
- Available in iOS 2.0 and later.
Declared In
CFLocale.hCFLocaleGetValue
Returns the corresponding value for the given key of a locale’s key-value pair.
CFTypeRef CFLocaleGetValue ( CFLocaleRef locale, CFStringRef key );
Parameters
- locale
The locale object to examine.
- key
The key for which to obtain the corresponding value. Possible values are described in “Locale Property Keys.”
Return Value
The value corresponding to the given key in locale. The value may be any type of CFType object. Ownership follows the Get Rule.
Discussion
Locale objects use key-value pairs to store property values. Use this function to get the value of a specific property.
Availability
- Available in iOS 2.0 and later.
Declared In
CFLocale.hCFLocaleGetWindowsLocaleCodeFromLocaleIdentifier
Returns a Windows locale code from the locale identifier.
uint32_t CFLocaleGetWindowsLocaleCodeFromLocaleIdentifier ( CFStringRef localeIdentifier );
Parameters
- localeIdentifier
The locale identifier.
Return Value
The Windows locale code.
Availability
- Available in iOS 4.0 and later.
Declared In
CFLocale.hData Types
CFLocaleRef
A reference to a CFLocale object.
typedef const struct __CFLocale *CFLocaleRef;
Availability
- Available in iOS 2.0 and later.
Declared In
CFLocale.hConstants
CFLocaleLanguageDirection
These constants describe the text direction for a language. They are returned by the functions CFLocaleGetLanguageCharacterDirection and CFLocaleGetLanguageLineDirection.
typedef enum : CFIndex {
kCFLocaleLanguageDirectionUnknown = 0,
kCFLocaleLanguageDirectionLeftToRight = 1,
kCFLocaleLanguageDirectionRightToLeft = 2,
kCFLocaleLanguageDirectionTopToBottom = 3,
kCFLocaleLanguageDirectionBottomToTop = 4
} CFLocaleLanguageDirection;
Constants
kCFLocaleLanguageDirectionUnknownThe direction of the language is unknown.
Available in iOS 4.0 and later.
Declared in
CFLocale.h.kCFLocaleLanguageDirectionLeftToRightThe language direction is from left to right.
Available in iOS 4.0 and later.
Declared in
CFLocale.h.kCFLocaleLanguageDirectionRightToLeftThe language direction is from right to left.
Available in iOS 4.0 and later.
Declared in
CFLocale.h.kCFLocaleLanguageDirectionTopToBottomThe language direction is from top to bottom.
Available in iOS 4.0 and later.
Declared in
CFLocale.h.kCFLocaleLanguageDirectionBottomToTopThe language direction is from bottom to top.
Available in iOS 4.0 and later.
Declared in
CFLocale.h.
Locale Property Keys
Predefined locale keys used to get property values.
const CFStringRef kCFLocaleIdentifier; const CFStringRef kCFLocaleLanguageCode; const CFStringRef kCFLocaleCountryCode; const CFStringRef kCFLocaleScriptCode; const CFStringRef kCFLocaleVariantCode; const CFStringRef kCFLocaleExemplarCharacterSet; const CFStringRef kCFLocaleCalendarIdentifier; const CFStringRef kCFLocaleCalendar; const CFStringRef kCFLocaleCollationIdentifier; const CFStringRef kCFLocaleUsesMetricSystem; const CFStringRef kCFLocaleMeasurementSystem; const CFStringRef kCFLocaleDecimalSeparator; const CFStringRef kCFLocaleGroupingSeparator; const CFStringRef kCFLocaleCurrencySymbol; const CFStringRef kCFLocaleCurrencyCode; const CFStringRef kCFLocaleCollatorIdentifier; const CFStringRef kCFLocaleQuotationBeginDelimiterKey; const CFStringRef kCFLocaleQuotationEndDelimiterKey; const CFStringRef kCFLocaleAlternateQuotationBeginDelimiterKey; const CFStringRef kCFLocaleAlternateQuotationEndDelimiterKey;
Constants
kCFLocaleIdentifierSpecifies locale identifier.
The corresponding value is a CFString containing the POSIX locale identifier as used by ICU, such as “
ja_JP”. If you have a variant locale or a different currency or calendar, it can be as complex as “en_US_POSIX@calendar=japanese;currency=EUR” or “az_Cyrl_AZ@calendar=buddhist;currency=JPY”.Available in iOS 2.0 and later.
Declared in
CFLocale.h.kCFLocaleLanguageCodeSpecifies the locale language code.
The corresponding value is a CFString containing an ISO 639-x/IETF BCP 47 language identifier, such as “
ja”.Available in iOS 2.0 and later.
Declared in
CFLocale.h.kCFLocaleCountryCodeSpecifies the locale country code.
The corresponding value is a CFString containing an ISO county code, such as “
JP”.Available in iOS 2.0 and later.
Declared in
CFLocale.h.kCFLocaleScriptCodeSpecifies the locale script code.
The corresponding value is a CFString containing a Unicode script tag (strictly, an ISO 15924 script tag). Usually this is empty (it is for “
ja_JP”). It may be present for locales where a script must be specified, for example “uz-Latn-UZ” vs. “uz-Cyrl-UZ” for Uzbek in Latin vs. Cyrillic (in the first case the script code is “Latn”, and in the second it is “Cyrl”).Available in iOS 2.0 and later.
Declared in
CFLocale.h.kCFLocaleVariantCodeSpecifies the locale variant code.
The corresponding value is a CFString containing the variant name. The variant code is arbitrary and application-specific. ICU adds “
_EURO” to its locale designations for locales that support the Euro currency. For “en_US_POSIX” the variant is “POSIX”, and for “hy_AM_REVISED” it is “REVISED”.Available in iOS 2.0 and later.
Declared in
CFLocale.h.kCFLocaleExemplarCharacterSetSpecifies the locale character set.
Available in iOS 2.0 and later.
Declared in
CFLocale.h.kCFLocaleCalendarIdentifierSpecifies the locale calendar identifier.
The corresponding value is a CFString containing the calendar identifier (for possible values, see
“Locale Calendar Identifiers”).Available in iOS 2.0 and later.
Declared in
CFLocale.h.kCFLocaleCalendarSpecifies the locale calendar.
The corresponding value is a CFCalendar object.
Available in iOS 2.0 and later.
Declared in
CFLocale.h.kCFLocaleCollationIdentifierSpecifies the locale collation identifier.
The corresponding value is a collation.
Available in iOS 2.0 and later.
Declared in
CFLocale.h.kCFLocaleUsesMetricSystemSpecifies the whether the locale uses the metric system.
The corresponding value is a CFBoolean.
Available in iOS 2.0 and later.
Declared in
CFLocale.h.kCFLocaleMeasurementSystemSpecifies the measurement system used.
The corresponding value is a CFString object, for example “Metric” or “U.S.”.
Available in iOS 2.0 and later.
Declared in
CFLocale.h.kCFLocaleDecimalSeparatorSpecifies the decimal point string.
The corresponding value is a CFString object, for example “.” or “,”.
Available in iOS 2.0 and later.
Declared in
CFLocale.h.kCFLocaleGroupingSeparatorSpecifies the separator string between groups of digits.
The corresponding value is a CFString object, for example “,” or “.”.
Available in iOS 2.0 and later.
Declared in
CFLocale.h.kCFLocaleCurrencySymbolSpecifies the currency symbol.
The corresponding value is a CFString object, for example “$” or “£”.
Available in iOS 2.0 and later.
Declared in
CFLocale.h.kCFLocaleCurrencyCodeSpecifies the locale currency code.
The corresponding value is a CFString object, for example “USD” or “GBP”.
Available in iOS 2.0 and later.
Declared in
CFLocale.h.kCFLocaleCollatorIdentifierSpecifies the collation identifier for the locale.
The corresponding value is a CFString object. If unknown,
nilis returned.Available in iOS 4.0 and later.
Declared in
CFLocale.h.kCFLocaleQuotationBeginDelimiterKeySpecifies the the begin quotation symbol associated with the locale.
The corresponding value is a CFString object.
Available in iOS 4.0 and later.
Declared in
CFLocale.h.kCFLocaleQuotationEndDelimiterKeySpecifies the end quotation symbol associated with the locale.
The corresponding value is a CFString object.
Available in iOS 4.0 and later.
Declared in
CFLocale.h.kCFLocaleAlternateQuotationBeginDelimiterKeySpecifies the alternating begin quotation symbol associated with the locale. In some locales, when quotations are nested, the quotation characters alternate. Thus,
NSLocaleQuotationBeginDelimiterKey, thenNSLocaleAlternateQuotationBeginDelimiterKey, and so on.The corresponding value is a CFString object.
Available in iOS 4.0 and later.
Declared in
CFLocale.h.kCFLocaleAlternateQuotationEndDelimiterKeySpecifies the alternating end quotation symbol associated with the locale. In some locales, when quotations are nested, the quotation characters alternate. Thus,
NSLocaleQuotationEndDelimiterKey, thenNSLocaleAlternateQuotationEndDelimiterKey, and so on.The corresponding value is a CFString object.
Available in iOS 4.0 and later.
Declared in
CFLocale.h.
Discussion
Locale objects use key-value pairs to store property values. Use the CFLocaleGetValue function to get the value of a specific property listed above.
Locale Calendar Identifiers
Predefined locale keys used to get calendar values—values for kCFLocaleCalendarIdentifier.
const CFStringRef kCFGregorianCalendar; const CFStringRef kCFBuddhistCalendar; const CFStringRef kCFChineseCalendar; const CFStringRef kCFHebrewCalendar; const CFStringRef kCFIslamicCalendar; const CFStringRef kCFIslamicCivilCalendar; const CFStringRef kCFJapaneseCalendar; const CFStringRef kCFRepublicOfChinaCalendar; const CFStringRef kCFPersianCalendar; const CFStringRef kCFIndianCalendar; const CFStringRef kCFISO8601Calendar;
Constants
kCFGregorianCalendarSpecifies the Gregorian calendar.
Available in iOS 2.0 and later.
Declared in
CFLocale.h.kCFBuddhistCalendarSpecifies the Buddhist calendar.
Available in iOS 2.0 and later.
Declared in
CFLocale.h.kCFChineseCalendarSpecifies the Chinese calendar.
Available in iOS 2.0 and later.
Declared in
CFLocale.h.kCFHebrewCalendarSpecifies the Hebrew calendar.
Available in iOS 2.0 and later.
Declared in
CFLocale.h.kCFIslamicCalendarSpecifies the Islamic calendar.
Available in iOS 2.0 and later.
Declared in
CFLocale.h.kCFIslamicCivilCalendarSpecifies the Islamic Civil calendar.
Available in iOS 2.0 and later.
Declared in
CFLocale.h.kCFJapaneseCalendarSpecifies the Japanese calendar.
Available in iOS 2.0 and later.
Declared in
CFLocale.h.kCFRepublicOfChinaCalendarSpecifies the calendar for the Republic of China.
Available in iOS 4.0 and later.
Declared in
CFLocale.h.kCFPersianCalendarSpecifies the Persian calendar.
Available in iOS 4.0 and later.
Declared in
CFLocale.h.kCFIndianCalendarSpecifies the Indian calendar.
Available in iOS 4.0 and later.
Declared in
CFLocale.h.kCFISO8601CalendarSpecifies the ISO 8601 calendar.
Available in iOS 4.0 and later.
Declared in
CFLocale.h.
Discussion
Locale objects use key-value pairs to store property values. Use the CFLocaleGetValue function to get the value of a specific property listed above.
Locale Change Notification
Identifier for notification sent if the current locale changes.
const CFStringRef kCFLocaleCurrentLocaleDidChangeNotification
Constants
kCFLocaleCurrentLocaleDidChangeNotificationIdentifier for the notification sent if the current locale changes.
This is a local notification posted when the user changes locale information in the System Preferences panel. Keep in mind that there is no order in how notifications are delivered to observers; frameworks or other parts of your code may also be observing this notification to take their own actions, and these may not have occurred at the time you receive the notification.
There is no object or user info for this notification.
Available in iOS 2.0 and later.
Declared in
CFLocale.h.
Declared In
CFLocale.h© 2003, 2012 Apple Inc. All Rights Reserved. (Last updated: 2012-12-13)