Determine A Language Switch with window.navigator.userLanguage || window.navigator.language - Javascript Browser Object Model

Javascript examples for Browser Object Model:Window localStorage

Description

Determine A Language Switch with window.navigator.userLanguage || window.navigator.language

Demo Code

ResultView the demo in separate window

<html>
   <head> 
      <title>JavaScript System Language</title> 
      <meta name="viewport" content="width=device-width, initial-scale=1"> 
      <script type="text/javascript">
    window.onload=function(){/*from   w  w w.ja  v  a  2  s.  c o  m*/
var lang = window.navigator.userLanguage || window.navigator.language;
console.log(lang);
    }

      </script> 
   </head> 
   <body>  
   </body>
</html>

Related Tutorials