nicky2k
asked on
PHP getlocale help, very easy points
I've just been on www.php.net and this is still as clear as mud to me.
What I want to do is process code depending on the current user locale. I can't seem to find a function that does this.
If locale = "Europe/London" then
do code 1
Else if locale = "USA"
do code 2
Else if locale="Africa"
do code 3
Thanks.
What I want to do is process code depending on the current user locale. I can't seem to find a function that does this.
If locale = "Europe/London" then
do code 1
Else if locale = "USA"
do code 2
Else if locale="Africa"
do code 3
Thanks.
ASKER
That just gets me the languages though, which could be used by any country. WhatI need is the timezone or country name itself.
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Use the server variable:
$_SERVER['HTTP_ACCEPT_LANG
For testing:
echo $_SERVER['HTTP_ACCEPT_LANG