Skip to content
This repository has been archived by the owner on Jul 27, 2023. It is now read-only.

Commit

Permalink
Merge pull request #13 from m8rge/patch-1
Browse files Browse the repository at this point in the history
add translations on init
  • Loading branch information
tonydspaniard committed Jun 30, 2017
2 parents 3ce9607 + 07c7630 commit 9cb47fb
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions src/FileInput.php
Original file line number Diff line number Diff line change
Expand Up @@ -85,6 +85,12 @@ public function init()
throw new InvalidConfigException('"FileInput::$customView" must be set if "FileInput::STYLE_CUSTOM" is used');
}

\Yii::$app->i18n->translations['file-input*'] = [
'class' => 'yii\i18n\PhpMessageSource',
'basePath' => '@vendor/2amigos/yii2-file-input-widget/src/messages/',
'sourceLanguage' => 'en-US',
];

parent::init();
}

Expand Down

0 comments on commit 9cb47fb

Please sign in to comment.