1

When my php file tries to execute:$pspell = pspell_new("en"); I get this error message:

pspell_new(): PSPELL couldn't open the dictionary. reason: No word lists can be found for the language "en".

It seems that the English dictionary file needs to be stored somewhere. I've downloaded aspell6-en-2020.12.07-0 which contains 98 files which I can upload, but into what folder on the server would I upload it and how will PSPELL know which folder?

bobonwhidbey
  • 485
  • 7
  • 17
  • Platform? There may be a ready package you can install. – Markus AO Jan 05 '22 at 21:31
  • My ISP where my web site is hosted is running CloudLinux OS. I'm currently using PHP 7.4, and PSPELL is already installed. However, it appears that the 'en' dictionary for PSPELL has not been installed, hence the error message. I ASSUME (always a bad start) that I need to put all the dictionaries I want to use somewhere in a folder. Since the aspell6 dictionary has 98 files, it seems that each language I want to access with PHP needs to be stored in it's own folder. Is there a way to tell PSPELL the name of that folder? – bobonwhidbey Jan 08 '22 at 00:18
  • 1
    One would expect it'd be installed by default huh? There doesn't seem to be a function to list available dictionaries. Overall I find myself wondering how maintained/used/neglected Pspell is. The online documentation has either no user comments or some strays from a decade ago. The Windows build is all but abandoned (current 2002), so not getting set up in my local dev environment sadly. – Markus AO Jan 08 '22 at 10:34
  • I tried the same PHP file on a different host - and all worked perfectly, at least for English. a simple $pspell = pspell_new("en"); $word = " what every my words are"; if (pspell_check($pspell, $word)) { etc. was all that was needed My host doesn't have any other languages, except "en". I can download the language files but where do I load them - or how do I tell PSpell where they are located> – bobonwhidbey Jan 13 '22 at 00:19
  • 1
    ASpell (which is what PSpell uses) is typically installed via package manager. Do you have shell access? If not, you may need to ask your host to install additional packages for you. Possibly helpful: https://superuser.com/questions/601928/how-do-i-add-missing-dictionaries-for-aspell – Markus AO Jan 13 '22 at 12:08
  • PSpell has been installed, but only for English. How would I add another language like French? – bobonwhidbey Jan 15 '22 at 22:54

0 Answers0