11

I'm using Firefox (v. 26 for Ubuntu). I'm in the U.S., and I keep setting the spell check to U.S. English (right click on a word marked as incorrectly spelled, choose Languages, then the correct one). It briefly remembers, but after an hour or so (even within the same session) it reverts to Canadian English.

I'm a web developer and am fine with hacking about:config, but although I've set spellchecker.dictionary to en_US, it doesn't seem to stick around.

Is there any other setting I'm missing?

9
  • Ideally, intl.accept_languages, and general.useragent.locale would be en-US too. Also, if the current Firefox edition is a different one, you could try installing the en-US edition. Otherwise if there are extra dictionaries other than the default builtin corresponding to en-US, try disabling/removing them via Tools (Alt + T) > Add-ons.
    – vWil
    Dec 17, 2013 at 16:27
  • Thanks; I'll try these suggestions when I get home tonight.
    – EmmyS
    Dec 17, 2013 at 19:45
  • Well, I set both of those config properties to en-US and restarted with high hopes. No luck; still insists I'm Canadian. I guess I'll try disabling them and see what happens. EDIT: no can do. The only languages listed there are South African and Great British English. Canadian isn't even a choice. How would I know if it's not a US English edition of Firefox. About only shows that it's the version created specifically for Ubuntu.
    – EmmyS
    Dec 18, 2013 at 2:08
  • Right-click general.useragent.locale and Reset to revert to, and reveal the original locale (Fx) info. If Firefox was installed via the OS tools then usually it would be equivalent to the current OS language/internalization settings unless a different Firefox edition was explicitly chosen. You can view the current OS locale details by entering locale in the terminal. Also, can you please check if this happens in a new Firefox profile.
    – vWil
    Dec 18, 2013 at 14:01
  • Reset is grayed out, so I have to assume that it's never been changed. Per locale, Ubuntu knows that I'm in the U.S. And I've never had any other location-based issues (i.e. time zones, etc.) It's only ever been a problem with the FF spellchecker. And yes, it happens with new FF profiles as well.
    – EmmyS
    Dec 19, 2013 at 3:52

3 Answers 3

1

Check to see if you have an "hunspell-en" package installed. Firefox will make use of any Hunspell dictionaries that are installed. These dictionaries are also used by LibreOffice however, so the solution is not as simple as just removing the package. Firefox looks in /usr/share/hunspell for dictionaries, so any ones that you do not want Firefox to use will need to be removed from there. On my laptop (running Arch Linux), most of the dictionaries in /usr/share/hunspell were just symlinks, so they can be safely removed without actually removing the dictionary itself.

However, keep in mind that this is not a permanent solution, since an upgrade to the package will just put those files/symlinks back into place.

Ultimately, I solved the problem by installing the hunspell-en-base package from the AUR, which is a stripped-down package containing just the en_US dictionary.

1
  • That does indeed influence Firefox under GNU/Linux (FF 39 on Ubuntu tested). However, putting a value into spellchecker.dictionary does seem to override the hunspell* packages. I wonder if some add-on is resetting the preferences occasionally. Jul 21, 2015 at 15:40
1

Firefox seems to randomly use any one of the installed dictionaries. Several English dictionaries get installed by default in Ubuntu. The solution is to remove all but the US English dictionary using apt-get.

From How can I change Firefox's default dictionary?, Insperatus posted this useful command:

sudo apt-get remove myspell-en-au myspell-en-gb myspell-en-za hunspell-en-ca && sudo apt-get install myspell-en-us

Before:

firefox spelling language before removal

After:

firefox spelling language after removal

1

I have a workaround that works for me, but it involves modifying system myspell libraries.

On Ubuntu, this solution appears to work: Askubuntu.com: How can I change Firefox's default dictionary

But somebody may not be using Ubuntu, like myself. I'm using Gentoo, and at this time, all the en_* variations are part of the same package, app-dicts/myspell-en

So my solution is to just delete the ones I've no use for:

