Jump to content

Recommended Posts

Posted

Hello,

Im having some problem translating some words in if/else statement. 

my code:

	<?php if ($single->fajli->url){
		echo "
        <span <span class='big'>>Velikost: <?= $out = __('Size:'); ?></span><br>
		<span>{$single->fajli->filesizeStr}</span>";
		}
		else{
		echo "<span class='big'><?= $out = __('link:'); ?></span>";
		}
	?>

but expl.: <?= $out = __('Size:'); ?> is not working. It wont show up in frontend nor in my backend, what am I doing wrong?

My php is not that good ... I also looked all over the forum but no luck.

Thank you

R

Posted

Hi,

try this:

<?php if ($single->fajli->url): ?>
	
    <span <span class='big'>>Velikost: <?= __('Size:'); ?></span><br>
    <span>{$single->fajli->filesizeStr}</span>

<?php else: ?>

    <span class='big'><?=  __('link:'); ?></span>
		
<?php endif; ?>
  • Like 4
Posted

Hello

yes ... ? It works great now. This way I can put double quotes back, so my code is back to original html.

Thank you very much ?

R

 

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...