<?php
$lang=strtok($HTTP_ACCEPT_LANGUAGE,","); //language codes are comma delimited while ($lang){
if (strstr($lang,"en")){ //if there is "en" in it
header ("Location: http://your.domain.com/english/");
exit;}
if (strstr($lang,"es")){
header ("Location: http://your.domain.com/castellano/");
exit;}
if (strstr($lang,"nl"){
header ("Location: http://your.domain.com/nederlands/");
exit;}
if ereg((strstr($lang,"de"){
header ("Location: http://your.domain.com/deutsch/");
exit;}
$lang=strtok(",");}//next token and end of while header ("Location: http://your.domain.com/english/"); // default relocation in case nothing got detected exit;
?>
|
|