Multi-Lingual Site Configuration with Apache
Most browsers send the prefered language to servers when they access sites. This can be used to select the appropriate content, using Apache’s mod_negotiation.
Sample .htaccess file
Options +MultiViews
LanguagePriority fr en
AddLanguage en .en
AddLanguage fr .fr
Files
$ more req*
::::::::::::::
request.html.en
::::::::::::::
Hello
::::::::::::::
request.html.fr
::::::::::::::
Bon Jour
If no preference is given, the page will display Bon Jour, otherwise, English readers will get Hello, and French will receive Bon Jour.
Print article | This entry was posted by elvis on 04/15/09 at 11:05:41 pm . Follow any responses to this post through RSS 2.0. |