pspell dictionary issue

From: Date: Tue, 20 Dec 2005 05:42:06 +0000
Subject: pspell dictionary issue
Groups: php.general 
Request: Send a blank email to php-general+get-227699@lists.php.net to get a copy of this message
I am having a problem switching dictionaries from 'american', 'british' and 'canadian' English in pspell. Pspell seems to test everything against the american dictionary for some reason. I tested aspell on command line and worked fine if I supplied the dictionary I wanted to use with the –d option. Below is some basic code I used to test this in php: <?php $string = "color"; $pspell_link = pspell_new("en", "canadian"); if (!pspell_check($pspell_link, $string)) { $suggestions = pspell_suggest($pspell_link, $string); foreach ($suggestions as $suggestion) { echo "Possible spelling: $suggestion<br />"; } } else { echo "All good"; } ?> The output was "All good" instead of a list of suggestions. Also, when I tested the string "colour" with pspell_new("en", "american"); pspell accepted the spelling…aspell on the other hand worked as expected in shell. Any suggestions would be much appreciated.

« previous php.general (#227699) next »