Entry
How can I use mod_rewrite to tell between users with different languages of their browsers? I try to use %{HTTP_ACCEPT_LANGAUGE} but have no luck...
Aug 1st, 2004 09:20
Cinley Rodick, Bruce Christensen, Martin Woods, http://builder.cnet.com/webbuilding/pages/Servers/Apache/ss02e.html http://www.generalforums.com . http://www.generalforums.com/yellow/
Serving multiple languages simultaneously is a topic discussed in some
detail at:
http://builder.cnet.com/webbuilding/pages/Servers/Apache/ss02e.html
The synopsis is that you need to add an "Options MultiViews" line to the
root <Directory> section in your httpd.conf file. You'll also need to
add the following lines:
AddLanguage en .en
AddLanguage fr .fr
AddLanguage jp .jp
(etc...)
LanguagePriority en fr jp
The AddLanguage lines associate certain file extensions (.en, .fr, ...)
with certain languages (English (en), French (fr), ...). This means that
you would multiple versions of your files: one for French called
file.html.fr, one for English called file.html.en, etc.
The LanguagePriority directive tells Apache which language to use when
the user hasn't expressed a preference.