Jump to:

23453 Posts in 18902 Topics by 2877 members

General Questions

SilverStripe Forums » General Questions » Log-in form - Output in Dutch (?)

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: 550 Views
  • borriej
    Avatar
    Community Member
    267 Posts

    Log-in form - Output in Dutch (?) Link to this post

    Hello,

    I've added a log-in box on the template ($LoginForm) but I want the names and feedback to be Dutch.

    So I edited:

    sapphire/security/MemberAuthenticor.php
    Line: 84

          if($form) $form->sessionMessage(
             _t('Member.ERRORWRONGCRED', "That doesn't seem to be the right e-mail address or password. Please try again."),
             "bad"
          );
       }

    to:

    sapphire/security/MemberAuthenticor.php
    Line: 85

             _t('Member.ERRORWRONGCRED', "Ongeldig e-mail adres of wachtwoord. Probeer het a.u.b. opnieuw."),

    ran dev/build?flush=1

    But when i log-in with an invalid email, it still gives the english message.

    1) What to do with the English - Dutch output?

    2) If it is possible, I would also like to have a different login class which is easier. So something like this '$LoginFormSimple'. The idea is that it is a simple version without the 'lost password' rule. How do I do this?

  • martimiz
    Avatar
    Forum Moderator
    1078 Posts

    Re: Log-in form - Output in Dutch (?) Link to this post

    As to your first question:
    First of all: avoid changing the core code, since you'll have a hell of a time upgrading later. Second: this is not going to work anyway, since Silverstripe will get the translation from the English languagefiles.

    What you need to do is make sure your website will use the Dutch language files, so in your mysite/_config.php set:

    i18n::set_locale('nl_NL');

    (the language used in the backend is a different issue, as it is set in your user-profile)

  • borriej
    Avatar
    Community Member
    267 Posts

    Re: Log-in form - Output in Dutch (?) Link to this post

    And again: thank you This also worked!

    Is it easy to add a different log-in class for a small panel? see: http://www.nupharma.nl/producten
    I dont really want the 'forgot password' rule underneath my button.. And actually I want the labels: e-mail and wachtwoord to be displayed in to field (as background)

    Where do I need to look for documentation about this?

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