Skip to content

Instance Property

locale

iOS 15.0+ iPadOS 15.0+ Mac Catalyst 15.0+ macOS 12.0+ tvOS 15.0+ watchOS 8.0+
The locale to use when formatting items in the list.
var locale: Locale

Discussion

A Locale instance is typically used to provide, format, and interpret information about and according to the user’s customs and preferences.

Examples include ISO region and language codes, currency code, calendar, system of measurement, and decimal separator.

The default value is Locale.autoupdatingCurrent. If you set this property to nil, the formatter resets to using autoupdatingCurrent.