Search code examples
c#visual-studio-2022

How to add correctly an additional language for spell checking in Visual Studio?


I'm trying to get Visual Studio to check spelling in two languages, but it only works with English:

I found the following resources:

Here’s an example from the documentation:

Here are some examples and use-case scenarios of the switches you can configure in an EditorConfig file:

List the languages for Visual Studio to use. In this example, Visual Studio would only use the "en-us" and "fr-fr" dictionaries when checking for spelling issues.

spelling_languages = _language_[,_language_] (Example: = en-us,fr-fr)

Note

Make sure to install the language pack for any language you're using to prevent Visual Studio from incorrectly flagging words as spelling errors.

I’ve installed the German language pack and placed a .editorconfig file in two locations:

Root directory (c:\.editorconfig)
Project directory (c:\Repo\Company\Solution\MyProject\.editorconfig)

With this content:

spelling_languages = en-us, de-de

However, Visual Studio still doesn’t suggest German words. Here's an image showing the issue:

Not Working with 2 languages

Expected behavior (for two languages):

Expected behavior

I've verified that the German language pack is installed:

Installed language pack

Any ideas on what could be going wrong or how I can fix this?


Solution

    1. Add .editorconfig File(.NET) item in project.

    2. Open with HTML Editor.

    3. Remove the space: en-us, (space) de-de.

      spelling_languages = en-us,de-de
      
    4. save config file