t() public static method

Translates any string. Accepts args
public static t ( string $msg, array | null $args = [] ) : string
$msg string Message to be translated
$args array | null Arguments
return string $translatedMsg Translated text
Example #1
0
File: Error.php Project: DbyD/cruk
 /**
  * Constructor
  *
  * @param string  $msg  Describes the error.
  * @param integer $code The code error (defined in the error class).
  * @param array   $args Arguments used in the message that describes the error.
  */
 public function __construct($msg, $code = 0, $args = null)
 {
     assert('is_string($msg)');
     assert('is_int($code)');
     $message = OneLogin_Saml2_Utils::t($msg, $args);
     parent::__construct($message, $code);
 }