How can we improve Breeze.js?

Create function to translate error messages

it would be possible to include a function to breeze similar to the included in knockout-validation to translate error messages:

//quick function to override rule messages
ko.validation.localize = function (msgTranslations) {

var msg, rule;

//loop the properties in the object and assign the msg to the rule
for (rule in msgTranslations) {
if (ko.validation.rules.hasOwnProperty(rule)) {
ko.validation.rules[rule].message = msgTranslations[rule];
}
}
};

Related to: http://stackoverflow.com/questions/14316454/translate-breeze-validation-messages

16 votes
Vote
Sign in
Check!
(thinking…)
Reset
or sign in with
  • facebook
  • google
    Password icon
    I agree to the terms of service
    Signed in as (Sign out)
    You have left! (?) (thinking…)
    Julian YusteJulian Yuste shared this idea  ·   ·  Admin →

    0 comments

    Sign in
    Check!
    (thinking…)
    Reset
    or sign in with
    • facebook
    • google
      Password icon
      I agree to the terms of service
      Signed in as (Sign out)
      Submitting...

      Feedback and Knowledge Base