How do I make Firefox spellcheck in multiple languages simultaneously?

47

21

I want Firefox to assume that text may be in a mixture of languages and words should be looked up in multiple dictionaries. (For example, everything in en-GB, en-US, ru, be and be-classic should be consider as good, everything else should be underlined and corrections from all dictionaries should be offered). Is there an add-on for "multi-language spell-check"?

Alternatively, can I merge all dictionaries into one big combined dictionary?

Vi.

Posted 2010-02-12T20:48:17.543

Reputation: 13 705

1What Operating System are you on ? – Studer – 2010-02-12T20:56:48.853

GNU/Linux Debian (mostly squeeze) – Vi. – 2010-02-12T20:58:56.787

I also wish Firefox could do this. Not strictly an "answer," but you could try using Chrome, which does support multiple-language spell checking out of the box: http://www.google.com/support/chrome/bin/answer.py?hl=en&answer=95604.

– Arthaey – 2011-06-20T18:26:29.857

Answers

24

I use French and English in almost all of my emails and this is a nightmare.

There is a (quite simple) solution, but you need to hack one of your dictionaries: copy-paste the content of e.g. your English dictionary into your French one; it works! As simple as that!

This is how I solved this issue on Mac OS X:

  1. Go to /Users/HERE_YOUR_USER/Library/Application Support/Firefox/Profiles (use Cmd-Shift-G if your Library folder is hidden), and select your profile folder (mine was default.uo0) and the extensions folder.

  2. You will see folders for each of your dictionaries (en-US@dictionaries.addons.mozilla.org and fr-classique-reforme1990@dictionaries.addons.mozilla.org in my case). In each main folder, a dictionaries folder.

  3. Copy the content of the .aff and .dic of one of your dictionaries into the .aff and .dic file of the other. Don't copy the first line in the .dic file; it's the word count!

Warning: in the .dic file, update the word count on the first line. It must be the number of lines of the file minus 1 (the first which is the word count).

  1. Restart Firefox! And now, vous pouvez taper en français et in English in the same text area!

François Dispaux

Posted 2010-02-12T20:48:17.543

Reputation: 349

I had English and Ukrainian dictionaries (in this order). When I copied Ukrainian into English, it didn't work at all. But when I copied English into Ukrainian, it worked but I needed to remove SET ISO8859-1 before en-gb.aff, otherwise plurals and other forms would be marked. – oleksandr_yefremov – 2015-05-07T09:13:40.800

Bizarre, these dictionary folders are not in my profile folder... – bart – 2015-08-21T20:44:35.273

@François Thanks! That's an elegant solution. Do you have to do this over and over again with every update of Firefox? – ikashnitsky – 2015-11-09T18:40:47.467

@IIya nope, the dictionary is still bilingual after several Firefox updates. But don't update your dictionary ;) – François Dispaux – 2015-11-17T16:02:26.490

On Linux it uses dictionaries from /usr/share/hunspell. I changed spellchecker.dictionary_path in about:config it worked to /home/me/somefolder and put the merged .dic/.aff in there, so I didn't have to make a system-wide change (or have the files overwritten by updates) – unhammer – 2019-11-11T09:08:59.457

Just did a cp extensions/en-gb@flyingtophat.co.uk/dictionaries/* extensions/pt-BR@dictionaries.addons.mozilla.org/dictionaries/ here. Didn't seem to work very well. How did you join the files exactly? – jpbochi – 2014-02-19T15:07:10.447

8

Thanks François; this was inspiring. The corresponding solution in Ubuntu/Linux does the same for the hunspell. I wanted to combine my English dictionary with Hebrew, and I did this:

cd /usr/share/hunspell
sudo cp he.dic he.dic.bak
sudo cp he.aff he.aff.bak
sudo sh -c 'cat en_US.dic >> he.dic'
sudo sh -c 'cat en_US.aff >> he.aff'

(The sh -c is required since the append, >>, operation needs sudo privileges also). And of course fix the number of lines on the top of the .dic file like you said (count the lines using wc -l he.dic.

fidlr

Posted 2010-02-12T20:48:17.543

Reputation: 81

2What is "hunspell"? – Peter Mortensen – 2018-03-31T19:15:07.070

7

Unfortunately, I don't believe there is an easy solution to this. I use two different languages on a daily basis and the best (not ideal) solution is a combination of multiple dictionaries and an add on such as:

Dictionary Switcher or Quick Locale Switcher

Both of which present their own problems.

Another, less than ideal solution, is:

ImTranslator

Whilst it is a translator, it also supports multilingual spell checking.

Pulse

Posted 2010-02-12T20:48:17.543

Reputation: 4 389

Here's a current link to Quick Locale Switcher: https://addons.mozilla.org/en-US/firefox/addon/quick-locale-switcher2/

Doesn't seem to be any faster than clicking the text field though.

– CX gamer – 2019-07-06T09:09:55.943

1

Thanks fidlr, this was inspiring. ;)

I wanted to do the same without using root rights for that. So I based my work on you and came to use the personal dictionary: Warning, my personal dictionary was empty, it will surely destroy yours if you have some data in here.

cd ~/.mozilla/firefox/*.default/
nbLines=$(wc -l < /usr/share/hunspell/fr_FR.dic)
cut -d/ -f1 /usr/share/hunspell/fr_FR.dic | tail -$(( --nbLines )) >> ./persdict.dat

I remove the first line of the dictionary, because it's the number of dictionary entries in the .dic file.

Dolanor

Posted 2010-02-12T20:48:17.543

Reputation: 366

0

I found a hack that sort of works using the Firefox user dictionary.

You can manually add individual words to your personal user dictionary which will then not be marked as typos. You can also edit the file for it ('persdict.dat' within your Firefox profile folder) and add LOTS of words to it. I downloaded a dictionary list for my second language with 400k words and just paste it in the .dat file, which is essentially a text file you can open with any editor.

Now I can type in two languages without annoying spell check underlines.

spilldabeanz

Posted 2010-02-12T20:48:17.543

Reputation: 1