Re: internationalization of web site
| From: | Martin Alterisio \"El Hombre Gris\" | Date: | Wed, 12 Apr 2006 19:24:15 +0000 |
| Subject: | Re: internationalization of web site | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-233846@lists.php.net to get a copy of this message | ||
Ussually, the browsers send a header with information about the language preferences of the user.
This header is HTTP_ACCEPT_LANGUAGE.
You can retrieve its value in PHP through the array $_SERVER:
$_SERVER['HTTP_ACCEPT_LANGUAGE']
Here you can find about the format of this header:
http://www.w3.org/Protocols/rfc2616/rfc2616-sec14.html#sec14.4
Alain Roger wrote:
Hi, Sorry to send this email on both mailing lists but as i suppose that both are concerned by it, i did. i would like to make my web site tune to user language. for that i was thinking to create some XML files where all words can be found and based on the icon (country flag) that user clicked, i will load a specific XML file to tune my PHP pages. i know from Java exprience that it exists also another possibility via browser setup for preference in language, but i do not know how it works in PHP. please, could you give me some tips, helps, or tutorial for such request ? thanks a lot, Alain