Jump to:

17452 Posts in 4473 Topics by 1971 members

Archive

SilverStripe Forums » Archive » Problem! Translations of user defined form (DE/EN) overwrites settings

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: 1599 Views
  • bird
    Avatar
    Community Member
    9 Posts

    Problem! Translations of user defined form (DE/EN) overwrites settings Link to this post

    Hi there!

    I created a new Silverstripe-site and startet with german language by default.
    Everything works perfectly but creating user defined forms for contacting purpose in two languages fails.

    For example:
    Creating a german udf-page "Kontakt" and filling in some fields and boxes works fine.
    Translating this page into english "Contact" messes up the whole system. Changing texts and forms to "EN" automatically overwrites the german page...CMS can't handle it and freezes.

    After restart german pages inherit all the english settings and vice versa???
    Do these forms share their fields and settings!? How to fix that?
    I'n not a php crack and really need support! Thanks!!!

  • Ingo
    Avatar
    Forum Moderator
    801 Posts

    Re: Problem! Translations of user defined form (DE/EN) overwrites settings Link to this post

    EditableFormField and subclasses (which form the basis for UserDefinedForm) are currently not translatable. It might be a simple matter of adding the Translatable extension to these classes (see http://doc.silverstripe.com/doku.php?id=multilingualcontent) - perhaps you can give it a try and test a bit? Either way, I've created a ticket: http://open.silverstripe.com/ticket/2794

  • bird
    Avatar
    Community Member
    9 Posts

    Re: Problem! Translations of user defined form (DE/EN) overwrites settings Link to this post

    Hey Ingo,

    thanks for your support! I'm not quite sure if I can add the translatable extension to that class that easy...all efforts to create translatable fields by creating classes wich are loaded after the sitetree core fail so far... I think the il8n routine doesn't take all the additional classes and fields into account...I can only create some translatable fields by modifying the sitetree.php (but that works fine)
    I created a clumsy workaround for translatable fieldlabels by connection a language detection to all the names (assigned as varaibles) used in the form... this way some standards (name, email, message, etc.) are automatically translated in the right langauge... not the best way but does the job.

    Maybe I try to improve this method the next days

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