How to know what country codes navigator.userLanguage; returns for all countries?
<p>I'm using the following code to detect the language and country of a visiting user of  site. According to this <a href="http://www.w3schools.com/jsref/prop_nav_userlanguage.asp" rel="nofollow">http://www.w3schools.com/jsref/prop_nav_userlanguage.asp</a>, it returns the operating system's natural language settings. So it actually returns the OS settings of the user.</p>

<p>My question, how do know I know all the codes that, that function returns for all countries and languages? Is there a list somewhere? For example in Spain it returns es-ES.</p>

<p>Thanks!</p>

<pre><code>var userLang = (navigator.language) ? navigator.language : navigator.userLanguage; 
</code></pre>
