InitializerFoundationEssentials
init(locale:)
iOS 16.0+
iPadOS 16.0+
Mac Catalyst 16.0+
macOS 13.0+
tvOS 16.0+
watchOS 9.0+
Creates a
Locale.Components with the identifier of the specified locale.init(locale: Locale)
Parameters
localeThe locale whose identifier is used to create the component. If
Locale.currentorLocale.autoupdatingCurrentis specified, the createdLocale.Componentswill contain user’s preferred values as set in the system settings if available.