A little example: (try it in http://fpepito.dyndns.org/test.php )
I hope that help you,
pepito
-----------------
<?
$myname = $PHP_SELF;
session_register ("session");
if (isset ($session[lang])) {
// if user choice another language, update the session[lang]
if (isset ($lg)) { $session[lang] = $lg;}
echo "Session existe, you have enter: $session[count] times
";
echo "Your actual language is: $session[lang]
";
setlocale ("LC_TIME", $session[lang]);
echo strftime ("%c")."
";
// You need locale file corresponding with the next language
echo "Utiliser le français
";
echo "Use english langage
";
echo "Utilizar o portugues
";
// update counter
$session[count] = $session[count] + 1;
} else {
echo "It's the first time that you coming. We will create session:
";
$session[lang] = $HTTP_ACCEPT_LANGUAGE;
$session[count] = 1;
echo "reload";
}
?>