Jump to:

23477 Posts in 18941 Topics by 2878 members

General Questions

SilverStripe Forums » General Questions » Error messages in another language

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: 924 Views
  • quanto
    Avatar
    Community Member
    81 Posts

    Error messages in another language Link to this post

    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!

  • martimiz
    Avatar
    Forum Moderator
    1085 Posts

    Re: Error messages in another language Link to this post

    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

  • quanto
    Avatar
    Community Member
    81 Posts

    Re: Error messages in another language Link to this post

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

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