symfony/symfony — pull request #5032 by kufi (2012-07-24 14:17:35+00:00)
Title: Translatable field type for Propel i18n columns

A field type which allows to automatically generate the correct fields for propels i18n behavior.

Usage example:

$builder->add('pageI18ns', 'translatable_collection', array(
'i18n_class' => '\foo\barBundle\Model\PageI18n',
'languages' => array('de', 'fr'),
'label' => 'Translations',
'columns' => array(
'title' => array(
'label' => 'Custom title',
),
'description' => array(
'type' => 'textarea'
)
)
));

With this configuration the field automatically generates the correct fields for the title and description column for the given languages.