There are differents methods but basicly you have let's say (X) folders where X is the number of languages: In my example I have 2 languages : french and english these folders will contain the files an images for each language (the same file names but different content). Example files: ./languages/english/main.php // $_NAVIGATION_=array( 'site_name'=>'Free classifieds', 'home'=>'Home', 'country'=>'Country', 'time_format'=>'%m/%d/%Y', 'read_more'=>'... read more', 'footer'=>'©2007 example.com - All rughts bla bla', ); PHP: ./languages/french/main.php // $_NAVIGATION_=array( 'site_name'=>'Annonces gratuites', 'home'=>'Accueil', 'country'=>'Pays', 'time_format'=>'%d/%m/%Y', 'read_more'=>'... poursuivre la lecture', 'footer'=>'©2007 example.com - Tous droits réservés', ); PHP: On your script you'll include the language file depending on the user choice/ stored cooky ... index.php $available_languages = array ('english','french'); $default_language = 'english'; $chosen_language = $default_language; if(in_array(cookie['language'],$available_languages)){ $chosen_language = cookie['language']; } //Save the value of the chosen language on a cookie setcookie('language', $chosen_language, time()+60*60*24*30); //Now let's test it include ("./languages/$chosen_language/main.php"); echo $_NAVIGATION_['site_name']; PHP: This example will show the site name depending on the chosen language. Of course you'll have to make a script that allows the user to change the language. You may also set the default language (when no coockie exists) to be the user's navigator language. (I'll show you if you want... very easy)
That's optimistic... you expect to be able to create a multi language web site without doing any translating yourself. I guess you could try online translators such as Google language tools or pay someone to do it for you, or maybe allowing readers to translate and post on their own blog with a backlink.
I can translate to french & arabic, I'm an experienced translator as well. You'll have to store the language on a database as well.. That how I did it on my arabix/english classifieds website. This is how it works : if someone ads a classified ad from the arabic form, the ad will be stored on the DB with a value of "ar" in the language column. and if someone else is viewing the arabic ads, he will only see the ads that have "ar" as a language on the database (this is done with sql queris). ...
I learned while working with CMS/forum like phpBB, VB, Joomla... Do a google search http://www.google.com/search?hl=en&q=php+multilanguage+site+tutorial&btnG=Search
this seems to be the perfect way of coding multi language site ... can you please show a complete tuts for that ... or point to one .. if there is any Thanks alot