The servers at NetCulture can automatically detect which language the browser program would like to download pages and present them to the user.
Each time a user asks for a page it also sends with it a preferred language. This means that if your site uses multiple languages then the presentation of different home page can be made dependant on the user.
This option is not configured as default but can easily be added to your site.
Normally, the first page of your site would be named 'index.html' or 'index.htm'. When a user simply types the domain name in their browser, the 'index' page is presented. To enable the automatic loading of language specific pages you need to do the following :
Create a file in the directory where the 'index' page resides called '.htaccess'. The content of this file should be as follows :
This tells the server to enable the language detection module for that directory.
Create 'index' files for each different language. The file names are important as they are searched for by the server. The names should be in the form :
index.html.fr - The French 'index' page
index.html.de - The German 'index' page
index.html.en - The English 'index' page
Make sure that you do not have any other files called 'index…..' as this will override the automatic selection.
Now when a user connects with a French browser the 'index.html.fr' is presented, a German browser will receive the 'index.html.de' page etc.
It is also possible for a user to manually configure their browser to 'prefer' a different language, for example an English version of Netscape to ask for French documents.
This functionality does not operate with secure servers (SSL) using 'https'.
- Always ensure that you have a page 'index.html.en'. Many users may have English browsers and this should be treated as the default page.
- Make sure the file names are correct as shown above.
- Check that the file '.htaccess' is in the correct directory where your index pages are located.