Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

is there a way to suggest the spellchecker a preferred language in HTML?

I tried both <html lang="de-DE"> and <textarea lang="de-DE"> in Chrome but without success.

Is there something that I can do today to suggest a preferred language in a HTML textarea?


1 Answers

The lang attribute is the way to specify content language, for spellchecking and other purposes. However, browser support is limited.

In spellchecking, Chrome ignores the lang attribute and uses the language set in the browser settings. So it’s user-controllable, not author-controllable.

IE 10 and newer seem to honor the lang attribute, but if the system lacks support for the specified language, spellchecking is just turned off for the element.

Firefox has been reported to honor lang from version 9, and it seems to do that, but inconsistencies have been detected. Moreover, for unknown languages, it does the same as IE. When I installed German spellchecking support (search with deutsch to find out some options), it started flagging typos in textareas declared with lang=de or lang=de-DE or lang=de-AT.

like image 126
Jukka K. Korpela Avatar answered Dec 14 '25 01:12

Jukka K. Korpela



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!