¿Eres nuevo? ¡Lee el FAQ y ponte al día!
2k visitas

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
  1. $this->getContext()->getI18N()->__($text, $args, 'messages');
  2.  

­

Etiquetas: PHP symfony i18n

Insertar: