tedd wrote:
> At 11:05 PM +0100 11/27/07, Jochem Maas wrote:
>> tedd wrote:
>>
>>  > If it were me, I wouldn't use any problematic browser detects schemes
>>>  (they don't work) or any of that high-thought stuff -- it's beyond me.
>>
>> whether it's beyond you or not only you can judge, but I disagree that
>> it's
>> problematic. I should note that I recommend using browser language
>> preference
>> detection (as per my previous post) as a means to initially select a
>> [hopefully]
>> suitable language BUT that this should be done in addition to offer
>> the user
>> an explicit mechanism for language selection.
> 
> My "beyond me" statement was meant in jest, but browser sniffing is
> notorious for being inaccurate and the practice is highly controversial.
> 
> http://en.wikipedia.org/wiki/Browser_sniffing

Sorry Tedd, but I'm not sure where the browser sniffing stuff came in.
IE and FF both offer a UI to input the user's preferred language, it's
an HTTP standard thing and nothign to do with user agents string
parsing. It uses the Accept-Language header sent with http requests to
detect the language. It's quite standard but problems usually crop up in
e.g. Australia and the UK where a lot of people leave the default en-US
language when en-GB or en-AU would be better. Again it's not infallible
but it's a fairly good starting point.

Another approach would be to use a geoip database and try and look up
the users IP address but, if anything, I'd say that is even less
accurate than the above.

Col

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to