Jump to:

17452 Posts in 4473 Topics by 1971 members

Archive

SilverStripe Forums » Archive » translatable

Our old forums are still available as a read-only archive.

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

Page: 1
Go to End
Author Topic: 1697 Views
  • dany_doo
    Avatar
    Community Member
    13 Posts

    translatable Link to this post

    is there anybody who could help me!! Please..

    I am trying to build a website with two languages (german and english). when i have only default fields in my templates, everything works fine.. but, as soon as I add some custom field (also definition with extensions array), CMS doesn't work any more..

    What to do?

  • Fuzz10
    Avatar
    Community Member
    787 Posts

    Re: translatable Link to this post

    AFAIK this does not work properly (yet).

    I think the core-devs put a lot of time / effort in the translatable architecture at the moment. So this´ll probably change in the future.

  • dany_doo
    Avatar
    Community Member
    13 Posts

    Re: translatable Link to this post

    I made a following work-around:

    I've changed my SiteTree.php.. Inserted all needed fields for translation into SiteTree.php.

    When I need some Field in my Template that should not be translated (for example, date field in my news template or the header picture - same in both languages) it is not problem to extend page class..

    the only problem is, that cms is not playing 100% with my workaround. there are some problems with ajax validator and you have to watch on the following order:

    - create new page in root of your sitetree in your main language
    - input all contents (save&publish)
    - switch to additional language(s) (i took some widget for language chooser)
    - input contents for translation
    - go back to main language (first appearance of ajax error with some strange message)
    - allow drag and drop and put the new page into wished place.

    - sometimes you can run into problems after these steps when you want to create new page again.. but admin/?flush=1 should help you.

    when I get some time, i will try to debug these errors.

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