Skip to main content

This site requires you to update your browser. Your browsing experience maybe affected by not having the most up to date version.

We've moved the forum!

Please use forum.silverstripe.org for any new questions (announcement).
The forum archive will stick around, but will be read only.

You can also use our Slack channel or StackOverflow to ask for help.
Check out our community overview for more options to contribute.

General Questions /

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

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

Log-in form - Output in Dutch (?)


Go to End


3 Posts   1009 Views

Avatar
borriej

Community Member, 267 Posts

4 May 2010 at 11:11pm

Edited: 04/05/2010 11:15pm

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?

Avatar
martimiz

Forum Moderator, 1391 Posts

5 May 2010 at 2:34am

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)

Avatar
borriej

Community Member, 267 Posts

5 May 2010 at 4:06am

Edited: 05/05/2010 4:09am

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?