21278 Posts in 5728 Topics by 2599 members
|
Page:
1
|
Go to End | |
| Author | Topic: | 690 Views |
-
Error messages in another language

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!
-
Re: Error messages in another language

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
-
Re: Error messages in another language

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
| 690 Views | ||
|
Page:
1
|
Go to Top |

