Type Property

currentLocale

A locale representing the user's region settings at the time the property is read.

Declaration

@property(class, readonly, copy) NSLocale *currentLocale;

Discussion

The locale is formed from the settings for the current user’s chosen system locale overlaid with any custom settings the user has specified.

Use this property when you need to rely on a consistent locale. A locale instance obtained this way does not change even when the user changes region settings. If you want a locale instance that always reflects the current configuration, use the one provided by the autoupdatingCurrentLocale property instead.

To receive notification of locale changes, add your object as an observer of the a NSCurrentLocaleDidChangeNotification.

See Also

Getting the User's Locale

autoupdatingCurrentLocale

A locale which tracks the user’s current preferences.

NSCurrentLocaleDidChangeNotification

A notification that indicates that the user’s locale changed.

systemLocale

A locale representing the generic root values with little localization.

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