Re: Bug in HTTP.php
| From: | Anders Johannsen | Date: | Wed, 31 Jan 2001 14:46:03 +0000 |
| Subject: | Re: Bug in HTTP.php | ||
| Groups: | php.pear | ||
| Request: | Send a blank email to php-pear+get-1228@lists.php.net to get a copy of this message | ||
> Besides, negotiateLanguage() doesn't seem to recognize the
> accept-language header set by my browser (netscape 4.76) - it
> always returns the default language. I haven't been looking into the
> problem yet, but I would like to hear if any of you have used this
> function with success?
> (I am probably just missing something...)
Probably ;-)
Netscape 4.76 and IE both seems to set standard Accept-Language headers,
and
in my setup, negotiateLanguage() returns the appropriate value when invoked
like in the example below
<?php
include "HTTP.php";
$http = new HTTP;
$arrSupported = array ( "af" => true,
"ca" => true
);
echo $http->negotiateLanguage($arrSupported);
?>
/A
--
Anders Johannsen