How to set HTML \'lang\' attribute dynamically in a web application?
I tried using jQuery as follows to insert the \'lang\' attribute:
Can't comment yet.
I tried the snippet and it worked for me. Of course I added a string value instead of your 'language' variable.
Don't forget to import jQuery in the top menu in order for it to work in the snippet.