How do I add a language to the available NSSpellChecker languages?
Currently calling
println(NSSpellChecker.sharedSpellChecker().availableLanguages)
prints out this list of languages:
[en_GB, en, en_AU, en_CA, en_IN, da, de, es, fr, it, nl, nb, pt_BR, pt_PT, sv, tr, ru]
I have 2 more to work with, so I followed the answer here and successfully added these 2 languages ββto the macro checker. So yes, I now have a spell checker system in these languages ββin additional languages. And they show the available spellchecking languages ββand also show the following screenshot - SlovenΔina's first language is new (code sk
):
Unfortunately, NSSpellChecker
it doesn't seem to have registered these new languages ββas they are not listed as available. The list of available languages ββhas not changed as shown above.
Is there a way to make it NSSpellChecker
work with these added languages?
source to share
The class seems to NSSpellChecker
have some bugs. There was already discussion about the bug with custom servers NSSpellChecker
back in 2008 (this was fixed a few months later).
For the moment, I suggest you write a bugreport , as your code is correct as the documentation and compiler say.
Update
There NSSpellChecker
are many other bugs in the class , so it doesn't surprise me you just found another one.
- Automatic language detection
- Unexpected return value in
countWordsInString:language:
- Application crashes due to
NSSpellCheckerCheckString
Buggy NSSpellChecker
seems ...
source to share