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