I want to perform multi-language of my site , but My code only work once and cannot work any more can anyone help me?
Main Site
...
<?php if ($_SESSION['lang']=='hk'){
include_once 'lang/lang.hk.php';
}else {
include_once 'lang/lang.en.php';
}
?>
...
<a href="redirect/hk.php">中文</a>
...
<div class="panel-heading"><?php echo $lang['ABC']; ?></div>
redirect/hk.php
<?php
$_SESSION['lang']=='hk';
header("location:http://example.com/");
?>
lang.hk.php
$lang = array();
$lang['ABC'] = 'XXXX';
lang.en.php
$lang = array();
$lang['ABC'] = 'Hello';
I click "hk.php" many times but the site still show "Hello" , But when I set that $lang="hk" manually , it works. How can I fix it ??