I know theres a similar post on this, but my question is, how do I make the file (in php) that has all the variables like SITE_TITLE, SITE_SLOGAN, etc. and then has the translations? Are there any tutorials anyone knows on this? I googled it, but i guess im not getting the right keywords. This is for my site http://psalmi.com its pretty simple. I just need the categories, search, and titles translated to russian. please keep in mind, im not a genius at php/mysql, so a tutorial would be very handy. Thanks
How about downloading a php project such as Zen Cart and seeing how they do it - you'll learn a ton by doing that. One idea would be to have a seperate file for each language which could included depending upon a $_GET variable. Brew
Easy to do, I have this system on http://www.clan-cms.co.uk Make a definitions file like, eng.php Then all you need to is define each phrase in this file and include it on all of your pages. eng.php define('WELCOME','Welcome to the website!'); deinfe('TODAY_IS', 'Today is'); PHP: Then in your actual webpage, you would display these like, <p><?php echo WELCOME; ?></p> <p><?php echo TODAY; ?></p> So now you could make translations for each definition and save them as say fra.php dan.php etc Then in your config or whatever file you include on all pages, you can have a get variabl for the language, when someone sends a lang request you can assign the language setting to a session. From the session you include the lang like, if($_GET['lang']) { $_SESSION['lang'] = $_GET['lang']; require("lang/".$_SESSION['lang'].".php"); }else{ require("lang/default_one.php"); } PHP: To let people get the languages you would need to use a link or drop down linked like, page.php?lang=the_lang_filename (Do not add the .php ext) Hope it helps, this is just a basic guide but easily to implement.