Re: Multi language support

From: Date: Wed, 24 Apr 2002 11:42:33 +0000
Subject: Re: Multi language support
References: 1  Groups: php.general 
Request: Send a blank email to php-general+get-94352@lists.php.net to get a copy of this message
At 24.04.2002 15:29, you wrote:
Hi all, What needs to be done for multi language support in PHP. I am using redhat linux & new to HTML programming. I want to know the mechanism to make the output available in different languages. Thanks in advance for any help!!!! --Shailendra S. Mehta Senior Engineer (Design & Development), TATA Infotech Ltd, Mapusa-GOA.
If you want to do this, one suggestions is: Have a db, where you store the text for each ouput, button, etc... under a number (in mysql autonum is your friend) copy this db, changing the textcontent in every desired language, to a new name f.e db_english, db_french.... now make an object, or function which requests the content of number x and disply it where it´s needed. like <? echo transtext("number","$language"); ?> As a hint, when incrementing the number of the text, add 10, as later you´ll need another text, and this will be put at the end of db. When making the site-scripts, don´t forget to have the original text nearby as comment. Otherwise you get mad, when you touch the code a second time. HTH Oliver

« previous php.general (#94352) next »