Code Comments

Programming Forum and web based access to our favorite programming groups.
For Programmers: Free Programming Magazines | New: Database administration forum
Registration is free! Edit your profileCalendarFind other membersFrequently Asked QuestionsSearch -> 
Post New Thread











Thread
Author

getting default country_locale
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 ?



Report this thread to moderator Post Follow-up to this message
Old Post
Ike
04-19-05 08:56 PM


Re: getting default country_locale
"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



Report this thread to moderator Post Follow-up to this message
Old Post
Kimmo Laine
04-20-05 01:55 PM


Re: getting default country_locale

"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



Report this thread to moderator Post Follow-up to this message
Old Post
Ike
04-20-05 08:56 PM


Re: getting default country_locale
"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



Report this thread to moderator Post Follow-up to this message
Old Post
Kimmo Laine
04-20-05 08:56 PM


Re: getting default country_locale
 
>
>
> User Agent - fancy word for browser.
>

Thanks Kimmo. This is EXACTLY what I was looking for! -Ike



Report this thread to moderator Post Follow-up to this message
Old Post
Ike
04-20-05 08:56 PM


Sponsored Links




Last Thread Next Thread Next
Search this forum -> 
Post New Thread

PHP Language archive

Show a Printable Version Send to friend Email This Page to Someone! subscribe to this thread Receive updates to this thread
Computer Consultants
Programming Jobs
Visual Basic Controls
SQL Server Programming
Webservices
Java Security
Visual Studio
C# Programming
Visual J++
Software engineering
Open source Software
Perl Programming
PHP Programming
ASP Programming
ASP .NET Programming
Visual Basic Programming
Windows Scripting Host
Java Programming
Java Help
Java Beans
VBScript
Cobol
MAC Applications
Unix Programming
Forum Jump:
All times are GMT. The time now is 07:19 PM.

 
Free MCSE Braindumps | Real Estate Topics

Programming forum archive

Copyrights CodeComments.com 2004 - 2006

Powered by vBulletin Copyright 2000-2006 Jelsoft Enterprises Limited.