QuestionI don't understand how language variables work.

If you will find a grammar error on this page, please select it with your mouse and press Ctrl+EnterThank you.

Help me, please.
For example, I have this code in the template header.tpl:

<div id="welcome">
  <?php if (!$logged) { ?>
    <?php echo $text_welcome; ?>
  <?php } else { ?>
    <?php echo $text_logged; ?>
  <?php } ?>

I know that language variables are in the language file:

$_['text_welcome']        = '<a href="%s">Login</a> or <a href="%s">register</a>';

But I don't understand how '%s' becomes a link.



sv2109's picture
sv2109 wrote:

Language variable doesn't pass directly into template from the language file. The controller does it. You need to open the header controller, find the text " text_welcome" and you will understand how it works.

26.10.2014 10:26

Add new comment

Spam protection
Enter the characters shown in the image.
You are reporting a typo in the following text:
Simply click the "Send typo report" button to complete the report. You can also include a comment.