/* changeLang.php */ $_SESSION['Language'] = $_POST['Language']; // setcookie("Language", $_POST['Language'], time() + 3600); // URL method will require you to add the QUERY STRING to all pages. might get tough if($Language == 'English') { include 'English.php'; }
/* English.php */ $Lang = array( "SiteName" => "PT", "Greeting" => "Hello" );
/* Other.php */ $Lang = array( "SiteName" => "Lhsd", "Greeting" => "Sjhsdf" );
/* SomePage.php */ echo $Lang['SiteName']; // if they included English.php, this variable will be set as PT, if they included Other.php, it will be set as Lhsd