in php there is a server variable $_SERVER["HTTP_ACCEPT_LANGUAGE"]
This variable show what the web browser accept or prefer language, like en-us, zh-hk etc.
when the browser configure more than one accept language, there is a "quality values" which are floating point values between 0 and 1, higher values indicate higher preference.
zh-hk,en;q=0.5 example in IE, two language
zh-hk,en;q=0.7,zh-cn;q=0.3 example in Firefox three language
the most prefer language is zh-hk(chinese hongkong, no q value), en(english) q= 0.7 is second, zh-cn, q=0.3 is the last in these three language.
Tuesday, July 18, 2006
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment