Jump to:

7938 Posts in 1540 Topics by 945 members

DataObjectManager Module

SilverStripe Forums » DataObjectManager Module » [ImageGallery] Translatable Problems

Discuss the DataObjectManager module, and the related ImageGallery module.

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

Page: 1 2 3 4 5
Go to End
Author Topic: 6657 Views
  • Edu115
    Avatar
    Community Member
    13 Posts

    [ImageGallery] Translatable Problems Link to this post

    Hi there,

    Whenever I try to create a translation of an ImageGallery, all of the galleries created are not visible in the new translation language.
    Is this the expected behaviour? How can I avoid this? I only want to translate the title of the gallery.

  • Edu115
    Avatar
    Community Member
    13 Posts

    Re: [ImageGallery] Translatable Problems Link to this post

    Anyone?

  • skuja
    Avatar
    Community Member
    4 Posts

    Re: [ImageGallery] Translatable Problems Link to this post

    Same here and I would also like to know it is expected behaviour.

  • UncleCheese
    Avatar
    4085 Posts

    Re: [ImageGallery] Translatable Problems Link to this post

    I'm not sure what has to be done to get ImageGallery working with Translatable. Part of the reason is I don't really know what Translatable is supposed to do in the first place. 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.

  • Edu115
    Avatar
    Community Member
    13 Posts

    Re: [ImageGallery] Translatable Problems Link to this post

    The Translatable module lets you have versions for different languages of Data Objects.
    It creates a different page for each language, and it shows the right page depending on your locale definition.

    I'm not a PHP dev so I'm sorry I can't be more specific about it.

  • Edu115
    Avatar
    Community Member
    13 Posts

    Re: [ImageGallery] Translatable Problems Link to this post

    Right now what happens is that when I try to create a new Album in the translated page and then go to the Photos tab, I get the message "You have no albums. Click on the Albums tab to create at least one album before adding photos."

    If then I change to the original language page, I have there the Album I created in the translated page...

  • Edu115
    Avatar
    Community Member
    13 Posts

    Re: [ImageGallery] Translatable Problems Link to this post

    I'm getting so disappointed with is...
    Because I've built everything and now, at the end, when I want to put the translation, EVERYTHING fails. Image Galleries, Team Pages, everywhere I use a DataObject i'm completely screwed. And I've seen other people here with the same problems, and there's no solution for this.

    I'm getting so frustrated, I might just give up and just port this to Joomla, which I HATE.

  • UncleCheese
    Avatar
    4085 Posts

    Re: [ImageGallery] Translatable Problems Link to this post

    No! Joomla sucks!

    I was just doing some reading on the Translatable docs, and it seems like this could be the limitation:

    "Keep in mind that the Translatable extension currently doesn’t support the exclusion of properties from being translated - all custom properties will automatically be fetched from their translated record on the database. This means you don’t have to explicitly mark any custom properties as being translatable."

    The checkpoint for the "no albums" message you're getting is just a simple if($this->Albums()), so I'm wondering if that function is respecting the Translatable and only looking for albums in the current locale. Try changing that line to:

    if(DataObject::get("ImageGalleryAlbum,"ImageGalleryPageID = $this->ID"))

    Also, if you want to translate the Album info, wouldn't you have to add a Translatable decorator to the ImageGalleryAlbum object? Or have you already?

    6657 Views
Page: 1 2 3 4 5
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.