Properly You should start with a check which language a potential user/reader is using at browser level therefore you can read $_SERVER["HTTP_ACCEPT_LANGUAGE"]
see more details about language tags at w3.org
http://www.w3.org/International/article … iew.en.php
?php
$language = $_SERVER["HTTP_ACCEPT_LANGUAGE"];
switch($language) {
case 'de': $forward = 'check/de/welcome_register.php';break;
case 'en': $forward = 'check/en/welcome_register.php';break;
default: $forward = 'check/en/welcome_welcome.php';
}
header ("location: $forward");
?>
With that sample you have to generate complete new pages for each language other possibility is
<?php
$language= $_SERVER["HTTP_ACCEPT_LANGUAGE"];
switch($language) {
case 'de': include('includes/de/navigation.php');break;
case 'en': include('english_navigation.php');break;
default: include('english_navigation.php');
}
?>
third way could be
<?php
$language= $_SERVER["HTTP_ACCEPT_LANGUAGE"];
mysql_query("SELECT text FROM $language WHERE id = $id");
?>
or
<?php
$language= $_SERVER["HTTP_ACCEPT_LANGUAGE"];
if ( eregi('de', $language) ) {}
?>
but never less the user has to have a choice to change the language to his native once:
<?php
if ( isset($_GET["language"]) ) {$language= $_GET["language"];}
elseif ( isset($_POST["language"]) ) {$language= $_POST["language"];}
else {$language= $_SERVER["HTTP_ACCEPT_LANGUAGE"];}
?>
The poor horseman without horses
www.galopp-sport.euhttp://claimid.com/jlangrock[img]http://claimid.com/images/hcard.gif[/img]