A
A
AlexKuznec2016-10-19 06:50:14
Yii
AlexKuznec, 2016-10-19 06:50:14

How to use yii message console command?

I want to make a standard internationalization of the application, with the storage of translations in php files. I did it according to the instructions, but it confuses the need to write the path to the config every time it starts.
In the source code, the action declaration looks like this: But when run without a parameter, it gives an error, even if the configuration file was created by the command
public function actionExtract($configFile = null)

yii message/config-template common/config/message.php

If you explicitly set the path to the config, then everything works:
yii message common/config/message.php
But it seems to me that the config should still be taken automatically, moreover, it is allowed to run the command without a parameter.
Tell me, is it possible to somehow configure everything so that the config does not have to be specified every time?

Answer the question

In order to leave comments, you need to log in

1 answer(s)
M
Maxim Timofeev, 2016-10-20
@webinar

It is triggered by its location, how do you override it? Just move message.php to the root

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question