7940 Posts in 1543 Topics by 946 members
|Go to End||Next >|
19 August 2009 at 5:49am
Did you make the changes to CMSMain.php and ComplexTableField.php as noted in #4435?
I've checked in the patch for DOM, but you'll still have to do the patch manually for the other two files.
19 August 2009 at 6:04am Last edited: 19 August 2009 6:15am
I've applied the changes and from what I can see so far I'm able to add as many albums as I want, but I can't add photos and I can't add dates to Calendar events. Nonetheless this is good progress because I couldn't even access these pages in the cms before without it bugging on me. Thanks for that link UC! Saved me a bunch of searching =). Now to get the photos and events to work
There seems to be a bug even with my english version of the site atm... Can't add photos are add date times to events anymore either.
19 August 2009 at 6:46am
What do you mean? What happens?
19 August 2009 at 7:29am
Well I've posted a Screenshot of what I'm getting as a screen on my event calendar, as for the photo album. When I go to add a picture, I get a blank popup with only the close button appearing, or The upload picture form opens in the same window (without the popup).
20 August 2009 at 2:22am
If someone can shed any light on what I need to do to get it working, I would be happy to take a look and implement the change.
Any Silverstripe-core-dev people reading along? I think 'multilingual content and DOM' working together would be really interesting to a lot of us.
UncleCheese, thanks for your great work!
20 August 2009 at 2:41am Last edited: 20 August 2009 4:16am
uncle cheese asked me to explain how i got dataobjects working with translatable, see http://www.silverstripe.org/dataobjectmanager-module-forum/show/260986?start=24#post267112
At the moment translatable doesn't work, cause even ComplexTableField, Dataobjectmanager extends, cannot handle locale. There is a patch http://open.silverstripe.org/ticket/4435 which adds the locale parameter to all urls of CTF, i made another for passing locale with DOM, see http://open.silverstripe.org/ticket/4492
This for now fixes the "I can't handle sub-URLs of a CMSMain object" Bug.
So far so good.
I haven't used image gallery yet, so i don't know what you did. I'm also pretty new to Silverstripe but may have some php skills.
In my project i have used translation decorator ONLY for the pages, not for the dataobjects. The way translation currently works, is, that it makes a complete translation of ALL items, so a completely new item. Not so good for image galleries.
A (maybe hackish) approach would be, to add e.g. title_en, title_de, title_nl to each picture and make a custom getter which returns title depending on the current locale. So you only have some fields translated but not the picture.
hope that helps a little bit - i sometimes hang around in IRC #silverstripe if you prefer real time discussion ;)
in my current project i have a many-to-many relationship between translated page and dataobjects. so i easily have them available in all pages and translations. see my later post on translation groups for a possible way in has_one relationships
20 August 2009 at 3:07am
Awesome. Thanks for your input, wmk! I had a sense that was the issue.
20 August 2009 at 4:14am Last edited: 20 August 2009 4:17am
just installed a image gallery module on a test server. nice work, uncle cheese!
but the problem with translateable seems to be much more complicated.
making a translation of a page creates a new page with a new page ID. So the new (translated) gallery has to know the original gallery pageID.
Maybe http://doc.silverstripe.com/doku.php?id=multilingualcontent#translating_custom_properties Translatable_Transformation can help there (the only silverstripe on the horizon i found in docs).
problems: which page is the original page? only the one created in default locale? doesn't seem so. translation offers "translation groups" (table SiteTree_translationgroups in database), so DOM has to filter the current albums by "translation group" instead of $this->pageID.
uncle cheese: how to get the database join to get all possilbe pageIDs in the translation group in DOM?
translatable::getTranslationGroup() can give you the current translation group, the rest could be done with the filter statement.
with this step we could at least have the albums of the other translations available. next would be to translate album title etc...
hth for now.
|Go to Top||Next >|