Web form automatic language change

Hi, I’m trying to achieve the same behavior as an automatic language change, from the language picker, for a particular web form.

I believe this could be achieved via client script, within web form settings, setting the html lang attribute as ‘es-GT’, for example, but I have not been able to get it working.

I tried this

frappe.ready(function() {
document.documentElement.lang = “es-GT”;

and this without success:

frappe.ready(function() {
// Set the default language to Spanish (Guatemala) for the session
if (frappe.boot.lang !== “es-GT”) {
frappe.boot.lang = “es-GT”;

Please help :pray: