I finally opted for rewriting LorgGregGreg's implementation in a clean, optimized and actually functional way (i.e. able to spell-check properly not only English but also other languages, independently of the locale setting of your system).
I also had a quick look at one of the first versions of the proposed v3 viewers implementation but while better written than LorgGregGreg's it's no better regarding non-English languages spelling ability (i.e. it still fails to submit to the spell checker words with accented characters not pertaining to your system's locale), among other flaws (see below).
The result is part of v1.26.4.13 (to be released today), with the following differences when compared to the original implementation:
- True, lexical words (i.e. words not containing any punctuation, number, graphical character, spacing character or control character, with the exception of the single quote (like in "doesn't" or "aujourd'hui")) are submitted to the spell checker, the others are ignored (prevents many false positives in misspelled words). The single quote is also properly dealt with (i.e. excluded) when at the start or at the end of a word.
- You can switch spell checking off altogether (and not only badly spelled words highlighting) from the Preferences floater.
- Only the focused line or text editor gets badly spelled words highlighting active which prevents slowing down the viewer for nothing (and also prevents the corresponding potential griefing attacks, such as spamming you with notecards full of "zzz" words, for example: 10 such notecards could easily bring viewers with the original implementation to their knees).
- I added an option in the notecard floater (in its Edit menu) for switching spell checking on and off for the currently edited notecard (local switch).
- The installed dictionaries checking logic has been reworked (this is also flawed in the v3 implementation by the way): instead of relying on a debug settings variable containing the names of the installed dictionaries (and that can get out of sync with actually installed files), it checks directly for the exiting files.
- I added an "Ignore Word" option to the context menu which allows to ignore words you know are spelled right but don't want to add permanently to your custom dictionary; the ignored words list of course only lasts for the duration of the session (else it would be equivalent to adding the words to the custom dictionary).
- By default (and unless spell_check="false" is given in their xml entry) text editor fields have spell checking enabled (this is unlike line editors that got spell checking disabled by default).
- I added a set of 5 fast timers to be able to profile the spell checking highlighting code (the fast timers are under Render/UI).
Note that despite the significant optimizations and improvements I achieved, I'm still not fully satisfied with this implementation (it's still too slow for text editors with a large number of misspelled words, due to the pixel-precise word boundaries calculations needed to draw the zigzag lines below each misspelled word: the use of proportional fonts makes this calculation CPU intensive and it would perhaps be better to repaint such words with a different color instead...), so things may change in the next releases.
The viewer is bundled with an en_US dictionary (American English) but I did put a few more dictionaries (British English, French, German, Italian, Portuguese (Brazil), Spanish) for download on the website: just use the viewer built-in download feature from the "Preferences" menu, "Cool features" tab, "IM, Chat & Text" sub-tab to add them.
There is also a bundled SL glossary (with SL-specific words such as "rezzing" and other RP-specific terms) that gets automatically loaded along your custom dictionary (the latter being expanded each time you "Add Word" from the context menu).
You may also add manually more *.dic files in your user_settings directory and they will be automatically recognized and loaded by the viewer.