Browse Source

Merge branch 'master' of github.com:yiisoft/yii2

tags/2.0.0-beta
Qiang Xue 12 years ago
parent
commit
c0ab801fce
  1. 5
      framework/yii/YiiBase.php

5
framework/yii/YiiBase.php

@ -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;
}

Loading…
Cancel
Save