Re: Why do I get redirected to a German page?
| From: | Philip Newton | Date: | Sat, 29 Mar 2003 08:33:15 +0000 |
| Subject: | Re: Why do I get redirected to a German page? | ||
| References: | 1 | Groups: | php.mirrors |
| Request: | Send a blank email to php-mirrors+get-16523@lists.php.net to get a copy of this message | ||
On 29 Mar 2003 at 9:22, Derick Rethans wrote:
> On Sat, 29 Mar 2003, Philip Newton wrote:
>
> > Hi, I followed a link to www.php.net/date , which redirected me to
> > http://www.php.net/manual/de/function.date.php -- a German
> > page.
> >
> > Why is this? It is true that I am in Germany, but my browser's Accept-
> > Language headers are "en-GB,en,de", which means that I prefer British
> > English to "generic" English, and English to German. I think the web
> > site should respect that.
> >
> > I presume it tried to sniff my IP address, which can be cute, but
> > misleading (e.g. if all of a global ISP's users go through a proxy in
> > one country, or a multinational corporation routes traffic over their
> > internal network before going out onto the Internet in one location --
> > or if someone lives in a country but a given language is not their
> > native language). And what do you do for someone from Switzerland,
> > Belgium, or Finland, or any other country with more than one official
> > language?
> >
> > Please support the Accept-Language header; that's what it's there for.
> > (Though at least you have the courtesy to set a cookie indicating the
> > last language; if I change the URL by replacing "de" with "en", I get
> > another cookie, which, I presume, would store my preference if I would
> > accept it. But that's just a band-aid.)
>
> It should really do that already, can you go to php.net/my.php to see if
> it is correctly parsed?
It is not:
Your Accept-Language browser setting (parsed)
de, en, en
However, when I visit a CGI page I made which simply outputs the
environment variables it receives, it says
HTTP_ACCEPT_LANGUAGE = en-GB,en,de
and that is the order I entered them into my browser (Opera 6.05
running under Windows 98; it shows "User-defined, [en-GB]" "English,
[en]" "German, [de]" in the preferences box).
Maybe this is because there are no weights attached to the individual
choices (e.g. "en-GB;q=1.0, en;q=0.8, de;q=0.6")? But still, I thought
the order was significant even if all languages have equal weight.
Maybe the languages are sorted alphabetically so that "de" comes before
"en"?
Cheers,
Philip
--
Philip Newton <Philip.Newton@gmx.net>