'i18n translations not working in Controller
Why would i18n translations work in a view, but not in AppController?
Doesn't work - In AppController:
class AppController extends Controller
{
public function initialize()
{
parent::initialize();
debug(__('My English Text'));
...
}
}
Works - In my view:
<p><?= __('My English Text') ?></p>
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
| Solution | Source |
|---|
