Back to LanguageTool Homepage - Privacy - Imprint

Two variants for the language

Today there was new set of orthography rules approved In Ukraine, so I am going to be working on adapting Ukrainian LT module to support those. But for a while there would be transitional period when both variants are used, so I need to support both.
I know we have spelling variants for several languages but in this case I would need to support both of them in grammar/style rules as well.
I can take a look if I could use “variant” field of the language for this but wanted to ask if there’s better approach for this.

You could flag words that are valid in the old, but not the new spelling category with a special ‘postag’ and base a rule on that. And allow for both in the spelling dictionary.

My problem is not in dictionary or rules right now but more how to surface two variants of the language spelling.
So far it looks like I can use “variant” in the Language class to provide that.

My understanding was thta the issue was orthography, so spelling.

Variants are distinguished usually by a country code, for example en-US, en-GB, etc. In LanguageTool there are two variants not defined by country: ca-ES-valencia (Valencian Catalan) and de-DE-x-simple-language.

ca-ES-valencia is a standardized code, but it is not implemented everywhere: it can be used in LibreOffice but not in OpenOffice. This is one the problems you’ll find.