Where to find dictionaries for other languages for IntelliJ?

45,095

Solution 1

Current IDEA versions load dictionaries in UTF-8, you don't need to convert them to the platform encoding, ignore the iconv step below.

The dictionary can be produced using aspell for Unix/Mac OS X or under Cygwin. You need to have aspell and appropriate dictionary installed.

Here is the example for Russian dictionary I've used:

aspell --lang ru-yeyo dump master | aspell --lang ru expand | tr ' ' '\n' > russian.dic

For German it would be:

aspell --lang de_DE dump master | aspell --lang de_DE expand | tr ' ' '\n' > de.dic

Solution 2

I downloaded the ASCII spanish dictionary from this page, copied the included .dic file and it worked without any change: http://www.winedt.org/dict.html

There are many other languages.

OUTDATED: I get this info from this page (now this link is dead), who included additional details and format conversions that I didn't need: http://blog.novoj.net/2010/11/07/how-to-add-your-own-dictionary-to-intellij-idea-spellchecker/

Solution 3

This is based on all answers from here but including all the steps. I'm on Mac OS X (I think it will work on linux as well, except aspell installation) and I want the spanish dic

Only execute on terminal those lines that start with $ symbol

  1. Install aspell:

    $ brew update
    $ brew install aspell
    
  2. Download Aspell dic from their official repo

  3. Extract tar.bz2 file
  4. Go to extracted directory using terminal

    $ cd Downloads/aspell6-es-1.11-2
    
  5. Compile and install dic.

    $ ./configure
    Finding Dictionary file location ... /usr/local/Cellar/aspell/0.60.6.1/lib/aspell-0.60
    Finding Data file location ... /usr/local/Cellar/aspell/0.60.6.1/lib/aspell-0.60
    $ make
    /usr/local/bin/prezip-bin -d < es.cwl | /usr/local/bin/aspell  --lang=es create master ./es.rws
    $ make install
    mkdir -p /usr/local/Cellar/aspell/0.60.6.1/lib/aspell-0.60/
    cp es.rws castellano.alias es.multi espanol.alias spanish.alias /usr/local/Cellar/aspell/0.60.6.1/lib/aspell-0.60/
    cd /usr/local/Cellar/aspell/0.60.6.1/lib/aspell-0.60/ && chmod 644 es.rws castellano.alias es.multi espanol.alias spanish.alias
    mkdir -p /usr/local/Cellar/aspell/0.60.6.1/lib/aspell-0.60/
    cp es.dat es_affix.dat /usr/local/Cellar/aspell/0.60.6.1/lib/aspell-0.60/
    cd /usr/local/Cellar/aspell/0.60.6.1/lib/aspell-0.60/ && chmod 644 es.dat es_affix.dat
    
  6. Create the .dic file using:

    $ aspell -l es dump master | aspell -l es expand | tr ' ' '\n' > es.dic
    

Solution 4

Download a .dic from wherever you want(example). Then go to File > Settings > Spelling. There open the Dictionaries tap and add the path to the folder where you have saved the .dic in. It will auto-detect any .dic inside that folder. Apply.

Solution 5

Converting a Unicode dict to UTF-8 did the trick for me (sample for German / Linux computer):

NOTE: the converted german-dict can be downloaded here (<- already working).

If you need an other language please follow these steps:

  1. (Just in case) If you have already linked .dic-files in IntelliJ, please remove them temporary by pressing the red minus in the settings.

  2. Get your UNICODE(!) dictionary from here.

  3. Now convert it to UTF-8, so IntelliJ will accept it:

    ~/Downloads/de_neu $ iconv -f UNICODE -t UTF-8 de_neu.dic > de_neu_utf8.dic

  4. Go to File > Settings > type "dict" in the search and click Dictionaries > click the green plus and add the folder where "de_neu_utf8.dic" is stored.

  5. Click OK, and you should be good to go. :)

Share:
45,095
nraynaud
Author by

nraynaud

Remote Software Engineer for hire.

Updated on July 08, 2022

