Jump to:

5451 Posts in 1673 Topics by 1197 members

Customising the CMS

SilverStripe Forums » Customising the CMS » Exclude fields from translation?

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

Page: 1
Go to End
Author Topic: 553 Views
  • jand
    Avatar
    Community Member
    30 Posts

    Exclude fields from translation? Link to this post

    Hi, is it possible to share certain information between the translations of a page? These fields should be only editable in the base language and greyed out in the translations (like the "PageType" field).

    There was a similar request some time ago, I wonder if this is possible meanwhile?

  • jand
    Avatar
    Community Member
    30 Posts

    Re: Exclude fields from translation? Link to this post

    Or maybe someone has a workaround/hack (like a "copy this field to all languages" button)?

  • martimiz
    Avatar
    Forum Moderator
    1038 Posts

    Re: Exclude fields from translation? Link to this post

    I don't think it's part of the Translatable module.

    I'm thinking first you'd have to make the field readonly or (have it disapear) within the CMS for all pages except for the master page.

    Next you'd have to add some functionality to the Page's OnBeforeWrite() or OnAfterWrite() method that checks if the current page is the master page, and if so, collects all translations, updates their corresponding field and then writes them to the database. Something like that

  • jand
    Avatar
    Community Member
    30 Posts

    Re: Exclude fields from translation? Link to this post

    Okay, I see. Sounds like a plan

    Thanks

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