Please help

PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!

Moderator: General Moderators

Post Reply
webdzine
Forum Newbie
Posts: 20
Joined: Wed Dec 08, 2010 12:40 am

Please help

Post by webdzine »

first off my site is in two languages.
so when i use <?php echo 'TEXT'; ?> it finds the define in for each language in its language folder.

im am trying something but its not working
please help/

Code: Select all

			<?php for($i=$start;$i<$start+$page_size;$i++){

				$row=$rows[$i];

				if($row==''){

					break;

				}

				$class=$class=='odd'?'even':'odd';

				$team_name=$row->challenge_teamname;

				$team_id=$row->challenge_teamid;

				$home=$teamid==$row->home_teamid?'Away':'Home';

			?>

			<tr class="<?php echo $class?> ">

				<td align="center"><? echo $row->date; ?></td>

				<td align="center"><?php echo $home?></td>

in $home=$teamid==$row->home_teamid?'Away':'Home';
i am trying to change "'Away':'Home'" to have away and home be an echo for those language files.
Is this possible?
User avatar
Christopher
Site Administrator
Posts: 13596
Joined: Wed Aug 25, 2004 7:54 pm
Location: New York, NY, US

Re: Please help

Post by Christopher »

You don't show how to lookup a value in the language file. It seems like you would search for the value of $home and then convert to the language as needed.
(#10850)
Post Reply