In includes/classes/language.php is the following function:
Code:
function get_browser_language() {
$this->browser_languages = explode(',', $_SERVER['HTTP_ACCEPT_LANGUAGE']);
for ($i=0, $n=sizeof($this->browser_languages); $i<$n; $i++) {
reset($this->languages);
while (list($key, $value) = each($this->languages)) {
if (eregi('^(' . $value[0] . ')(;q=[0-9]\\.[0-9])?$', $this->browser_languages[$i]) && isset($this->catalog_languages[$key])) {
$this->language = $this->catalog_languages[$key];
break 2;
}
It seems to me there is a check for the languages that are suported by the browser of the visitor. But it does not function as supposed?
I am using Zen Cart 1.2.6 and because i made some deepgoing adjustments to Zencart i can not easily update my Zencart.
Our website is for the Dutch and Belgium market, as the Belgium market is devided in a Vlemisch (Belgium Dutch) and a French language part I want to check which language the visitor is using with his browser. When he is using the French language he will see our French site and when he is Vlemisch/Vlaams he will see the Dutch-Belgium language.
Is there anyone who knows how to do this or to make the above function work?
Bookmarks