Prueba con preg_match, así
Código PHP:
Ver originalwhile (list($key, $value) = each($this->languages)) { if (preg_match('^(' . $value . ')(;q=[0-9]\\.[0-9])?$', $this->browser_languages[$i]) && isset($this->catalog_languages[$key])) { $this->language = $this->catalog_languages[$key];
break 2;
}
}