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 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.

DataObjectManager Module /

Discuss the DataObjectManager module, and the related ImageGallery module.

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

DataObject + TranslatableDataObject + ModelAdmin

Go to End

4 Posts   2354 Views


Community Member, 11 Posts

16 August 2015 at 9:27pm

It's SS 3.1.13, Translatable 2.0.8 and TDO dev-master.
I have two DO classes: "Facility" ($has_one) and "FacilityType" ($has_many) with which I chose to be managed in ModelAdmin (as they are global properties of the site owner). I cannot however get TranslatableDataObject extension to enable translation for them, despite reading carefully the setup instructions:

Here's my config:
// Set the site locale


// Set allowed locales
Translatable::set_allowed_locales(array('en_US', 'pl_PL'));
TranslatableDataObject::set_locales(array('en_US', 'pl_PL'));
Facility::add_extension("TranslatableDataObject"); // tried "TranslatableDataObject('Title')" as well

Could anyone please confirm that this setup should or won't work for me?


Community Member, 419 Posts

17 August 2015 at 10:54pm

Edited: 17/08/2015 10:58pm

Ensure to have Translable module installed too, and to set_default_locale, not just set_locale.

I'm not too experienced with these modules, but it looks like it should work. The best way is to try it and see :)


Community Member, 11 Posts

18 August 2015 at 11:13am

I'm so sorry - no go. It did not help.


Community Member, 419 Posts

19 August 2015 at 2:51am

Hmm, it should work but just in case: try setting the extensions via the YML config

Also, have you added translation content for the locale that isn't the default? You need to add this via the CMS first before it will load - otherwise it will probably just default to the default locale.