Open aripalo opened 8 years ago
I have trouble understanding how to use different translations in my app, I know this is more of a question (which generally should go to StackOverflow), but I think README.md should have an example of using localization.
README.md
Let's say I have the following setup:
const FormSchema = require('business-rules-engine/commonjs/FormSchema'); const schema = { foo: { type: 'string', minLength: 100, required: true, title: 'Foo', }, } const validator = new FormSchema.JsonSchemaRuleFactory(schema).CreateRule('foo'); const result = validator.Validate({ foo: 'not long enough' }); console.log(result.ErrorMessage);
Considering that example code, how would one go and specify that in which language the messages result.ErrorMessage are displayed?
result.ErrorMessage
I have trouble understanding how to use different translations in my app, I know this is more of a question (which generally should go to StackOverflow), but I think
README.md
should have an example of using localization.Let's say I have the following setup:
Considering that example code, how would one go and specify that in which language the messages
result.ErrorMessage
are displayed?