hi guys
i'm going to share multi language option in PHP
<*? $_REQUEST["lang"]==1?include('en.php'):include('fr.php'); ?>
<**a href="langauge.php?lang=1"*>English<*/a*><*a href="langauge.php?lang=2"*>French<*/a*>
<*table width="100%" border="1" cellspacing="0" cellpadding="0"**>
<*tr*>
<*th scope="col"*><*?php echo _CMN_NAME; ?*><*/th*>
<*/tr*>
<*/table*>
use as index.php
and make two files to define macro for languages
en.php
fr.php
en.php
<*?PHP DEFINE('_CMN_NAME','Name'); ?>
fr.php
<*?PHP DEFINE('_CMN_NAME','Nom'); ?>
Note: Guys please remove Astrix *
send some sample
ReplyDelete