V
V
v3shin2017-04-13 13:28:48
Yii
v3shin, 2017-04-13 13:28:48

How to transfer localization files to widget folders?

Good day.
What is: a translation file in the messages folder

protected/messages/en/MyWidget/category.php

and call the translation function What you want: drag and drop all localization files into the corresponding widget folders so that the path to the files is
Yii::t('MyWidget/category', 'some phrase');
protected/components/MyWidget/messages/en/category.php

and challenge How to organize it? Thanks in advance.
Yii::t('MyWidget.category', 'some phrase');

Answer the question

In order to leave comments, you need to log in

1 answer(s)
M
Maxim Timofeev, 2017-04-13
@webinar

It's strange why you decided to put the translations in the components folder, but it's up to you. The location of translation files can be set in the application config.
www.yiiframework.com/doc/guide/1.1/en/basics.appli...
www.yiiframework.com/doc/guide/1.1/en/basics.appli...

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question