Skip to main content

This site requires you to update your browser. Your browsing experience maybe affected by not having the most up to date version.

We've moved the forum!

Please use forum.silverstripe.org for any new questions (announcement).
The forum archive will stick around, but will be read only.

You can also use our Slack channel or StackOverflow to ask for help.
Check out our community overview for more options to contribute.

General Questions /

General questions about getting started with SilverStripe that don't fit in any of the categories above.

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

The current state of translated, versioned DataObjects


Go to End


2 Posts   1191 Views

Avatar
RossM

Community Member, 2 Posts

14 October 2010 at 2:29am

Hi,

The translation/verisoning works nicely for the SiteTree models, but now I'm trying to figure out how easy it is to use translated, versioned (non-sitetree) DataObjects. I have set some up, but both ways I have seen to manage these "out of the box" seem to have issues.

1) HasManyComplexTableField

With this method, no version/translation tabs are shown, and worse, it seems to have to trouble saving the current locale to the created DataObjects.

2) ModelAdmin

The translations don't show here, and the Versions tab doesn't seem to work for me, it never creates any new versions and has an odd "Add Site Tree" button. I see that there is also an old module called TranslatableModelAdmin (http://www.silverstripe.org/translatablemodeladmin-module/), but this doesn't seem to work with 2.4.2.

So, what are other people doing? Are people currently using translated, versioned DataObjects? If so, did you have to write a lot of custom code? It seems that this part of the CMS isn't as polished as the rest, is this something planned for future versions?

Thanks,

Ross

Avatar
swaiba

Forum Moderator, 1899 Posts

14 October 2010 at 2:38am

I posted a small patch for 2.4.2 yesterday - it means you can create translations, but there are holes in it and I haven't used it yet for a project - it looks like I'll have to customize it because I want to keep a "core" data object and then translate parts of it. Or I need to finalise my plan.

patch here (and description from ingo)
http://www.silverstripe.org/data-model-questions/show/266754?start=0#post293692

Another thing needed is making the translated local readonly in the getCMSFields - as curerntly the user could edit it to xyz and break the thing!

Barry