browsers | Site If your site is for surfers around the world or for business, it's very realistic to test the browser language type of visitors. provided here
The script can detect the reveal, the browser language type, the general Chinese can be recognized as "en", the English version can be recognized as "en", and then according to the judgment of the bangs
A browser language type guides a page in a different language version. Of course, you can use the server to solve this problem, the client with this script on it.
You need to place the code in the <script language= "JavaScript1.2" >
<!--//
if (navigator.appname = ' Netscape ')
var language = Navigator.language;
Else
var language = Navigator.browserlanguage;
if (language.indexof (' en ') >-1) document.location.href = ' english.htm ';
else if (Language.indexof (' nl ') >-1) document.location.href = ' dutch.htm ';
else if (Language.indexof (' fr ') >-1) document.location.href = ' french.htm ';
else if (language.indexof (' de ') >-1) document.location.href = ' german.htm ';
else if (language.indexof (' ja ') >-1) document.location.href = ' japanese.htm ';
else if (language.indexof (' it ') >-1) document.location.href = ' italian.htm ';
else if (Language.indexof (' pt ') >-1) document.location.href = ' portuguese.htm ';
else if (language.indexof (' es ') >-1) document.location.href = ' spanish.htm ';
else if (language.indexof (' SV ') >-1) document.location.href = ' swedish.htm ';
else if (language.indexof (' en ') >-1) document.location.href = ' chinese.htm ';
Else
Document.location.href = ' english.htm ';
End-->
</script>