The t ViewHelper is used for loading and fetching of translation strings.
→ Since BIGACE 3.0
The $key defines the name of the translation.
The $default string to return if $key could not be found. (Default: '' in which case '???'.$key.'???' will be returned)
The $name defines the filename to load.
The $locale in which the translation file is loaded.
This example shows to fetch a translated String with the key 'search'.
<?php echo $this->t('search'); ?>
This example shows to use a default string if the requested translation does not exist.
<?php echo $this->t('not-existing', 'i will be echoed!'); ?>
This example shows how to load a translation file.
<?php // loads the file 'bigace' in the current session language $this->t()->load('bigace'); // loads the file in english $this->t()->load('bigace', 'en'); ?>