Jump to:

3460 Posts in 1064 Topics by 739 members

Data Model Questions

SilverStripe Forums » Data Model Questions » Multilingual site with relationships

Moderators: martimiz, Sean, biapar, Willr, Ingo, swaiba, simon_w

Page: 1
Go to End
Author Topic: 1685 Views
  • beezer
    Community Member
    16 Posts

    Multilingual site with relationships Link to this post


    I am developing a web site for a alternative reality game aimed at school children using Silverstripe. The problem is that while I am doing this in English the first round of the game will take part in Germany and therefore I need to translate all the content. I have enabled multilingual content but am a bit confused how to make this work as all the pages in German get their own ID assigned in the database and I have a lot of relationships depending on the page id or dataobject id (for example all the Tasks are saved as individual pages and the code to unlock them are stored as dataobjects).

    Can i use translation groups for this? Or is this not really feasible in Silverstripe at the moment?


  • Ingo
    Forum Moderator
    801 Posts

    Re: Multilingual site with relationships Link to this post

    Interesting project, I'd love to see it linked here once its gone live

    So you've read through http://doc.silverstripe.org/doku.php?id=multilingualcontent, right?
    I'm not sure if I get your datamodel, but as a rule of thumb: As long as you relate any has_one/has_many/many_many DataObjects directly to a SiteTree object, they should be associated to the correct language (assuming you filter them properly in the view, e.g. a ComplexTableField inside Page->getCMSFIelds()). The DataObject records themselves won't automatically have a locale set, and there's no CMS-based interface for "adding a translation".

    As an alternative to the CMS-based editing, consider using our "translatable modeladmin" module: http://open.silverstripe.org/browser/modules/translatablemodeladmin/trunk. Its pretty early stage, but if you have a look through its code, you should get a feeling for whats involved to make things like ComplexTableField work with Translatable.

Page: 1
Go to Top

Want to know more about the company that brought you SilverStripe? Then check out SilverStripe.com

Comments on this website? Please give feedback.