[Solved]: anycontent.php and other languages... [Solved]: anycontent.php and other languages...
 

News:

cpg1.5.48 Security release - upgrade mandatory!
The Coppermine development team is releasing a security update for Coppermine in order to counter a recently discovered vulnerability. It is important that all users who run version cpg1.5.46 or older update to this latest version as soon as possible.
[more]

Main Menu

[Solved]: anycontent.php and other languages...

Started by LFox, April 17, 2008, 11:25:56 PM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

LFox

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)

Stramm

switch($USER['lang']){
case "russian":
echo "russian";
break;
case "serbian":
echo "serbian";
break;
default:
echo "default... eg. english";
} // switch

LFox

thanks!) and can you say where in the anycontent I must put it?
And how add text from anycontent to russian.php etc.?

François Keller

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...
Avez vous lu la DOC ? la FAQ ? et cherché sur le forum avant de poster ?
Did you read the DOC ? the FAQ ? and search the board before posting ?
Mon Blog

LFox

ooh, I don't understood then)))
If so, That's GREAT!!! Thank you once again Stramm!!!
And thank you François for explaining!)

LFox

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?

Stramm

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;

LFox