$_SESSION for language settings?!

From: Date: Mon, 14 Oct 2002 15:30:38 +0000
Subject: $_SESSION for language settings?!
Groups: php.general 
Request: Send a blank email to php-general+get-119914@lists.php.net to get a copy of this message
Hi there! This is some kind my experience: Here's the picture. I've made a simple PHP based Website. Now I hould like to expand it to spanish language. All of the text that appears on the website in divided by categories, each one of them set as a variable. All this stuff is in a file (contents.php). For example: TEXT TO BE DISPLAYED AS HEADLINE 1: ...is in file contents.php as... $title1 = "Headline 1"; OK, I'm trying to set $_SESSION['lang'] as contents_ing.php or contents.es.php, depending of which language user wants to choose. PROBLEM is that when I call $_SESSION['lang'] = "contents_es.php", it will only be true for the current page. Next pages will use this: if (!isset($_SESSION['lang'])) { $_SESSION['lang'] = "contents.php"; } from startup.php that is the file charged with the index.php page of the website (default page). Can anyone tell me what's wrong? Tanks, bsantos

« previous php.general (#119914) next »