Languagetool does not show Spelling mistake without language longCode (for example 'en-GB')

curl --data “language=en&text=testf” http://localhost:8010/v2/check
Does not show Spelling mistake

curl --data “language=en-GB&text=testf” http://localhost:8010/v2/check
Show Spelling mistake

Why it does not show errors when the language is specified in short code (‘en’, ‘de’)?
What parameters should I run the LanguageTool with so that it shows a spelling mistake with a short language code?

Thanks

If you use just en, LT doesn’t know which dictionary to use. So always set the specific code with a variant (like en-US) to activate spelling.

Can I define which dictionary to use by default for English when it is not defined?

Yes, see preferredVariants in the API docs.

1 Like