message() public method

If there is no defined message for $id in the current language the function looks for an alterantive in English. If that also fails an error message is returned. If $id is NULL or '' the empty string will be returned.
public message ( string $id ) : string
$id string message id
return string localized message string
Ejemplo n.º 1
0
 function testArrayGet()
 {
     global $langde;
     $l10n = new L10n('de');
     $this->assertEqual($langde['admin'], $l10n->message('admin'));
     $this->assertEqual($langde['admin'], $l10n['admin']);
     $this->assertEqual('Undefined message!', $l10n['bla bla']);
 }