|
Posted by Rik on 07/25/07 15:08
On Wed, 25 Jul 2007 16:57:03 +0200, Sergei Riaguzov <hello@world.com> =
wrote:
> On Wed, 25 Jul 2007 15:24:01 +0200, Rik wrote:
>
>>> I have set general.useragent.locale to "en" in Firefox but what I ge=
t
>>> from $_SERVER["HTTP_ACCEPT_LANGUAGE"] is "pl,en-us;q=3D0.7,en;q=3D0.=
3"
>> That's because you've set polish as your preferred language
>> (tools->options->advanced->languages->Choose.. ). That's how I come b=
y
>> fairly large:
>> Accept-Language: en-gb,en;q=3D0.8,nl;q=3D0.7,nl-be;q=3D0.5,de;q=3D0.3=
,fr;q=3D0.2
> And which one should be user locale? The first one?
None of the above, it has very little to do with the locale. The first o=
ne =
(with q=3D1, so omitted, choose the highest q), would be the preferred =
language as set in the browser. If users haven't touched it, it's usuall=
y =
follows the locale they've set. If they have, they usually know what =
they're doing.
>> It might help if you told us what the locale is going to be used for?=
I
>> guessed for determening the language of the user, but I might be wron=
g..
>> And the users themselves might not have it set correctly offcourse.
> Yes that's right, I want to find out user locale settings to show
> localized page.
Localized on location/region, or language? HTTP_ACCEPT_LANGUAGE is only =
=
usefull for language, in other cases you'll have to look into stuff like=
=
GeoIP.
-- =
Rik Wasmus
[Back to original message]
|