Location: PHPKode > projects > Openology PHP Application Integration > openology/configbase.php
<?php
//-------SESSION SET----------
session_start();
if (!session_is_registered('lang'))
{
    preg_match('/^([a-z\-]+)/i', $_SERVER['HTTP_ACCEPT_LANGUAGE'], $matches);
    $lang = $matches[1];
	if ($lang != 'zh-cn')
	{
	$lang = 'en';
	session_register('lang');
    $_SESSION['lang'] = $lang;
	}
	else
	{
	session_register('lang');
    $_SESSION['lang'] = $lang;
	}
}

if (isset($_GET['lang']))
{
    $_SESSION["lang"] = $_GET['lang'];
}

?>
Return current item: Openology PHP Application Integration