Instance MethodFoundationEssentials
identifier(_:)
iOS 16.0+
iPadOS 16.0+
Mac Catalyst 16.0+
macOS 13.0+
tvOS 16.0+
watchOS 9.0+
Returns the ISO code of the given identifier type. Returns nil if the language isn’t a valid ISO language, or if the specified identifier type isn’t available to the language.
func identifier(_ type: Locale.LanguageCode.IdentifierType) -> String?