Spellcheck in non-English languages DONE! (Workaround)
Hi! I've searched for a way to change default dictionary for spellchecking in Zotero, but didn' find it. So, I disabled spellcheck using a workaround (link below).
But today I had an idea, tested, and it works:
1. With Firefox installed, go to its directory (below), open folder "dictionaries", and copy the two files of desired locale (if it's not installed, go to link below). In my case, the two files are "pt-BR.aff" and "pt-BR.dic".
2. Go to Zotero's directory, (below), open folder "dictionaries" (there are two files of locale en-US, these are the default Zotero dictionary) and paste those two files in that folder.
3. Rename en-US files to whatever backup name (say, "en-US_original"), or simply delete them instead.
4. Rename the copied files to "en-US.aff" and "en-US.dic".
5. Restart Zotero. Your notes should be spellchecked with Firefox dictionary!
6. If you did, as I did, the disable-spellcheck workaround, undo it (set "extensions.spellcheck.inline.max-misspellings" in Zotero about:config to a big value, like 500), and restart Zotero.
This is, obviously, a workaround, but at least you can have spellcheck in your non-English language until Zotero developers finally solve this question. :)
Firefox's directory (Windows 64bits, Firefox 64bits):
C:\Program Files\Mozilla Firefox
Zotero's directory (Windows 64 bits):
C:\Program Files (x86)\Zotero
Link to workaround to disable spellcheck:
https://forums.zotero.org/discussion/19771/workaround-to-disable-spell-checker/
Link to Firefox's help on installing dictionaries:
https://support.mozilla.org/en-US/kb/how-do-i-use-firefox-spell-checker?redirectlocale=en-US&redirectslug=Using+the+spell+checker#w_adding-dictionaries
But today I had an idea, tested, and it works:
1. With Firefox installed, go to its directory (below), open folder "dictionaries", and copy the two files of desired locale (if it's not installed, go to link below). In my case, the two files are "pt-BR.aff" and "pt-BR.dic".
2. Go to Zotero's directory, (below), open folder "dictionaries" (there are two files of locale en-US, these are the default Zotero dictionary) and paste those two files in that folder.
3. Rename en-US files to whatever backup name (say, "en-US_original"), or simply delete them instead.
4. Rename the copied files to "en-US.aff" and "en-US.dic".
5. Restart Zotero. Your notes should be spellchecked with Firefox dictionary!
6. If you did, as I did, the disable-spellcheck workaround, undo it (set "extensions.spellcheck.inline.max-misspellings" in Zotero about:config to a big value, like 500), and restart Zotero.
This is, obviously, a workaround, but at least you can have spellcheck in your non-English language until Zotero developers finally solve this question. :)
Firefox's directory (Windows 64bits, Firefox 64bits):
C:\Program Files\Mozilla Firefox
Zotero's directory (Windows 64 bits):
C:\Program Files (x86)\Zotero
Link to workaround to disable spellcheck:
https://forums.zotero.org/discussion/19771/workaround-to-disable-spell-checker/
Link to Firefox's help on installing dictionaries:
https://support.mozilla.org/en-US/kb/how-do-i-use-firefox-spell-checker?redirectlocale=en-US&redirectslug=Using+the+spell+checker#w_adding-dictionaries
I wasn't able to use the files from mozilla (mozilla don't work in this computer) so I use a LibreOffice archive instead that I found here https://github.com/01luisrene/Diccionario-espanol-LibreOffice
Here are all the dictionaries : https://kitscenarist.ru/downloads/hunspell/
For this add the folllowing line to the about:config
preference name: spellchecker.dictionary_path
value: /usr/share/hunspell
If hunspell is not installed you can install it with the most package managers.
Example for Ubuntu 18.04 with german spell-checking:
sudo apt update
sudo apt install hunspell hunspell-de-de
Secondly, is there a way to have different dictionaries in these repository or would it not worked with multiple spellcheckers (english, german, italian etc.)?
Thanks in advance.
You can find the about:config under
Edit > Preferences > Advanced > Config Editor > "I accept the risk!"
Now right click in the opened Window and select
New > String
A new window appears and asks for the preference name.
type "spellchecker.dictionary_path" and click ok
Add the path to your hunspell-dictionaries.
Close the about:config window and Zotero. Now reopen Zotero and it should work.
I made a video of this process. I hope it's not too confusing, since I'm using i3wm and there are some jumps with the opened windows.
https://youtu.be/BSXJaa1Xc1U
My /usr/share/hunspell folder contains en_US aff & dic, and fr aff & dic (and several symlinks to fr dics).
In about:config, I have added also the line as in firefox :
spellchecker.dictionary : fr
It seems that the spellchecking is still not working. Should I rename some files ?
It would be nice that in zotero > preference, it would be a panel for managing it. I think it would not be too difficult for a programmer to do it, checking if hunspell is installed, checking for the dictionaries...
At least, I have no more red underlines. And maybe a day a spellchecker.