コード例 #1
0
ファイル: I18N.php プロジェクト: filsh/yii2-platform
 public function init()
 {
     parent::init();
     if (!isset($this->translations['platform']) && !isset($this->translations['platform*'])) {
         $this->translations['platform'] = ['class' => 'yii\\i18n\\GettextMessageSource', 'sourceLanguage' => P::$app->sourceLanguage, 'basePath' => '@platform/messages'];
     }
     if (!isset($this->translations['db']) && !isset($this->translations['db*'])) {
         $this->translations['db'] = ['class' => 'yii\\i18n\\DbMessageSource', 'sourceLanguage' => P::$app->sourceLanguage, 'sourceMessageTable' => models\MessageSource::tableName(), 'messageTable' => models\Message::tableName()];
     }
 }
コード例 #2
0
 public function down()
 {
     $this->dropTable(Message::tableName());
     $this->dropTable(MessageSource::tableName());
 }