Applications split display out into templates, to seperate them from logic
- The <?= $var ?> construct can be used to echo out variables.
- Strings should be wrapped in <?= _("String") ?> so that they are passed through gettext.
- Always include as much context as possible in strings, so that translations can account for different contexts and meanings.
- You can combine sprintf() and gettext to put variables into strings:
<?= sprintf(_("A gaggle of %s"), $foo) ?>
|