Commit a08399bc by resurtm

Yii::t() minor fix.

parent b14bb52c
......@@ -606,7 +606,10 @@ class YiiBase
public static function t($category, $message, $params = array(), $language = null)
{
if (self::$app !== null) {
return self::$app->getI18N()->translate($category, $message, $params, $language);
if ($language === null) {
$language = self::$app->language;
}
return self::$app->getI18N()->translate($category, $message, $language);
} else {
return is_array($params) ? strtr($message, $params) : $message;
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment