Contents

currentLanguageCode()

Returns the language and locale code for the user’s current locale.

Declaration

class func currentLanguageCode() -> String

Return Value

A string that contains the BCP 47 language and locale code for the user’s current locale.

Discussion

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

See Also

Working with language codes