cspell icon indicating copy to clipboard operation
cspell copied to clipboard

Respect lang attribute in HTML

Open jsuddsjr opened this issue 5 years ago • 0 comments

The lang attribute can be used on any element in HTML. I would like to be able to use this attribute to import additional dictionaries in HTML files, but it appears to be ignored.

Use case

HTML 5 standard strongly suggests using lang attribute at the top of the HTML document to assist search engines, screen readers, and browsers. Unfortunately, this lang attribute appears to disable most other language dictionaries.

<html lang="en">

The user should be able to switch on those dictionaries using another lang attribute.

<p lang="fr">Ceci est un paragraphe.</p>
<p lang="lorem">Lorem ipsum dolor sit amet consectetur adipisicing elit.</p>

Result

  • These paragraphs are processed with the EN dictionary.

Expected

  • Import additional dictionaries as needed.

jsuddsjr avatar Nov 29 '20 19:11 jsuddsjr