Spellchecker en_us & en_US causing "no suitable dictionary"?

Spellchecker en_us & en_US causing "no suitable dictionary"?

by Mark Stevens -
Number of replies: 6
I'm getting the "no suitable dictionary installed" error, and I can't figure out where/how to hack it to get it to recognize my en_US dictionary.

I think it's looking for en_us.

Moodle 1.4+
Aspell .5+
Linux server

I thought I saw a previous posting regarding this issue, but I couldn't find it again.

Thanks everyone for everything.

Regards,
Mark

Wish I could be at Aussie Moodle smile


Average of ratings: -
In reply to Mark Stevens

Re: Spellchecker en_us & en_US causing "no suitable dictionary"?

by Janne Mikkonen -
Hi Mark

Look at your /moodle/lib/speller/server-scripts/spellchecker.php, On the first line there's the id string with version information (// $Id ....$).
What version yours is?

The problem really is like you've noticed, the en_US dictionary dumped from aspell does not equal current language en_us.

Version 1.3 of spellchecker does (should) turn these dumped dictionaries to lowercase.

If you're using version 1.3 then we're in knee deep again...

- Janne -
In reply to Janne Mikkonen

Re: Spellchecker en_us & en_US causing "no suitable dictionary"?

by Mark Stevens -
Hi,

Thanks for the help.  I uploaded the 1.3 version of spellchecker.php, but I"m still getting the same error.  Are there other files that I need to update as well?

M
In reply to Mark Stevens

Re: Spellchecker en_us & en_US causing "no suitable dictionary"?

by Janne Mikkonen -
Hi,

No that's the only file that chooses the dictionary.

You can force the script to pass en_US by replacing the line 59 (/moodle/lib/speller/server-scripts/spellchecker.php) with:

return "en_US";

and check if it then works.

- Janne -

ps. For your convenience I added the modified script as an attachment.
In reply to Janne Mikkonen

Re: Spellchecker en_us & en_US causing "no suitable dictionary"?

by Mark Stevens -
Janne,

Thanks so much for all of your help.  I'll get your update into action asap.

Best regards,
Mark
In reply to Mark Stevens

Re: Spellchecker en_us & en_US causing "no suitable dictionary"?

by Brian Lockwood -
We had this issue after installing a version of aspell. When we upgraded aspell we found that the new path was /usr/local/bin/aspell. The old version at /usr/bin/aspell was still there.
The --utf-8 option being illegal under the old version caused spellcheccker.php function check_language to return

"No suitable dictionary found installed on your server!"

whereas, the actual error was invalid option --encoding=utf-8

So, the fix is to change the configured file location for aspell to /usr/local/bin/aspell afetr installing a later version of aspell (if you haven't already done that).
In reply to Brian Lockwood

Re: Spellchecker en_us & en_US causing "no suitable dictionary"?

by Brian Lockwood -
It is rather ironic that I failed to use the spell checker to check the spelling afetr (sic) I composed my reply. blush