OK, not sure if I've done it the best way, so feel free to point out my 
obvious errors! But here's what I came up with:

I created a method in the NewsItem class:

public function getNewsItemI18nInCulture($culture)
{
   return NewsItemI18nPeer::retrieveByPk($this->getId, $culture);
}


then as I loop through the available culture, I slot in the each culture 
string (en_GB, fr_FR, etc) into this getter.

Seems to work.

Tom Haskins-Vaughan wrote:
> Hi,
> 
> I'm writing a news module for a client who wants the news items to be 
> available in several languages.
> 
> I have a table in the db with the allowed cultures - so far fr_FR and en_GB.
> 
> In the edit template I have a fieldset for date and author and now I'm 
> trying to write the fieldset with fields for the title in the two 
> languages. I've done a loop to get the available languages:
> 
> <?php foreach (CulturePeer::doSelect(new Criteria()) as $culture): ?>
> 
>    <?php echo input_tag(...
> 
> But I'm not sure how get the title in each language to populate the 
> default value.
> 
> Any help appreciated.
> 
> TIA
> 
> Tom
> 
> > 
> 

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"symfony users" group.
To post to this group, send email to symfony-users@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/symfony-users?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to