coderushforroslyn-402509-getting-started-examples-code-analysis-how-to-add-a-dictionary-to-the-spell-checker.md
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.
The Spell Checker supports the following types of dictionaries:
ISpellDictionaries 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).HunspellDictionaries are available at the following locations:
.xpi to .zip, and extract the dictionaries folder..oxt to .zip, and extract the dictionaries folder.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.
This example describes how to add the French dictionary downloaded from the Open Office French Dictionaries extension.
Follow the steps below:
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.
Open the Editor | All Languages | Code Analysis | Spell Checker options page.
In the Dictionaries group, click the “+” button to add a new dictionary.
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.
Select the newly added dictionary in the Dictionaries list. Specify the following settings for this dictionary:
In the Options section, set the “Culture” setting to “French” to use the “Fr-Fr” dictionary instead of the built-in “En-Us” dictionary.
Click Apply and OK to save these changes and close the Spell Checker options page.
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):