languageCode

Returns the language code of the locale, or nil if has none.

iOS
deprecated
macOS
deprecated
tvOS
deprecated
watchOS
deprecated
var languageCode: String? { get }

For example, for the locale “zh-Hant-HK”, returns “zh”.