98

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.

0

10 Answers 10

102

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
9
  • 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.
    – nraynaud
    Commented Dec 23, 2009 at 6:48
  • 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
    Commented Dec 23, 2009 at 9:32
  • 5
    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. Commented Nov 21, 2012 at 23:36
  • 3
    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).
    – ph_0
    Commented Feb 3, 2020 at 10:59
  • 2
    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 Commented Aug 19, 2020 at 13:07
65

I downloaded the ASCII spanish dictionary from this page, you would of course use your preferred language. Then I copied the included .dic file to my project folder and it worked without any change.

There are many other languages than spanish.

I get this info from this archived page,

who included additional details and format conversions that I didn't need.
3
  • 5
    and dont forget to change the encoding. It doesnt work if it's not utf-8 Commented Oct 2, 2014 at 13:52
  • 3
    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. Commented May 12, 2015 at 12:08
  • 2
    the dictionnary I downloaded had utf-16 format. Worked fine after changing the encoding to utf-8
    – maxbellec
    Commented Jul 25, 2016 at 8:27
19

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
    
4
  • 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. Commented Mar 25, 2016 at 8:53
  • Can we do the same using hunspell?
    – SalahAdDin
    Commented Jun 3, 2016 at 15:58
  • 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. Commented Dec 7, 2019 at 14:44
  • Brew also works in linux, install it with /bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)"
    – Cadoiz
    Commented Oct 26, 2022 at 9:42
16

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.

2
  • 8
    That link is dead - I think the correct one should be winedt.org/dict.html
    – stian
    Commented Dec 13, 2018 at 7:56
  • Works for me (Russian) Commented Jan 17, 2019 at 16:35
8

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. :)

1
  • im running git bash on windows but it seems it does not support UNICODE iconv: conversion from UNICODE unsupported
    – Peter
    Commented Nov 3, 2017 at 13:22
5

My PyCharm came bundled with a plugin called "Grazie". ("Provides intelligent spelling and grammar checks for text that you write in the IDE.")

You could find (or install) it under:

Preferences -> Plugins.

With that you can setup your language under:

Preferences -> Editor -> Proofreading

Screenshot of the proofreading section to add languages

3
  • 2
    @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. Commented Jan 27, 2021 at 17:16
  • 1
    In other versions of the plugin, it is Settings → Editor → Natural Languages
    – Michael2
    Commented Nov 4, 2021 at 11:12
  • @Michael and OP Unfortunately, neiter does "Settings → Editor → Natural Languages", nor do the subpoints "Spelling"/"Grammar" exist in my Jetbrains (ultimate Edition): Can you help me?
    – Cadoiz
    Commented Oct 26, 2022 at 9:32
3

Hunspell dictionaries support was added recently to Intellij platform.

You may install Hunspell plugin to your IDE and you will be able to add any hunspell dictionary to IntelliJ spellchecker as it is, no additional dictionary transformations are required in this case

Hunspell dictionaries can be found at:

  1. GitHub repos (https://github.com/wooorm/dictionaries, https://github.com/titoBouzout/Dictionaries)
  2. SCOWL collection: http://wordlist.aspell.net/dicts/
  3. OpenOffice extensions: http://extensions.services.openoffice.org/en/dictionaries
2
  • 1
    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. Commented Jan 17, 2019 at 16:22
  • 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..
    – Rules
    Commented Apr 2, 2019 at 2:06
1

I found some useful dictionaries here on WinEdt website. They need some reformatting :on my computer, I had to replace \r by \r\nin the .dicfile, then encode it in UTF-8 using Notepad++.

1
  1. Install the Hunspell plugin to your IDE
  2. Find your language dictionary in https://github.com/LibreOffice/dictionaries
  3. Download the .dic file that contains the list of words, and the .aff file that's a list of language rules
  4. On your IDE Settings/Preferences dialog Ctrl+Alt+S, select Editor | Proofreading | Spelling
  5. Add both files at the custom dictionary list
2
  • Thanks but I'm not able to add the .aff file in Webstorm IDE
    – Yvan Rugwe
    Commented Jul 8, 2022 at 8:51
  • The 5th step seems to be wrong - selecting just the .dic file should be enough. Commented Mar 26 at 21:07
0

IDEA support overview

Since IDEA 2022.3, support for additional dictionaries in both the plain "word list" and the Hunspell format is already built-in - see IDEA documentation.

In older IDEA versions, one needs to install the Hunspell plugin to use the Hunspell dictionaries, or to use just the plain "word list" dictionaries.

Which dictionary format to use?

Using the Hunspell format - a combination of a special *.dic file and a *.aff file - seems to be preferable/easier. The 2 files just need to be in the same directory and the *.dic file needs to be selected on the IDEA's "Editor > Natural Languages > Spelling" settings screen.

If one wants to use the plain "word list" format, an additional step of "unpacking" a Hunspell dictionary to a single plain *.dic file via aspell as described e.g. here is necessary.

Downloading the dictionaries

The official IDEA documentation recommends downloading the Hunspell dictionaries via https://hunspell.github.io/. From there, you can find links to download the dictionaries for various languages from the LibreOffice project (e.g. from this directory).

While you can also download dictionaries from WinEdt, those dictionaries haven't been updated for quite a while.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.