Skip to main content
All docs
V22.2

How to: Add a Dictionary to the Spell Checker

  • 3 minutes to read

The Spell Checker includes an English (U.S.) built-in dictionary against which misspellings are compared. Dictionaries for other languages can also be added to the Spell Checker.

Dictionaries for the Spell Checker

The Spell Checker supports the following types of dictionaries:

ISpell
Dictionaries are available at the following location: ISpell Dictionaries. A dictionary consists of two files: ISpell affix file (*.aff) and Base Words file (*.xlg or *.dict).
Hunspell
Dictionaries are available at the following locations:

Note

We do not provide dictionaries and are therefore not liable for any inaccuracies, deficiencies, or incompatibilities that may arise from the use of third-party dictionaries, including but not limited to the availability of the dictionaries in the specified formats.

Install Dictionaries

This example describes how to add the French dictionary downloaded from the Open Office French Dictionaries extension.

Follow the steps below:

  1. Download the file with the .oxt extension, change its extension to “.zip”, and unpack this archive. The archive includes the dictionaries folder with .aff and .dic files.

  2. Open the Editor | All Languages | Code Analysis | Spell Checker options page.

    spell-checker-options

  3. In the Dictionaries group, click the “+” button to add a new dictionary.

    add-dictionary

  4. In the Add Dictionary dialog, enter the dictionary name, choose its type from the drop-down list (“Hunspell/OpenOffice dictionary (.dic + .aff)” for this example), and click OK.

    add-dictionary-dialog

  5. Select the newly added dictionary in the Dictionaries list. Specify the following settings for this dictionary:

    1) Click the ellipsis button in the Grammar path field, and select the *.xlg or *.aff dictionary file.

    2) Click the ellipsis button in the Dictionary path field and select the *.dic dictionary file.

    3) Choose the encoding of the dictionary text files from the drop-down list (supplied by the dictionary source).

    4) Choose the dictionary culture.

    The following screenshot shows the configured “Fr-Fr” dictionary:

    dic-path

  6. In the Options section, set the “Culture” setting to “French” to use the “Fr-Fr” dictionary instead of the built-in “En-Us” dictionary.

    path

    Note

    If you want the Spell Checker to use multiple dictionaries, set the “Culture” setting to “Invariant Culture”.

  7. Click Apply and OK to save these changes and close the Spell Checker options page.

    CodeRush allows you to save changes to a specific settings layer. For more information, see the following topic: Save Options to a Specific Layer.

The Spell Checker uses the “Fr-Fr” dictionary to check spelling inside the code editor.

In the following screenshot, the Spell Checker checks comments (the “Comments” option is enabled in the Context section of the Spell Checker options page):

french-spelling-example

Note

Make sure that the option “Run code analysis in a separate process“ in the Tools → Options → Text Editor → C# → Advanced option page is turned off:

Visua Studio option - Run code analysis in separate process

This enables the spell checker to display both a squiggly line under misspelled words and the Spell Checker context menu.