Reputation:
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?
Upvotes: 3
Views: 733
Reputation: 201588
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
.
Upvotes: 4