Jump to:

22976 Posts in 11620 Topics by 2826 members

General Questions

SilverStripe Forums » General Questions » Overriding default translation tables.

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: 639 Views
  • sphire
    Community Member
    6 Posts

    Overriding default translation tables. Link to this post

    Hi there,

    the situation is as follows: SilverStripe assumes user credentials to consist of an email address and a password. That is fine for sites with various users but often not quite relevant for sites with a closed group of editors. So, to make it a little less confusing I’d like to go with username and password which is not a technical problem as the email field accepts non-email strings anyway.

    Now I want to update the language files to reflect this change, e.g.
    $lang['de_DE']['Member']['EMAIL'] = 'Benutzername';

    The problem seems to be, however that my custom language file (in mysite/lang/) gets included before the core’s. Thus, my custom setting gets overriden by the default one. Obviously I could just change the core but I don’t consider that a particularly good option.

    So, is there a reason for the way this works? Are there workarounds?

    Any help would be appreciated.


    UPDATE: An easy—if not very elegant—workaround apparently is to create a module with a name that is lexicographically “greater” than “sapphire” and put the language file there (which also seems to indicate that this was not a conscious design decision).

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.