How to add anycontent.php text to russian.php and english.php? I need to show anycontent.php on different languages, when user choose their language, anycontent.php will translate)
switch($USER['lang']){
case "russian":
echo "russian";
break;
case "serbian":
echo "serbian";
break;
default:
echo "default... eg. english";
} // switch
thanks!) and can you say where in the anycontent I must put it?
And how add text from anycontent to russian.php etc.?
you d'ont have to put text in the lang file, in stramm's code, you have to replace "russian" for exemple with the russian text you will show...
ooh, I don't understood then)))
If so, That's GREAT!!! Thank you once again Stramm!!!
And thank you François for explaining!)
amm... I have some problems with it...
When I put this code to anycontent with simple texts, example:
switch($USER['lang']){
case "russian":
echo "simple text on russian...";
break;
case "serbian":
echo "serbian";
break;
default:
echo "default... eg. english";
} // switch
it works well. But when I put there table, it get me an error, example:
switch($USER['lang']){
case "russian":
echo "<div align="center">
<table border="1" width="500" id="table2" bordercolorlight="#ffffff">
<tr>
<td width="100">
<p><ul>
<li><a href="http://www.example.com">Title 1</a></li>
<li><a href="http://www.example.com">Title 2</a></li>
<li><a href="http://www.example.com">Title 3</a></li>
</ul></p></td></tr>
</table></div>";
break;
case "serbian":
echo "serbian";
break;
default:
echo "default... eg. english";
} // switch
Is it means that I can't put there any tables, only text, or I do something wrong?
read more about the php echo function here
http://php.net/manual/en/function.echo.php
probably most useful for you would be
echo <<<EOT
here comes the text you want to output. It can be table definition or whatever
<table>
<tr>
<td>
more yadda here
</td>
</tr>
</table>
EOT;
Thank you very much!!! Work's great!)