yiisoft / yii2-gii

Yii 2 Gii Extension
http://www.yiiframework.com
BSD 3-Clause "New" or "Revised" License
203 stars 192 forks source link

[Enh] configurable translation function when enable i18n select #112

Open lichunqiang opened 8 years ago

lichunqiang commented 8 years ago

Some times will using other function to instead of Yii::t.

SilverFire commented 8 years ago

Could you elaborate your idea exactly, please?

lichunqiang commented 8 years ago

For example, when using gii to generate form, (Form Generator)

We can check Enable I18N to enable string translate, form generation for example:

<?= Html::submitButton(Yii::t('app', 'Submit'), ['class' => 'btn btn-primary']) ?> 

gii used Yii::t as default translator.

If can configurate the translator will be better. Of cause Yii::t is default like Message Category is app