Type Method

currentLanguageCode()

Returns the code for the user’s current locale.

Declaration

class func currentLanguageCode() -> String

Return Value

An NSString object containing the BCP 47 language and locale code for the user’s current locale.

Discussion

This code reflects the user’s language and region preferences as selected in the Settings app.

See Also

Working with Language Codes

var language: String

A BCP 47 code identifying the voice’s language and locale.

Beta Software

This documentation contains preliminary information about an API or technology in development. This information is subject to change, and software implemented according to this documentation should be tested with final operating system software.

Learn more about using Apple's beta software