3 declare(strict_types=1);
    42         if (strlen($this->header_value)) {
    45             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);
    46             if (count($matches[1])) {
    47                 $langs = array_combine($matches[1], $matches[4]);
    48                 foreach ($langs as $lang => $val) {
    53                 arsort($langs, SORT_NUMERIC);
    55                 $keys = array_keys($langs);
    56                 if (isset($keys[0])) {
    57                     return substr($keys[0], 0, 2);
 __construct(string $header_value)
 
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
 
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
 
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
 
getIso2LanguageCode()
Returns the detected ISO2 language code.