cd /usr/share/myspell
ls -lah

 

total 25M
drwxr-xr-x   2 root root 4.0K Apr 17 11:25 .
drwxr-xr-x 438 root root  16K Apr 12 19:27 ..
-rw-r--r--   1 root root  306 Apr 17 11:25 dictionary.lst.en
-rw-r--r--   1 root root  37K Apr 17 11:25 en_AU.aff
-rw-r--r--   1 root root 552K Apr 17 11:25 en_AU.dic
-rw-r--r--   1 root root 1.8K Apr 17 11:25 en_CA.aff
-rw-r--r--   1 root root 683K Apr 17 11:25 en_CA.dic
-rw-r--r--   1 root root  27K Apr 17 11:25 en_GB-oed.aff
-rw-r--r--   1 root root 513K Apr 17 11:25 en_GB-oed.dic
-rw-r--r--   1 root root  27K Apr 17 11:25 en_GB.aff
-rw-r--r--   1 root root 515K Apr 17 11:25 en_GB.dic
-rw-r--r--   1 root root  28K Apr 17 11:25 en_NZ.aff
-rw-r--r--   1 root root 524K Apr 17 11:25 en_NZ.dic
-rw-r--r--   1 root root 3.0K Apr 17 11:25 en_US.aff
-rw-r--r--   1 root root 680K Apr 17 11:25 en_US.dic
-rw-r--r--   1 root root  27K Apr 17 11:25 en_ZA.aff
-rw-r--r--   1 root root 577K Apr 17 11:25 en_ZA.dic
-rw-r--r--   1 root root  78K Apr 17 11:25 hyph_en_GB.dic
-rw-r--r--   1 root root  18M Apr 17 11:25 th_en_US_v2.dat
-rw-r--r--   1 root root 3.0M Apr 17 11:25 th_en_US_v2.idx

 

rm en_AU.*
rm en_CA*
rm en_ZA*
ls -lah

 

total 23M
drwxr-xr-x   2 root root 4.0K Apr 17 11:31 .
drwxr-xr-x 438 root root  16K Apr 12 19:27 ..
-rw-r--r--   1 root root  306 Apr 17 11:25 dictionary.lst.en
-rw-r--r--   1 root root  27K Apr 17 11:25 en_GB-oed.aff
-rw-r--r--   1 root root 513K Apr 17 11:25 en_GB-oed.dic
-rw-r--r--   1 root root  27K Apr 17 11:25 en_GB.aff
-rw-r--r--   1 root root 515K Apr 17 11:25 en_GB.dic
-rw-r--r--   1 root root  28K Apr 17 11:25 en_NZ.aff
-rw-r--r--   1 root root 524K Apr 17 11:25 en_NZ.dic
-rw-r--r--   1 root root 3.0K Apr 17 11:25 en_US.aff
-rw-r--r--   1 root root 680K Apr 17 11:25 en_US.dic
-rw-r--r--   1 root root  78K Apr 17 11:25 hyph_en_GB.dic
-rw-r--r--   1 root root  18M Apr 17 11:25 th_en_US_v2.dat
-rw-r--r--   1 root root 3.0M Apr 17 11:25 th_en_US_v2.idx

And then remove the unwanted lines from dictionary.lst.en

Note: No ZA/CA/AU

# Autogenerated by app-dicts/myspell-en-20081002
DICT en GB en_GB
DICT en US en_US
DICT en NZ en_NZ
DICT en GB en_GB-oed
HYPH en US hyph_en_GB
HYPH en GB hyph_en_GB
THES en US th_en_US_v2
THES en GB th_en_US_v2

And after doing that and restarting Firefox, my menu is as follows:

Screenshot of my language menu showing US and GB and NZ with NZ at the top and no CA/AU

And this is adequate for me, gives me the language default I want, but the others are still there if I desperately need them.

(Though I've still to work out what governs the sort order, if I could work that out I could just rig the default to come first.)

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .