Single language app

In a single language app other than english, how can I change <html lang="en"> to <html lang="pt">?

Chrome always ask my users to translate app to portuguese.

I think this can solve the problem:

But how to call document root from anvil.js? When I call:

anvil.js.call('document.documentElement.setAttribute("lang", "pt")')

I got:

Python exception: TypeError: document.documentElement.setAttribute("lang", "pt") is not callable, got undefined

More like

from anvil.js.window import document

And from there make calls on document in Python style.

1 Like

I chose to simply switch off translation.

1 Like

Thank you @jshaffstall and @stein !!!