Skip to content

Conditional language settings based on auto-detection? #146

@q1zhen

Description

@q1zhen

Is your feature request related to a problem? Please describe.
I write most of my documents in English and Chinese, specifically en-GB and zh-CN, and I need grammar checking for English documents. If I set the language to auto-detect, then the nuance differences and spellings in British English would not be properly matched or corrected. If I set the language to en-GB, then all documents will be regarded as English and leaves tons of error messages in my Chinese documents.

Describe the solution you'd like
Add an option in the configuration that allows a conditional language selection based on auto-detection. Could be key-value pairs (detected language–actual language mode used) that express the rules. In my case, that would be:

[
	"en": "en-GB",
	"zh-CN": "zh-CN"
]

So that if text is detected as en, the en-GB mode is applied; if text is detected as zh-CN, the zh-CN mode is applied. With the rest of languages un-checked (or possibly, another option to control the behaviour of non-listed languages, either to check according to the detected language or no checking).

Describe alternatives you've considered
Language detection–based toggles. Such as a way to configure no grammar checking if text is detected as Chinese.

Additional context

Metadata

Metadata

Assignees

No one assigned

    Labels

    1-feature-request ✨Issue type: Request for a desirable, nice-to-have feature

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions