Redirects a user to the page based on their language. For example, English language user browsers, which report the language as EN in most cases can be redirected to an English page, while Spanish language user browsers, which report the language as ES it most cases can be sent to a separate Spanish page.
<!-- ONE STEP TO INSTALL LANGUAGE:
1. Copy the coding into the HEAD of your HTML **** and modify to suit -->
<head>
<script type="text/javascript" language="JavaScript1.2">
<!-- Begin
if (navigator.appName == 'Netscape')
var language = navigator.language;
else
var language = navigator.browserLanguage;
// Modify the .html pages, can be either file.html or, http://www.domain
if (language.indexOf('en') > -1) ****.location.href = 'English.html';
else if (language.indexOf('nl') > -1) ****.location.href = 'dutch.html';
else if (language.indexOf('fr') > -1) ****.location.href = 'french.html';
else if (language.indexOf('de') > -1) ****.location.href = 'german.html';
else if (language.indexOf('ja') > -1) ****.location.href = 'japanese.html';
else if (language.indexOf('it') > -1) ****.location.href = 'italian.html';
else if (language.indexOf('pt') > -1) ****.location.href = 'portuguese.html';
else if (language.indexOf('es') > -1) ****.location.href = 'Spanish.html';
else if (language.indexOf('sv') > -1) ****.location.href = 'swedish.html';
else if (language.indexOf('zh') > -1) ****.location.href = 'chinese.html';
else
****.location.href = 'English.html';
// End -->
</script>
</head>
Language
-
- Posts: 504
- Joined: Sat May 07, 2005 8:03 am
- Contact: