2k views
Calling the symfony i18n function __() in an action
Although the __() function of symfony is meant to be called in the templates, there are some times in which you may need to call that function in an action. This is the easiest way to achieve that:
PHP
- $this->getContext()->getI18N()->__($text, $args, 'messages');
Submitted by miguelSantirso over 2 years ago — last modified less than a minute ago