It would be really cool if administrators could add words to the standard dictionary.

Comments

fonant’s picture

I've been looking into this. I've done half the job, by creating a text file with "added" words in the module directory, and modifying the $aspell_opts to use this file as a personal dictionary.

Modified spellchecker.php lines:

$this_dir = dirname(__FILE__);
$aspell_opts = "-a --lang=$lang --encoding=utf-8 --personal=$this_dir/added_words.txt";

added_words.txt file format:

personal_ws-1.1 en
firstnewword
secondnewword
thirdnewword

Now we just need some code to add unrecognised words, when asked, to added_words.txt in the module directory. Since this will be automated, it could also add the optional word-count argument to the end of the first line of the personal wordlist (see
http://aspell.net/man-html/Format-of-the-Personal-and-Replacement-Dictio... for format details)

Christopher Herberte’s picture

Status: Active » Closed (won't fix)