Contents

current

A locale that represents the user’s region settings at the time the property is read.

Declaration

class var current: Locale { get }

Discussion

This value represents the locale currently used by the app, based on the following:

  • The current system locale.

  • Any app-specific locale choice made in the Settings app.

  • The availability of the preferred locale in the app. For example, if the person using an app has set their device to use a Spanish-language locale, but the app only supports English, this value returns an English locale.

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

To receive notification of locale changes, add your object as an observer of currentLocaleDidChangeNotification.

See Also

Getting the User’s Locale