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 » support » symfony 1.3 and 1.4 » [SOLVED] Help with Doctrine and I18n Fields
[SOLVED] Help with Doctrine and I18n Fields [message #102051] Tue, 06 July 2010 10:18 Go to next message
lore80281  is currently offline lore80281
Messages: 75
Registered: October 2008
Member
Hello everyone....

i have a problem with doctrine 1.2 and symfony 1.4.

This is my schema.yml
Event:
  actAs:
    I18n:
      fields: [title]
  columns:
    title: { type: string(255), notnull: true }


In my template i'd like to print "title" value in different language, like this:

echo $event->getTitle()
//In default culture it's all ok

echo $event->getTitle('it')
//In a custom culture, NOT WORK... 



Have you any suggestion??

Thank you very much

[Updated on: Tue, 06 July 2010 10:26]

Re: [SOLVED] Help with Doctrine and I18n Fields [message #102052 is a reply to message #102051 ] Tue, 06 July 2010 10:27 Go to previous messageGo to next message
lore80281  is currently offline lore80281
Messages: 75
Registered: October 2008
Member
$event->setDefaultCulture('it');
$event->getTitle();


Work fine.

Smile

Bye Bye
Re: [SOLVED] Help with Doctrine and I18n Fields [message #102546 is a reply to message #102052 ] Thu, 15 July 2010 17:56 Go to previous message
simongl  is currently offline simongl
Messages: 20
Registered: July 2008
Location: QC
Junior Member
All languages are available in the doctrine model object :

// prints New event!
$event->Translation['en']->getTitle()

// prints Nouvel événement!
$event->Translation['fr']->getTitle()
Previous Topic:Customizing sfDoctrineGuardPlugin error messages
Next Topic:Form for many-to-many relation with extra field
Goto Forum:
  

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