It works based on $_GET so to hold the language as it is i have to protect the URL as "www.blablabla.com/index.php?lang=en" for English or "www.blablabla.com/index.php?lang=jp" for Japanees.But guys when i put a link inside the main page to a sub page the URL get change like "www.blablabla.com/sub.php".After that website doesn't work because URL does not provide a value to that $_Get function
This is the language switching logic.
Code: Select all
if(isset($_GET['lang']))
{
$lang=$_GET['lang'];
}
else
{
$lang='en';
}
switch ($lang)
{
case 'en';
$lang_file = 'en.php';
break;
case 'jp';
$lang_file = 'jp.php';
break;
default;
$lang_file = 'en.php';
}Please give me a idea to solve my problem.