pspell dictionary issue

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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.

[Index of Archives]     [PHP Home]     [Apache Users]     [PHP on Windows]     [Kernel Newbies]     [PHP Install]     [PHP Classes]     [Pear]     [Postgresql]     [Postgresql PHP]     [PHP on Windows]     [PHP Database Programming]     [PHP SOAP]

  Powered by Linux