Re: How to do i18n better?

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Ashley Sheridan wrote:

> On Tue, 2010-04-20 at 20:27 +0200, Per Jessen wrote:
> 
>> Ashley Sheridan wrote:
>> 
>> > That's the check I did on the last site i worked on (vicestyle.com)
>> > The user agent string is checked for a language and the site uses
>> > that. If none is found (bearing in mind that there's no hard and
>> > fast rule about what can go into a UA string) then it defaults to
>> > English.
>> 
>> The language preference is not set in the UA string, it is set in the
>> Accept-Language header along with the priority.
>> 
>> [snip] 
> 
> 
> I wasn't aware of that one, but I know most browsers send a language
> with part of the UA string
> 
> Thanks,
> Ash

Accept-Language, the 'prefer-language' cookie, the various apache config
options etc. are all part of the Apache content-negotiation
setup/framework.  On our website(s), I rely entirely on
Accept-Language. In the very rare case where it isn't set, I set a
default based on the IP-address of the client.  


-- 
Per Jessen, Zürich (8.4°C)


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


[Index of Archives]     [PHP Home]     [Apache Users]     [PHP on Windows]     [Kernel Newbies]     [PHP Install]     [PHP Classes]     [Pear]     [Postgresql]     [Postgresql PHP]     [PHP on Windows]     [PHP Database Programming]     [PHP SOAP]

  Powered by Linux