Jump to:

23456 Posts in 18905 Topics by 2877 members

General Questions

SilverStripe Forums » General Questions » Help with Translatable ModelAdmin

General questions about getting started with SilverStripe that don't fit in any of the categories above.

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

Page: 1
Go to End
Author Topic: 942 Views
  • dompie
    Community Member
    88 Posts

    Help with Translatable ModelAdmin Link to this post


    I am trying implement TranslatableModelAdmin to work with SS 2.4.1 - anyone can help? I can't find the URL anymore, but here is a SVN Link.

    The extension somehow does not create new translations.

    So far I have added the following code to fix occuring errors:
    1) TranslatableModelAdmin.php init function replace



    $vars = array('SECURITY_ID' => Session::get('SecurityID'));
    Requirements::javascriptTemplate('translatablemodeladmin/javascript/TranslatableModelAdmin.js', $vars);

    2) TranslatableModelAdmin.js add to line 8

       url += '&SecurityID=' + $SECURITY_ID;

    After this you should be able to load and submit the created "Translations" Tab in the ModelAdmin without errors. Unfortunately it still won't create a new translation. Somehow 'createtranslation' in the TranslatableModelAdmin_RecordController is not called. Fixing this by adding in TranslatableModelAdmin_RecordController EditForm (before first if statement)


    will not help.

    Somehow the function createtranslation in the RecordController must be fixed, I have tried different things, but did not succeed.

    Anyone can help me on this?

    Would be awesome and I could finally commit my changes to SVN.

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.