Browse Source

Renamed i18n to be all lowecase when accessed as a property

tags/2.0.0-beta
Alexander Makarov 11 years ago
parent
commit
618f981112
  1. 2
      framework/yii/BaseYii.php
  2. 2
      framework/yii/base/Application.php

2
framework/yii/BaseYii.php

@ -541,7 +541,7 @@ class BaseYii
public static function t($category, $message, $params = array(), $language = null)
{
if (self::$app !== null) {
return self::$app->getI18N()->translate($category, $message, $params, $language ?: self::$app->language);
return self::$app->getI18n()->translate($category, $message, $params, $language ?: self::$app->language);
} else {
return is_array($params) ? strtr($message, $params) : $message;
}

2
framework/yii/base/Application.php

@ -383,7 +383,7 @@ abstract class Application extends Module
* Returns the internationalization (i18n) component
* @return \yii\i18n\I18N the internationalization component
*/
public function getI18N()
public function getI18n()
{
return $this->getComponent('i18n');
}

Loading…
Cancel
Save