(Version 4.0+ browsers) 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 browser, which report the language as 'es' in most cases, can be sent to a separate Spanish page. This method works well for redirecting users in all the languages that you set up. Instructions on adding more languages are included in the source code.
Add the below code to the <body> section of your page:
<scriptlanguage="javascript"type="text/javascript"> /* Visit http://www.yaldex.com/
for full source code
and get more free JavaScript, CSS and DHTML scripts! */
<!-- Begin if(navigator.appName=='Netscape') varlanguage=navigator.language; else
varlanguage=navigator.browserLanguage;
/*-------------------------------------------------------------
Netscape instructions:
In Netscape, find the language you want to redirect by going to
Edit Menu --> Preferences...
Then click the '+' box next to 'Navigator' and click 'Languages'
Click 'Add' then find the languages you want and add them below.
if(language.indexOf('en')>-1)alert('You
would have been taken to the English page.'); elseif(language.indexOf('nl')>-1)alert('You
would have been taken to the dutch page.'); elseif(language.indexOf('fr')>-1)alert('You
would have been taken to the french page.'); elseif(language.indexOf('de')>-1)alert('You
would have been taken to the german page.'); elseif(language.indexOf('ja')>-1)alert('You
would have been taken to the japanese page.'); elseif(language.indexOf('it')>-1)alert('You
would have been taken to the italian page.'); elseif(language.indexOf('pt')>-1)alert('You
would have been taken to the portuguese page.'); elseif(language.indexOf('es')>-1)alert('You
would have been taken to the Spanish page.'); elseif(language.indexOf('sv')>-1)alert('You
would have been taken to the swedish page.'); elseif(language.indexOf('zh')>-1)alert('You
would have been taken to the chinese page.'); elseif(language.indexOf('ru')>-1)alert('Âû
ìîãëè áûòü ïåðåíàïðàâëåíû íà Ðóññêóþ ñòðàíèöó.'); else alert('You
would have been taken to the default English page. Your language was
not set up.'); document.write("<b><br>Your
language was reported as: "+language+'</b>'); // End --> </script>