Created
August 16, 2017 22:17
-
-
Save kalupa/62772adebc9d7a750a7f4d6731d01658 to your computer and use it in GitHub Desktop.
Adds lang and xml:lang to html node.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<script type='text/javascript'> | |
var targetLang = "en"; | |
var htmlEl = document.querySelector('html'); | |
htmlEl.lang = targetLang; | |
htmlEl.setAttribute("xml:lang", targetLang); | |
</script> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment