You can load helper from your action, but i'm not sure this is the
cleanest way to do it :
sfLoader::loadHelpers('I18N');
Then you're able to __('Hello !')
Or you can access directly this way :
$this->getContext()->getI18N()->__('Hello !')
On 25 mar, 09:46, ebreeze <[EMAIL PROTECTED]> wrote:
> Hi,
>
> Can anybody tell me if there is an equivalent of the __() I18NHelper
> function to be used in actions?
>
> I need something like this:
> $this->getI18NTranslatedString('Hello!');
> to be used in the actions to display culture specific translations,
> e.g. 'Salut!' in French (where 'Salut!' is the translation provided
> in:
> apps/frontend/i18n/messages.fr.xml
> for
> <source>Hello!</source>).
>
> Any work around?
>
> Many thanks:
>
> Milena
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"symfony developers" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at
http://groups.google.com/group/symfony-devs?hl=en
-~----------~----~----~----~------~----~------~--~---