[symfony-users] Re: I18N of sfWidgetFormChoice

2009-01-13 Thread Crafty_Shadow
I'm sorry, but you're a bit wrong here; it is not text to translate that goes as the second argument, but instead the translation function name if a custom function is defined in the form class, it should be: $this-widgetSchema-getFormFormatter()-setTranslationCallable

[symfony-users] Re: I18N of sfWidgetFormChoice

2009-01-13 Thread Nicolas Perriault
On Tue, Jan 13, 2009 at 1:02 PM, Crafty_Shadow vankat...@gmail.com wrote: I'm sorry, but you're a bit wrong here; it is not text to translate that goes as the second argument, but instead the translation function name Yes you're right. That's funny, because I actually wrote this part of the

[symfony-users] Re: I18N of sfWidgetFormChoice

2009-01-12 Thread google
Thanks. This works. But it doesn't seem very clean to have to define the __() and getI18N () methods in the Form. Is there a better place to define these static choice strings? To me it appears that they are part of the model. Regards, René Cédric Sadai wrote: $w['stuff'] = new

[symfony-users] Re: I18N of sfWidgetFormChoice

2009-01-10 Thread Cédric Sadai
$w['stuff'] = new sfWidgetFormSelect( array('choices' = array('draft' = $this-__('draft'), 'published' = $this-__('published'))) ); protected function __($string, $args = array(), $catalogue = 'messages') { return $this-getI18N()-__($string, $args, $catalogue); } protected function