get the site language by javascript

 <script type=”text/javascript”>

var userLang = document.documentElement.lang; 

console.log (“The language is: ” + userLang);

</script>

Leave a Comment

Your email address will not be published. Required fields are marked *