Closed AndreSilva1993 closed 9 years ago
Hi!
The problem is probably that the path of the language file is wrong or missing.
'tmpDir' => '@runtime', // Writable directory for the client-side temporary language files.
// IMPORTANT: must be identical for all applications (the AssetsManager serves the JavaScript files containing language elements from this directory).
You have to change the value of the tmpDir, be aware it has to point to a writeable directory, and all the applications should be able to reach it.
examples:
advanced version:
'tmpDir' => '@backend/runtime',
or
'tmpDir' => '@frontend/runtime',
Best regards, Lajax
Good morning. Currently I'm using your translate manager in order to make the whole translation process a whole lot easier. It works beautifully but I have a single question. Just like your README said, I created a GlobalController so that every single one would extend this one. This Global is used to register the javascript files needed to support muli-language support on client-side.
My question is how am I supposed to register the javascript file containing the translations? When I use the above controller, the only javascript files registered are the following:
I'm registering the one containing the translations like this:
this->registerJsFile('/yii2shop/frontend/TranslateJS/translate/' . \Yii::$app->language . '.js');
Am I doing something wrong or is this the way to register the file? In the README it says that the assetsmanager serves the Javascript files necessary files. The files mentioned are those two I mentioned above or is the one containing the translations included too?
Best Regards, André Silva