|
|
langredir 1.1
Redirect visitors based on their browser's language
|
langredir About
|
Configuration To use langredir, you need to create a text file containing the redirections. You can choose its name freely, although I like to use .languages. The file format is very easy. A sample file could look like this: ----.languages---- de http://www.mysite/german/ en http://www.mysite/english/ en-UK http://www.mysite/english/special_welcome_for_brits.html default http://www.mysite/german/ ----.languages---- The default entry will be used if neither of the languages the user's browser accepts appears in the config file. Also, there are two parameters you can change directly in the source code, in the file langredir.cgi. Look for a section called Configure the script here, shortly after the introductory copyright message. First, you can change the name of the file used for the redirections. You have to do this if you chose another name for your configuration file (i.e. not .languages) or if you store the file in another directory. The default is to use .languages. Second, you can change the default string used when the browser doesn't supply language data. This is per default set to en,de. |
|
Copyright © 1998 web42 - Christian Renz. Last changes: 11.07.2004. Visitors: 5775