[symfony-users] Re: I18n forms - not everything translated

2009-03-09 Thread Tomasz Ignatiuk
It works and it is great. Thank you :)

2009/3/6 Shinkan shin...@gmail.com


 You have to use the helper trough the sfContext object.

 From everywhere :

 sfContext::getInstance()-getI18N()-__('The flash message');

 So from an action :

 $this-getUser()-setFlash('flash', sfContext::getInstance()-getI18N
 ()-__('The flash message') );

 To minimify, you can put a protected function in your action, or
 better, in an external tools class.
 Something like :

 public static function i18n( $message ) {
  return sfContext::getInstance()-getI18N()-__( $message );
 }

 On 6 mar, 15:23, Tomasz Ignatiuk tomek.ignat...@gmail.com wrote:
  Does anyone know how to translate setFlash notices and erros? A put
  translation in my message.pl.xml file but it doesn't work
 


--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
symfony users group.
To post to this group, send email to symfony-users@googlegroups.com
To unsubscribe from this group, send email to 
symfony-users+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/symfony-users?hl=en
-~--~~~~--~~--~--~---



[symfony-users] Re: I18n forms - not everything translated

2009-03-06 Thread Tomasz Ignatiuk

I see that mostly it was a problem of session. Sorry to bother
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
symfony users group.
To post to this group, send email to symfony-users@googlegroups.com
To unsubscribe from this group, send email to 
symfony-users+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/symfony-users?hl=en
-~--~~~~--~~--~--~---



[symfony-users] Re: I18n forms - not everything translated

2009-03-06 Thread Tomasz Ignatiuk

Does anyone know how to translate setFlash notices and erros? A put
translation in my message.pl.xml file but it doesn't work
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
symfony users group.
To post to this group, send email to symfony-users@googlegroups.com
To unsubscribe from this group, send email to 
symfony-users+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/symfony-users?hl=en
-~--~~~~--~~--~--~---



[symfony-users] Re: I18n forms - not everything translated

2009-03-06 Thread Shinkan

You have to use the helper trough the sfContext object.

From everywhere :

sfContext::getInstance()-getI18N()-__('The flash message');

So from an action :

$this-getUser()-setFlash('flash', sfContext::getInstance()-getI18N
()-__('The flash message') );

To minimify, you can put a protected function in your action, or
better, in an external tools class.
Something like :

public static function i18n( $message ) {
  return sfContext::getInstance()-getI18N()-__( $message );
}

On 6 mar, 15:23, Tomasz Ignatiuk tomek.ignat...@gmail.com wrote:
 Does anyone know how to translate setFlash notices and erros? A put
 translation in my message.pl.xml file but it doesn't work
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
symfony users group.
To post to this group, send email to symfony-users@googlegroups.com
To unsubscribe from this group, send email to 
symfony-users+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/symfony-users?hl=en
-~--~~~~--~~--~--~---