Code Comments
Programming Forum and web based access to our favorite programming groups.Is anyone aware of a means to determine the default country_local (the iso-spec, e.g. 'en_US') for a given LOCAL computer, such as someone might have specified in Windows under Control Panel - Regional and Language Options ?
Post Follow-up to this message"Ike" <rxv@hotmail.com> wrote in message news:hy79e.8828$An2.2200@newsread2.news.pas.earthlink.net... > Is anyone aware of a means to determine the default country_local (the > iso-spec, e.g. 'en_US') for a given LOCAL computer, such as someone might > have specified in Windows under Control Panel - Regional and Language > Options ? > $_SERVER['HTTP_ACCEPT_LANGUAGE'] gives you the language set in the UA. Also $_SERVER['HTTP_USER_AGENT']:Mozilla/5.0 (Windows; U; Windows NT 5.1; fi-FI; rv:1.7.7) Gecko/20050414 Firefox/1.0.3 fi-FI is mentioned. That should be fi_FI for Finnish, but anyway... Although Firefox seems to be the only one from Ie, Fx and Opera that sends the language code in the user agent description. So what ever you get, it's never more than a mere guess what the language might be, and so you should provide the user with a possibility to change the language if necessary. -- Welcome to Usenet! Please leave tolerance, understanding and intelligence at the door. They aren't welcome here. eternal piste erection miuku gmail piste com
Post Follow-up to this message"Kimmo Laine" <eternal.erectionN05P@Mgmail.com> wrote in message news:wqn9e.8761$wj6.7251@reader1.news.jippii.net... > "Ike" <rxv@hotmail.com> wrote in message > news:hy79e.8828$An2.2200@newsread2.news.pas.earthlink.net... might > > $_SERVER['HTTP_ACCEPT_LANGUAGE'] gives you the language set in the UA. > Also > $_SERVER['HTTP_USER_AGENT']:Mozilla/5.0 (Windows; U; Windows NT 5.1; fi-FI; > rv:1.7.7) Gecko/20050414 Firefox/1.0.3 > fi-FI is mentioned. That should be fi_FI for Finnish, but anyway... Although > Firefox seems to be the only one from Ie, Fx and Opera that sends the > language code in the user agent description. So what ever you get, it's > never more than a mere guess what the language might be, and so you should > provide the user with a possibility to change the language if necessary. Thanks Kimmo. What is "UA," represent, as in "...language set in the UA?" -Ike
Post Follow-up to this message"Ike" <rxv@hotmail.com> wrote in message news:Tnr9e.11120$lP1.854@newsread1.news.pas.earthlink.net... > > > "Kimmo Laine" <eternal.erectionN05P@Mgmail.com> wrote in message > news:wqn9e.8761$wj6.7251@reader1.news.jippii.net... > might > fi-FI; > Although > > > Thanks Kimmo. What is "UA," represent, as in "...language set in the > UA?" -Ike > User Agent - fancy word for browser. -- Welcome to Usenet! Please leave tolerance, understanding and intelligence at the door. They aren't welcome here. eternal piste erection miuku gmail piste com
Post Follow-up to this message> > > User Agent - fancy word for browser. > Thanks Kimmo. This is EXACTLY what I was looking for! -Ike
Post Follow-up to this message
Show a Printable Version
Email This Page to Someone!
Receive updates to this thread
Powered by vBulletin
Copyright 2000-2006 Jelsoft Enterprises Limited.