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

Error messages in another language


Go to End


3 Posts   1450 Views

Avatar
quanto

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!

Avatar
martimiz

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 :-)

Avatar
quanto

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