PHP script functioning well with Explorer but not with Chrome

I’m using cookies to select the pages language (English as default or Hebrew)

My cookies setting code:

$Lang = isset($_GET[Lang]) ? $_GET[Lang] : $_COOKIE[‘BTLANG’];
foreach ($HTTP_GET_VARS as $K => $V)
$getData{$K} = $V;
foreach ($HTTP_COOKIE_VARS as $K => $V)
$cookieData{$K} = $V;
if($cookieData{‘PHPSESSID’} == “”) {
if($getData{‘PHPSESSID’} == “”) {
$SESSION_ID = md5(uniqid($USER_IP));
if($Lang == 2)
header(‘Content-Type: text/html; charset=windows-1255’);
//header(‘Content-Type: text/html; charset=iso-8859-8-i’);
// if (isset($BTLANG))
$Language = isset($_GET[‘Lang’]) ? $_GET[‘Lang’] : $_COOKIE[‘BTLANG’];
if($Language == 0)
$Language = 1;
/* else
$Language = 1; /
if($Lang == 2) */
$MAIN_PAGE = ($_GET[Frame] != “”) ? “$_GET[Frame]” : “main.php”;

The script of every page starting with reading cookies to select the appropriate language:

if (isset($BTLANG))
$Language = 1;
$Lang = “E”;
$Align = “LEFT”;
if ($Language == 2) { $Lang = “H”; $Align = “RIGHT”; } $DESIGN_MODE = 0;
header(‘Content-Type: text/html; charset=windows-1255’); $DBHost = “localhost”;

When using Explorer browser it select properly the page language (always no matter the computer),
in case of using Chrome or Firefox some computers selecting properly the language and some staying with the default English language.

Much appreciate your help

[COLOR=#333333]I don’t understand fully what’s going on at all (the syntax seems weird to me, but that’s probably just me), but, just a suggestion, should this:

if (isset($BTLANG))[/COLOR]
[COLOR=#333333]$Language = $HTTP_COOKIE_VARS[“BTLANG”];



Thank you very much, I tried your suggestion and still doesn’t help,
to see the problem please go my site using Chrome, change language to Hebrew (with English it works fine, not need to change language), select from my store one of my items to buy (before look at the English site how to do this), when you ‘Procced to Checkout’ the new page will appear in English (intead to stay in Hebrew)