X-Git-Url: https://git.mxchange.org/?a=blobdiff_plain;f=include%2Fpgettext.php;h=5a0eab0b01078267a424c65ce47e22ab32879aa5;hb=794ae669cefa8234da08718e81a5872832b79259;hp=a079a468789909c9cebc6c5cfb2150c743986eb9;hpb=71e2dbf3522dcf076458805ee65dc976fb35a6f3;p=friendica.git diff --git a/include/pgettext.php b/include/pgettext.php index a079a46878..5a0eab0b01 100644 --- a/include/pgettext.php +++ b/include/pgettext.php @@ -15,10 +15,10 @@ */ -if(! function_exists('get_language')) { -function get_language() { +if(! function_exists('get_browser_language')) { +function get_browser_language() { - if (isset($_SERVER['HTTP_ACCEPT_LANGUAGE'])) { + if (x($_SERVER,'HTTP_ACCEPT_LANGUAGE')) { // break up string into pieces (languages and q factors) preg_match_all('/([a-z]{1,8}(-[a-z]{1,8})?)\s*(;\s*q\s*=\s*(1|0\.[0-9]+))?/i', $_SERVER['HTTP_ACCEPT_LANGUAGE'], $lang_parse);