Jump to:

22999 Posts in 11854 Topics by 2828 members

General Questions

SilverStripe Forums » General Questions » [SOLVED] l10n for admin interface and implications on updates

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: 783 Views
  • slamby
    Avatar
    Community Member
    21 Posts

    [SOLVED] l10n for admin interface and implications on updates Link to this post

    Hi,
    I do some localisation in the admin interface, i. e. a previously defined CalendarDateField which is labled <Date>.
    In my ArticlePage.php I have something like that:
    $fields->addFieldToTab('Root.Content.Main', new CalendarDateField('Date', _t('ArticlePage.DATE', 'Date')), 'Content');

    in de_DE.php I added this entry:
    $lang['de_DE']['ArticlePage']['DATE'] = 'Publikationsdatum';

    The result is like expected: The label changed to <Publikationsdatum>. So far so good.

    My question is concerning a future update of SilverStripe. Am I right, that SS will override my personal translations when doing it that way?

    Question 2: Is there a recommended way to do this to avoid this kind of thing?

    Thanks for your help.

  • dalesaurus
    Avatar
    Community Member
    283 Posts

    Re: [SOLVED] l10n for admin interface and implications on updates Link to this post

    Just keep a copy of your de_DE.php page handy and you should be OK. You will have to replace the file once an upgrade overwrites it though.

    Changes like this, if they are universally needed, should likely be submitted to the codebase:
    http://doc.silverstripe.org/doku.php?id=translation

  • slamby
    Avatar
    Community Member
    21 Posts

    Re: [SOLVED] l10n for admin interface and implications on updates Link to this post

    Well thanks for your comment, but this is definitivly not solving the problem.

    Anybody else interested in this topic should have a look at this very interesting article at

    http://www.ssbits.com/overriding-silverstripes-language-files-with-your-own/

    It covers the way SS is searching for language files and comes up with a solution for avoiding your translation being overridden by any update in a css-cascading-style manner.

    Worth reading.

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