HtmlDialog language

Hi all,
In my ruby code on Sketchup 2020 and 2021, I use a HtmlDialog. User fill text inside text. area but autocorrectioj are ni english.
How set up the language of chrome inside the HtmlDialog ?
Thanks

1 Like

Perhaps you could try to start like this:
https://stackoverflow.com/questions/41252737/over-ride-chrome-browser-spell-check-language-using-jquery-or-javascript

thanks I will try it

I’m not sure, but have you tried the lang attribute?

lang - HTML: HyperText Markup Language | MDN (mozilla.org)

Referring to the linked topic thread, we see that this will not work …

Stackoverflow : “Over-ride Chrome Browser spell check language using JQuery or JavaScript” …

You can change the language using setAttribute('lang', lang) but Chrome doesn’t use the lang attribute for spellcheck. This is a won’t fix issue [for Chromium].

The post goes on to explain that the choice of spellcheck language is an end-user right click context menu feature. Users can create multiple custom spellcheck dictionaries and switch between them at will.

The post author also shows in his example the use of the global “spellcheck” HTML attribute.

Lastly he gives links to 3rd party libraries for spellchecking …

You can perhaps use some external libraries like JavaScript SpellCheck or JQuery SpellCheck to get the job done.

Sorry for the late reply. I’m on MAC and i’m not able to reproduce the problème on it. I will check it as soon as possible.