

<?php 
echo "{@url_for controller:page}";
?>

-----------------------------------

<?php  
echo "{@url_for controller:page}";
?>


===================================

<h1>_{Ain't easy to translate text?}</h1>

-----------------------------------

<h1><?php echo $text_helper->translate('Ain\'t easy to translate text?', array()); ?></h1>



===================================

_{<p>It's really simple even to add 
<a href='http://google.co.uk'>Localized links</a>
</p>}

-----------------------------------

<?php echo $text_helper->translate('<p>It\'s really simple even to add 
<a href=\'http://google.co.uk\'>Localized links</a>
</p>', array()); ?>



===================================

_{I need to print \{something_inside_curly_brackets\}. _\{Maybe a multilingual text example\} }

-----------------------------------

<?php echo $text_helper->translate('I need to print {something_inside_curly_brackets}. _{Maybe a multilingual text example} ', array()); ?>



===================================

This \{should} \{be?} \{ignored\}. _\{Multilingual block} _\{escaped using\} \{?backslashes} \{end}

-----------------------------------

This {should} {be?} {ignored}. _{Multilingual block} _{escaped using} {?backslashes} {end}


===================================

{comment}

-----------------------------------

<?php echo $comment; ?>



===================================

{post.Comments}

-----------------------------------

<?php echo $post->Comments; ?>



===================================

{post.Comments.latest}

-----------------------------------

<?php echo $post->Comments->latest; ?>



===================================

{people-members}

-----------------------------------

<?php echo $people['members']; ?>



===================================

{people-0-member}

-----------------------------------

<?php echo $people[0]['member']; ?>



===================================

{people.members-0.name}

-----------------------------------

<?php echo $people->members[0]->name; ?>



===================================

{posts-latest.created_at}

-----------------------------------

<?php echo $posts['latest']->created_at; ?>



===================================

<hidden>
<?php Running secret stuff ?>
</hidden>

-----------------------------------





===================================

{posts-cc._number}

-----------------------------------


{posts-cc._number}



===================================

{_post.comment}

-----------------------------------


<?php echo empty($post->comment) || is_object($post->comment) ? '' : $text_helper->translate($post->comment); ?>



===================================

{comment?}

-----------------------------------

<?php echo empty($comment) ? '' : $comment; ?>




===================================

{comment._pass?}

-----------------------------------

{comment._pass?}




===================================

{?comment}Hello world{end}

-----------------------------------

<?php if(!empty($comment)) { ?>Hello world<?php } ?>


===================================

{!Page.id}style="display:none;"{end}

-----------------------------------

<?php if(empty($Page->id)) { ?>style="display:none;"<?php } ?>



===================================

{?comment.author}
    {comment.author}
{end}

-----------------------------------

<?php if(!empty($comment->author)) { ?>
    <?php echo $comment->author; ?>
<?php } ?>



===================================

{?comment.author}
    {comment.author}
    {?comment.author-name}
        {comment.author-name}
    {end}
{end}

-----------------------------------

<?php if(!empty($comment->author)) { ?>
    <?php echo $comment->author; ?>
    <?php if(!empty($comment->author['name'])) { ?>
        <?php echo $comment->author['name']; ?>
    <?php } ?>
<?php } ?>



===================================

{?comment.author}
    {comment.author}
{end}
{?comment.author-name}
    {comment.author-name}
{end}

-----------------------------------


<?php if(!empty($comment->author)) { ?>
    <?php echo $comment->author; ?>
<?php } ?>
<?php if(!empty($comment->author['name'])) { ?>
    <?php echo $comment->author['name']; ?>
<?php } ?>



===================================

{?comment.author}
    {comment.author}
{else}
    Anonymous coward
{end}

-----------------------------------


<?php if(!empty($comment->author)) { ?>
    <?php echo $comment->author; ?>
<?php } else { ?>
    Anonymous coward
<?php } ?>



===================================

{loop posts}
<q> {post.comment?} {post.author?} </q>
{end}

-----------------------------------


<?php 
 empty($posts) ? null : $post_loop_counter = 0;
 empty($posts) ? null : $posts_available = count($posts);
 if(!empty($posts))
     foreach ($posts as $post_loop_key=>$post){
         $post_loop_counter++;
         $post_is_first = $post_loop_counter === 1;
         $post_is_last = $post_loop_counter === $posts_available;
         $post_odd_position = $post_loop_counter%2;
?>
<q> <?php echo empty($post->comment) ? '' : $post->comment; ?> <?php echo empty($post->author) ? '' : $post->author; ?> </q>
<?php } ?>



===================================

{loop posts?}
<q> {post.comment?} {post.author?} </q>
{end}

-----------------------------------


<?php 
 empty($posts) ? null : $post_loop_counter = 0;
 empty($posts) ? null : $posts_available = count($posts);
 if(!empty($posts))
     foreach ($posts as $post_loop_key=>$post){
         $post_loop_counter++;
         $post_is_first = $post_loop_counter === 1;
         $post_is_last = $post_loop_counter === $posts_available;
         $post_odd_position = $post_loop_counter%2;
?>
<q> <?php echo empty($post->comment) ? '' : $post->comment; ?> <?php echo empty($post->author) ? '' : $post->author; ?> </q>
<?php } ?>


===================================

{?company}{loop people}{end}{end}

-----------------------------------

<?php if(!empty($company)) { ?><?php 
 empty($people) ? null : $person_loop_counter = 0;
 empty($people) ? null : $people_available = count($people);
 if(!empty($people))
     foreach ($people as $person_loop_key=>$person){
         $person_loop_counter++;
         $person_is_first = $person_loop_counter === 1;
         $person_is_last = $person_loop_counter === $people_available;
         $person_odd_position = $person_loop_counter%2;
?><?php } ?><?php } ?>


===================================

<h1>_{You can use %variables using the %sintags.variable-naming-way}</h1>

-----------------------------------

<h1><?php echo $text_helper->translate('You can use %variables using the %sintags.variable-naming-way', array('%variables' => @$variables, '%sintags.variable-naming-way' => @$sintags->variable['naming']['way'])); ?></h1>


===================================

<h1>_{Mixing %variables and \%escaped_variables}</h1>

-----------------------------------

<h1><?php echo $text_helper->translate('Mixing %variables and %escaped_variables', array('%variables' => @$variables)); ?></h1>


===================================

<?=PHP_CONSTANTS?>

-----------------------------------

<?php echo PHP_CONSTANTS?>



===================================

<?xml version="1.0" encoding="UTF-8" ?>

-----------------------------------

<?php echo '<?xml'; ?> version="1.0" encoding="UTF-8" ?>


===================================

{loop items-directories}

{end}

-----------------------------------

<?php 
 empty($items['directories']) ? null : $directory_loop_counter = 0;
 empty($items['directories']) ? null : $directories_available = count($items['directories']);
 if(!empty($items['directories']))
     foreach ($items['directories'] as $directory_loop_key=>$directory){
         $directory_loop_counter++;
         $directory_is_first = $directory_loop_counter === 1;
         $directory_is_last = $directory_loop_counter === $directories_available;
         $directory_odd_position = $directory_loop_counter%2;
?>

<?php } ?>

===================================

{conflict_key}\_{conflicted_file_loop_key}

-----------------------------------

<?php echo $conflict_key; ?>_<?php echo $conflicted_file_loop_key; ?>

===================================

{loop Post.author.friends}

{end}

-----------------------------------

<?php 
 empty($Post->author->friends) ? null : $friend_loop_counter = 0;
 empty($Post->author->friends) ? null : $friends_available = count($Post->author->friends);
 if(!empty($Post->author->friends))
     foreach ($Post->author->friends as $friend_loop_key=>$friend){
         $friend_loop_counter++;
         $friend_is_first = $friend_loop_counter === 1;
         $friend_is_last = $friend_loop_counter === $friends_available;
         $friend_odd_position = $friend_loop_counter%2;
?>

<?php } ?>

===================================

{loop Post.versions as Post}

{end}

-----------------------------------

<?php 
 empty($Post->versions) ? null : $Post_loop_counter = 0;
 empty($Post->versions) ? null : $Posts_available = count($Post->versions);
 if(!empty($Post->versions))
     foreach ($Post->versions as $Post_loop_key=>$Post){
         $Post_loop_counter++;
         $Post_is_first = $Post_loop_counter === 1;
         $Post_is_last = $Post_loop_counter === $Posts_available;
         $Post_odd_position = $Post_loop_counter%2;
?>

<?php } ?>

===================================


{\comment}

-----------------------------------

<?php echo $text_helper->h($comment); ?>


===================================


{\comment.one}

-----------------------------------

<?php echo $text_helper->h($comment->one); ?>

===================================


{\comment-two}

-----------------------------------

<?php echo $text_helper->h($comment['two']); ?>



===================================
 
 
_{Signed up using %params-email address}

-----------------------------------

<?php echo $text_helper->translate('Signed up using %params-email address', array('%params-email' => $text_helper->h(@$params['email']))); ?>


===================================


_{Signed up using %\email address}

-----------------------------------

<?php echo $text_helper->translate('Signed up using %\email address', array('%\email' => $text_helper->h(@$email))); ?>




