Location: PHPKode > scripts > Language System > language.php
<?php
if(isset($_GET['lang']) && isset($_GET['href'])){
// Include Language class file
include 'language.class.php';

// Include Config file
include 'config.php';

// Call the language instance
$l = new language(DefaultLang);

$lang = strtolower($_GET['lang']);

// Check if the selected language exists
if($l->exists($lang)){
// Save the new language in cookies
setcookie('lang', $lang);

// Get the page before you selected the language
$page = $_GET['href'];

// Redirect to the page that you were before select the language
header("Location: $page");
}
else{
die('Hacking Attempt');
}

}
else{
die('Hacking Attempt');
}
?>
Return current item: Language System