FRIHOST FORUMS SEARCH FAQ TOS BLOGS COMPETITIONS
You are invited to Log in or Register a free Frihost Account!


Multiple Language - php





AOP Web Development
Hello i just like to ask regarding on how to do a multiple language in your website.. for example

if i want my website can be readable at least 3 language like arabic,french and english.. can you give me any idea how to do it? thanks a lot! Laughing Laughing Laughing
qscomputing
Translate all your pages to the foreign languages you want. Smile

Once you've done that, the technical part is trivial. Just store a session variable with the user's language, and then pull in a template in the appropriate language at the appropriate time in the script.
AOP Web Development
Not all page totally what i mean is i want my site to be translated into 3 language for example french | arabic | english but i don't have any idea on how to do it..
powers1983
You mean you don't speak the languages and so can't translate?
Or you don't know how to get the page to display a different version?

If you can't translate then Google has a translation page so you can get all your pages done there but might be very time-consuming and probably will not give you a very good translation so you might want to find real translators who will give you decent results.

You could just have 3 whole versions of your site and a little flag somewhere that you press and you go to the specific language.
That is the simplest way I'd have thought.

If you want to go for some dynamic stuff and use a session variable as suggested (maybe someone is surfing in English but needs to see a specific page in French or something) then you could store all your content and menu's etc in a database and when you read in the stored language setting just display the correct language:
Code:

$result=mysql_query("SELECT food_review FROM content_table WHERE language='$current_language';");
   // display it


Hope that helps.

David.
Related topics
php variables
How To : Secure Your PHP Website
Windows Vista Official Thread
[Official] Best PHP Editor
Help with PhpBB
ASP
PHP VS ASP
what is ASP?
Esay Php, Freeware
Cookies
Delphi IDE by CodeGear for PHP coding !!!
Passing Sessions
php vrs ajax
i want to dezign a website using php
Reply to topic    Frihost Forum Index -> Scripting -> Php and MySQL

FRIHOST HOME | FAQ | TOS | ABOUT US | CONTACT US | SITE MAP
© 2005-2011 Frihost, forums powered by phpBB.