Setting en-GB doesn't exclude US English spellings
Thanks for this excellent tool!
Using plugin v2.20.0 (VSCode 1.76.1, MacOS 13.2.1 on an Apple M1) and the following configuration:
"cSpell.language": "en-GB"
Expected behaviour
In a markdown file, realise and colourare accepted but realize and color are not
Actual behaviour
In a markdown file, all of realise, colour, realize and color are accepted.
If I set the language to:
"cSpell.language": "en_US"
Then the British English spellings are correctly rejected.
Is there some setting I am missing, or is this a bug?
@TimothyJones,
A couple of things are going on.
- The Oxford English dictionary includes a lot of
izewords. colormight be included from other dictionaries being used.
To see where a word comes from, the cspell command line tool can help. cspell trace --help will show all the options.
Trace color
cspell trace --locale=en-gb --language-id=markdown color
In the case of color, markdown is coming from the html dictionary. This dictionary is included by default since markdown allows HTML.
If you would like, it is possible to disable the html dictionary in markdown files.
The simplest is to add the following to the bottom of the file:
<!--- cspell:dictionaries !html --->
Thanks for the incredibly fast response and debugging information!
That does indeed fix it for my markdown files (although it means that my embedded mermaid diagrams are now complaining about color, of course 😂 ).
I reckon this debugging information would be worth including in the FAQ. If you agree, I'd be happy to make a PR.
For those playing along at home - omitting the html dictionary didn't fix realize, which seems to be coming from en-gb (I think?):

Turns out it's correct - both are acceptable in British English. TIL
I reckon this debugging information would be worth including in the FAQ. If you agree, I'd be happy to make a PR.
Documentation is one of the weak points of this extension, so PRs are most welcome!