Location: PHPKode > scripts > Language System > example.php
<?php
// Include the class
include 'language.class.php';

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

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

// Check if the language it's saved in cookies else try to load the default language
$loadlang = $language->check();

// Load the language
$language->load($loadlang);

// Print's constants of the curent language
?>
<html>
<head>
<title><?php echo Title;?></title>
<!DOCTYPE html
  PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
  "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> 

<script language="JavaScript">

function loadPage(list) {

  location.href="language.php?href=<?php echo $_SERVER['PHP_SELF'];?>&lang=" + list.options[list.selectedIndex].value

}

</script>
</head>
<body>
<?php echo Text;?>

<form>
<select name="lang" onchange="loadPage(this.form.elements[0])"
  target="_parent._top"
  onmouseclick="this.focus()"
  style="background-color:#ffffff">

<?php echo $language->language_options();?>
</select>
</form>

</body>
</html>
Return current item: Language System