PHP Accept-Language Headers?
Moderator: General Moderators
- JAB Creations
- DevNet Resident
- Posts: 2341
- Joined: Thu Jan 13, 2005 6:44 pm
- Location: Sarasota Florida
- Contact:
PHP Accept-Language Headers?
I'm trying to find documentation on how to use PHP to detect the Accept-Language header and I'm surprised I'm not finding anything documented or maybe I'm just not making the correct queries. So how do I detect what the visitor's language is in their Accept-Language headers?
- JAB Creations
- DevNet Resident
- Posts: 2341
- Joined: Thu Jan 13, 2005 6:44 pm
- Location: Sarasota Florida
- Contact:
I remembered the $_SERVER predefined variable...and did a search...
http://www.google.com/search?hl=en&safe ... tnG=Search
So this works just nifty...
http://www.google.com/search?hl=en&safe ... tnG=Search
So this works just nifty...
Code: Select all
<?php echo $_SERVER['HTTP_ACCEPT_LANGUAGE'];?>- Jonah Bron
- DevNet Master
- Posts: 2764
- Joined: Thu Mar 15, 2007 6:28 pm
- Location: Redding, California