4require_once 
'Services/Language/interfaces/interface.ilLanguageDetector.php';
 
   33                if(strlen($this->header_value))
 
   37                        preg_match_all(
'/([a-z]{1,8}(-[a-z]{1,8})?)\s*(;\s*q\s*=\s*(1|0\.[0-9]+))?/i', $this->header_value, $matches);
 
   38                        if(count($matches[1]))
 
   40                                $langs = array_combine($matches[1], $matches[4]);
 
   41                                foreach($langs as 
$lang => $val)
 
   49                                arsort($langs, SORT_NUMERIC);
 
   51                                $keys = array_keys($langs);
 
   54                                        return substr($keys[0], 0, 2);
 
   59                require_once 
'Services/Language/exceptions/class.ilLanguageException.php';
 
Class ilHttpRequestsLanguageDetector.
__construct($header_value)
getIso2LanguageCode()
Returns the detected ISO2 language code.
Class for language related exception handling in ILIAS.
Interface ilLanguageDetector.