views:

65

answers:

3

i want to make my site available in several languages, but im not going to use user registration so how can i make a language system?

searched for a cookie language system tutorial but didnt found anything

if you have any other suggestion please share, and i cant use modrewrite

+2  A: 

You can find it in the request header if their browser/operating system tells you about their locale or you can geolocate the ip address. You should make it possible to manually select a locale for the user, because not everyone makes their locale available with their browser.

Paco
A: 

Sessions and user registration aren't the same thing - you can detect the user language and store it in a session variable without asking the user to register.

adam
A: 
$_SERVER['HTTP_ACCEPT_LANGUAGE']

You could use a php include like this: http://techpatterns.com/downloads/scripts/php_language_detection.txt or check out the neat qTranslate WordPress plugin for ideas: http://www.qianqin.de/qtranslate/

gabrielk