diff --git a/framework/yii/YiiBase.php b/framework/yii/YiiBase.php index 4fe0e77..c8eaf7a 100644 --- a/framework/yii/YiiBase.php +++ b/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; }