This forum is in READ-ONLY mode.
You can look around, but if you want to ask a new question, please use the new forum.
Home » legacy support » symfony 1.1 » i18n in option form add_empty
i18n in option form add_empty [message #61184] Wed, 17 September 2008 15:30 Go to next message
xplo  is currently offline xplo
Messages: 428
Registered: September 2008
Faithful Member
hello,
i can't get the add_empty string to be translated.
Is this option not working with the i18n in symfony ?



$this->setWidgets(array(
    	'sam_categorie_id'   => new sfWidgetFormPropelSelect(array('model' => 'SamCategorie', 'add_empty' =>'--- Toutes les cat├ęgories ---', 'criteria' => $criteriaCat)),
    	'sam_type_id'  => new sfWidgetFormPropelSelect(array('model' => 'SamType', 'add_empty' =>'--- Tous les types ---', 'criteria' => $criteriaType))
    ));

$this->getWidgetSchema()->getFormFormatter()->setTranslationCatalogue('liste_sam_form');

the input label are correctly translated.

[Updated on: Wed, 17 September 2008 15:30]

Re: i18n in option form add_empty [message #61683 is a reply to message #61184 ] Wed, 24 September 2008 02:05 Go to previous messageGo to next message
ruFog  is currently offline ruFog
Messages: 13
Registered: March 2008
Location: Russia, Khabarovsk
Junior Member

Same problem. Are You solved it?
Re: i18n in option form add_empty [message #61772 is a reply to message #61683 ] Wed, 24 September 2008 21:16 Go to previous messageGo to next message
xplo  is currently offline xplo
Messages: 428
Registered: September 2008
Faithful Member
nop, still not working, i dont know what to do about it ~
Re: i18n in option form add_empty [message #80136 is a reply to message #61772 ] Thu, 18 June 2009 15:15 Go to previous messageGo to next message
JessOVR  is currently offline JessOVR
Messages: 48
Registered: April 2008
Location: France
Member
hi,

I'm stuck in the same problem. Found any solution since ?
Re: i18n in option form add_empty [message #99567 is a reply to message #61184 ] Sat, 22 May 2010 08:47 Go to previous message
scops  is currently offline scops
Messages: 1
Registered: May 2010
Junior Member
I found a solution for this

example:
$translated = $this->widgetSchema->getFormFormatter()->translate('String to translate');

$this->widgetSchema['field'] = new sfWidgetFormPropelChoice(array('model' => 'Fieldmodel', 'add_empty' => $translated, 'peer_method' => 'doSelectMyFields'));
Previous Topic:No translation of i18n text
Next Topic:Tasks not defined after install
Goto Forum:
  

powered by FUDforum - copyright ©2001-2004 FUD Forum Bulletin Board Software