Adi wrote:
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.

I had a problem similiar to this a couple of years ago; don't know if this will help, but.... How is your version of php installed (from source, RPM, another package?) If you installed php/aspell from source, check to see if your system also has aspell installed as an RPM (or other package).

--
John C. Nichel IV
Programmer/System Admin (ÜberGeek)
Dot Com Holdings of Buffalo
716.856.9675
[EMAIL PROTECTED]

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to