Comments

  • nraynaud
    nraynaud almost 2 years

    IntelliJ spellchecker comes with only English and Arabic bundled (strange, I think it is made in east Europe, they didn't even bundle their language?).

    My customer is German so all my code is mixed English (code)/German (interface) and I can't find a German dictionary for IntelliJ.

  • nraynaud
    nraynaud over 14 years
    thanks for the answer, I see that I got the right person :) I'm on mac and it looks like aspell is not included. In the end I took the dic from this plugin : plugins.intellij.net/plugin/?&id=1658 and converted the charset to macroman. But it looks like german is not a good language for dictionaries of this kind, many of my insurance-related words are unknown.
  • CrazyCoder
    CrazyCoder over 14 years
    That dictionary is in UTF-8, could be a conversion or encoding issue. I'd recommend to wait for the next IDEA update with the new Spellchecker plug-in. Aspell for Mac can be installed separately: docs.moodle.org/en/Configuring_aspell_on_Mac_OS_X .
  • CrazyCoder
    CrazyCoder about 14 years
    IDEA 9.0.2 EAP (build 94.585) should handle UTF-8 dictionaties fine, give it a try: confluence.jetbrains.net/display/IDEADEV/Maia+EAP.
  • Grigory
    Grigory over 13 years
    On Ubuntu 10.10 with IntellijIDEA 9.0.4 this command for getting the russian dict file with "yeyo" support: aspell --lang ru dump master | aspell --lang ru expand | tr ' ' '\n' > russian.dic
  • Gabor Garami
    Gabor Garami over 11 years
    For some languages, the generated dictionary can be really big. E.g. I tried to generate dictionary for Hungarian language - and I stopped the process when the dictionary file reached the 3G. For smaller (but, of course, lesser useful) dictionary I created dictionary with aspell --lang hu dump master | cut -d/ -f1 > hungarian.dic. Smaller, but enough for some usages.
  • Ricardo Martins
    Ricardo Martins over 9 years
    and dont forget to change the encoding. It doesnt work if it's not utf-8
  • Álvaro González
    Álvaro González almost 9 years
    Despite the name, the ASCII version contains Spanish characters (looks like ISO-8859-1/Windows-1252). Both versions ("ASCII" and "Unicode") seem to work fine as long as you re-encode them as UTF-8.
  • Stefan Haberl
    Stefan Haberl about 8 years
    this is the only answer that works for me in 2016 on a Mac. Use Editor > Spelling in IntelliJ's preferences to install the *.dic file.
  • SalahAdDin
    SalahAdDin almost 8 years
    Works this in Lunux's Operative Systems too?
  • SalahAdDin
    SalahAdDin almost 8 years
    Can we do the same using hunspell?
  • chachan
    chachan almost 8 years
    @SalahAdDin I didn't test it at the moment and I'm not using this IDE anymore :-/
  • maxbellec
    maxbellec almost 8 years
    the dictionnary I downloaded had utf-16 format. Worked fine after changing the encoding to utf-8
  • Raven
    Raven over 6 years
    im running git bash on windows but it seems it does not support UNICODE iconv: conversion from UNICODE unsupported
  • stian
    stian over 5 years
    That link is dead - I think the correct one should be winedt.org/dict.html
  • Ilya Serbis
    Ilya Serbis over 5 years
    Hunspell is official plugin from the JetBrains. It is mentioned in the IntelliJ documentation (see Custom Dictionaries section). Unfortunately I was unable to make it work.
  • Ilya Serbis
    Ilya Serbis over 5 years
    Works for me (Russian)
  • Rules
    Rules about 5 years
    See youtrack.jetbrains.com/issue/IDEA-210183 Yes it's extremely annoying that those ... hm RUSSIAN developers haven't implemented PROPER Russian support.. Please upvote for that issue..
  • stackunderflow
    stackunderflow almost 5 years
    the language code 'de' did not work for me. For german, I had to use 'de_DE' (DE for Germany). There is also 'de_AT' and 'de_CH' (for Austria and Swiss).
  • Gogowitsch
    Gogowitsch almost 5 years
    The novoj.net link is dead. Please add the instructions to this answer here directly.
  • Troglo
    Troglo almost 5 years
    The novoj.net is not required. Just download and copy the .dic file with your preferred language
  • Christian Ulbrich
    Christian Ulbrich over 4 years
    Link with ftp://is wrong (or will simply download 0index.html); ftp.gnu.org/gnu/aspell/dict/0index.html is the overview page to select your language.
  • StefanJanssen
    StefanJanssen over 4 years
  • netalex
    netalex over 4 years
    NB: path has to be set up to aspell command line in win10; the exe seems not be in path
  • Philipp
    Philipp over 4 years
    The command for german should be aspell --lang de_DE dump master | aspell --lang de expand | tr ' ' '\n' > de.dic ("--lang de" instead of "--lang de_DE" after the first pipe) -- Otherwise I am getting an error because /usr/lib/aspell/de_DE.dat does not exist (de.dat does exist).
  • Oleg Abrazhaev
    Oleg Abrazhaev over 3 years
    this modification worked for me aspell --lang=de dump master | aspell --lang=de expand | tr ' ' '\n' > de.dic and I had to install de language before with sudo apt install aspell-de
  • Mark Rotteveel
    Mark Rotteveel over 3 years
    @snakecharmerb PyCharm is basically a special version of IntelliJ, so things that work or exist for PyCharm, are very likely to exist for IntelliJ as well.
  • Michael2
    Michael2 over 2 years
    In other versions of the plugin, it is Settings → Editor → Natural Languages