_SERVER["HTTP_ACCEPT_LANGUAGE"] en-us
| From: | John Taylor-Johnston | Date: | Tue, 17 Oct 2006 06:13:56 +0000 |
| Subject: | _SERVER["HTTP_ACCEPT_LANGUAGE"] en-us | ||
| Groups: | php.general | ||
| Request: | Send a blank email to php-general+get-243232@lists.php.net to get a copy of this message | ||
This is what http_accept_language gives me depending on which browser. Depending on the visitor in my region, it will either be French or English.
_SERVER["HTTP_ACCEPT_LANGUAGE"] en-us,en;q=0.8,fr;q=0.5,fr-ca;q=0.3
_SERVER["HTTP_ACCEPT_LANGUAGE"] fr-ca,en-us;q=0.5
Is this a reasonable approach?
if(stristr($_SERVER["HTTP_HOST"],"fr"))
{ include("french.htm");}else{ include("english.htm");}