userPreferredLanguages
Provides a subset of the available languages to be used for spell checking.
Declaration
var userPreferredLanguages: [String] { get }Return Value
An array containing the user’s preferred languages for spell checking. The order is set in the system preferences.
Discussion
If automaticallyIdentifiesLanguages is true, then text checking will automatically use this method as appropriate; otherwise, it will use the language set by setLanguage(_:).
The older checkSpelling(of:startingAt:language:wrap:inSpellDocumentWithTag:wordCount:) and checkGrammar(of:startingAt:language:wrap:inSpellDocumentWithTag:details:). methods will use the language set by setLanguage(_:), if they are called with a nil language argument.