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're retiring the forums!

The SilverStripe forums have passed their heyday. They'll stick around, but will be read only. We'd encourage you to get involved in the community via the following channels instead:

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

Error messages in another language

Go to End

3 Posts   1367 Views


Community Member, 91 Posts

15 March 2011 at 9:33pm

I have a problem using RequiredFields in my site. I try to replace the text "Please fill out "[FIELDNAME]", it is required." into another language.

I found the code sapphire/javascript/Validator.js, and replaced the code, but in the errorpage nothing happened. I saw other topics on this forum but they weren't usefull. Also this wasn't very usefull.

Does anybody has an solution? Thanks!


Forum Moderator, 1391 Posts

15 March 2011 at 11:02pm

You shouldn't have to change core code for this (never a good idea) - the languagefiles should take care of this.

Validation messages are generated by javascript and unfortunately the languagefiles do not always exist for the javascript files, in which case SilverStripe will default to the english translations (probably overriding the translation you did by hand).

Look in /sapphire/javascript/lang/ and check if a translation file for your language is available. If so, compare it to the en_US.js and check if all translations are catered for. If not, you could create a copy for your own languages and do the translations yourself - or ask for help on this forum.

And maybe send in a patch so your work doesn't get lost :-)


Community Member, 91 Posts

16 March 2011 at 12:03am

Thanks! I just changed the /sapphire/javascript/lang/en_US.js code to my language (dutch), and it worked