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.