Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Language-Based Options When Adding Word to Dictionary #345

Open
aksarben opened this issue May 23, 2024 · 1 comment
Open

Language-Based Options When Adding Word to Dictionary #345

aksarben opened this issue May 23, 2024 · 1 comment

Comments

@aksarben
Copy link

When spell checking HTML documents, can you make the context menu for adding a word for a dictionary take into account the language of the text being checked? Or is this functionality available already and I haven't found it?

I have a very large Web site (over 16K pages), and the most pages have text in multiple languages. HTML lets authors specify the language for the overall page and individual page elements, but DSpellCheck ignores these language tags and only offers to add words to a single dictionary.

As a result, my English language dictionary is becoming bloated with hundreds (maybe thousands) of non-English words, because I can’t tell DSpellCheck to add the word to a different dictionary.

Details:

The first element of an HTML page normally shows the default language for the page:

<html lang="en-us">

Elements on an HTML page using a non-default language would use a lang tag to so indicate. For example, a German word or phrase on an English language page would look like this:

The music for <span lang="de">Ode an die Freude<span> comes from Beethoven’s 9th Symphony.

The World Wide Web Consortium, which sets HTML standards, explains that one reason language tags are availalble is so spell checkers can determine which dictionary to look in. See https://www.w3.org/International/questions/qa-lang-why.

@Predelnik
Copy link
Owner

Unfortunately it won't be easy to parse those tags, currently plugin uses only syntax coloring to determine whether certain part should be spell-checked or not. Adding knowledge about more precise file structure would require quite a bit of work.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants