Creates a language components instance from a language identifier.
- Parameter identifier: A Unicode language identifier, like `en-US`, `es-419`, or `zh-Hant-TW`.
Creates a language components instance from a given language code, script, and region.
- Parameters:
- languageCode: The language code to use for the new components instance.
- script: The script to use for the new components instance.
- region: The region to use for the new components instance.
get · iOS 16.0+
languageCode
TypeScript
get languageCode(): (Locale_LanguageCode) | null
Swift declaration
var languageCode: Locale.LanguageCode?
The language code that identifies this language.
set · iOS 16.0+
languageCode
TypeScript
set languageCode(value: (Locale_LanguageCode) | null)
Creates a language components instance from an existing language instance.
- Parameter language: A `Locale.Language` instance. This initializer copies over the language code, script, and region from the provided language.