PHP Classes

File: language.php

Recommend this page to a friend!
  Classes of Stanescu Mihai  >  Language System  >  language.php  >  Download  
File: language.php
Role: Example script
Content type: text/plain
Description: Select language function
Class: Language System
Let the user choose the application idiom
Author: By
Last change:
Date: 11 years ago
Size: 658 bytes


Class file image Download
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
// 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");
'Hacking Attempt');

'Hacking Attempt');

For more information send a message to info at phpclasses dot org.