zgkhoo Posted October 10, 2007 Share Posted October 10, 2007 how to design a multiple languages php site? eg i need to design a website with english n chinese language. which user can switch between this two language. need each language contains its own sources code(own website) or control it by the script inside php? anyone can lead me pls. thanks you very much.. Quote Link to comment https://forums.phpfreaks.com/topic/72581-how-to-design-a-multiple-languages-php-site/ Share on other sites More sharing options...
~n[EO]n~ Posted October 10, 2007 Share Posted October 10, 2007 Just make a file in language.php and include the file in php pages and in language.php <?php if($language="English") { ///////////////////////////For Home Page////////////////////////////////// /////////////////////////Menu//////////////////////////////// $menu1="Home"; $menu2="Assembly stations"; $menu3="Terms"; $menu4="Order tracking"; $menu5="My account"; // your other stuffs... } if($language="Chinese") { // write the translated version here... } ?> If you are saving the contents in DB then you can one add field for language i.e. EN or CH so while fetching data you can check in where clause like where LANG='EN' ... I am doing the same thing for my site... it is working till now Good Luck... Quote Link to comment https://forums.phpfreaks.com/topic/72581-how-to-design-a-multiple-languages-php-site/#findComment-366023 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.