How to change the declared language in the HTML file


I’m trying to optimize the SEO of my Multilingual web app and I would like to change the language in dynamically so that the app gets crawled correctly by Google.

I tried to change the user language both by making change to the current user and by changing the user thing, but no of the two methods change the HTML declared language.

Is it possible to do, is it a feature request, or is it something that is not possible?



I had the same issue, and it’s actually way easier in javascript.
So if someone passes by with the same issue:

  1. Install the Toolbox plugin
  2. Use a “run javascript” action with this code in your workflow:
    document.documentElement.setAttribute("lang", 'your language code');
    And that’s it!