Skip to content

Commit 3501da8

Browse files
authored
Merge pull request #8 from softbread/master
#7 add i18n messages
2 parents 7f3923b + 1244e8c commit 3501da8

File tree

2 files changed

+17
-0
lines changed

2 files changed

+17
-0
lines changed

src/Module.php

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,4 +16,16 @@ class Module extends \yii\base\Module
1616
* @var string
1717
*/
1818
public $layout = 'main';
19+
20+
public function init()
21+
{
22+
parent::init();
23+
if (!isset(Yii::$app->i18n->translations['workflow'])) {
24+
Yii::$app->i18n->translations['workflow'] = [
25+
'class' => 'yii\i18n\PhpMessageSource',
26+
'sourceLanguage' => 'en-US',
27+
'basePath' => '@cornernote/workflow/manager/messages'
28+
];
29+
}
30+
}
1931
}

src/messages/en-US/workflow.php

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
<?php
2+
3+
return [
4+
'Workflow' => 'Workflow',
5+
];

0 commit comments

Comments
 (0)