Saturday, January 29, 2011

Create Object with More Doctrine Translation

$country = new Country();

// set a language-independent value
$country->setCountryCode('H');

// set translations
$country->Translation['hu']->name = 'Magyarország';
$country->Translation['en']->name = 'Hungary';
$country->Translation['de']->name = 'Ungarn';

$country->save();

No comments:

Post a Comment