Jump to:

5554 Posts in 1742 Topics by 1227 members

Customising the CMS

SilverStripe Forums » Customising the CMS » Help internationalizing the login page

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

Page: 1
Go to End
Author Topic: 408 Views
  • vodoomoth
    Community Member
    22 Posts

    Help internationalizing the login page Link to this post


    In the wake of my previous efforts to internationalize the login page, I am now trying to extend the MemberAuthenticator class with a custom class.

    The reason I'm trying to do that is that despite my aforementioned efforts, error messages still appear in en_US when the page is normally in fr_FR. To solve that problem, I've realized that I need to add a call to i18n::set_locale() in the static function MemberAuthenticator::authenticate.

    I have created a subclass to MemberAuthenticator that does just that, added

    Object::useCustomClass('MemberAuthenticator', 'MyMemberAuthenticator');

    in mysite/_config.php, and run /dev/build.

    And yet, using XDebug and Eclipse, I see that the standard MemberAuthenticator still gets called in lieu of my custom class, the file of which I've dropped in mysite/code/security/MyMemberAuthenticator.php. Is there something I did wrong?

    Thank you.

  • Tony Air
    Community Member
    13 Posts

    Re: Help internationalizing the login page Link to this post

    I had the same issue. Solution is to create your own security controller for an instance "SecurityExtended" and rewrite Director rules by routes.yml

    Here's an example:

    Name: zz-basicroutes
    'Security//$Action/$ID/$OtherID': 'SecurityExtended'


  • prvz
    Community Member
    1 Post

    Re: Help internationalizing the login page Link to this post

    Thanks Tony Air can You Please Explain How to extend the security controller and change it sorry I am a new bee to silver stripe.
    I am finding harder to extend the internal classes and use it. Or if you can provide me link.

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.