System:Template:text

From Aspen Documentation

Returns the current language value for a user-defined translation key.

Since 1.0

Contents

Arguments

string text (string $key = false)

key
The language array key name for the specific text value you need.

Returns

Returns a string.

Notes

  • If the key is invalid an empty string will be returned.
  • This function does not encode any html entities, as it's assumed that they will be pre-encoded in the language files.

Examples

In the module language file for en_US we have a language item defined:

$lang['admin']['title'] = 'Welcome!';

In the admin application template we call this language key using our text function:

print $this->text('title');