Change error messages in Vue Vanilla Renderer

Hello,

I’ve read everything I could find here about translations/changing of error messages but can’t get it to work in the Vue(3) Vanilla Renderer.

Is the new l18n available in the renderer? How do I add it to my (UI)Schema?
What I have to do to get own error messages?

best regards,
Svnt

Hi @svnt,

for translating errors you can either:

  • integrate ajv-errors by handing over a custom AJV instance to JSON Forms
  • integrate ajv-i18n by handing over a custom translateError function as part of the i18n config object
  • use the JSON Forms translation mechanism, i.e. handing over an own translate function as part of the i18n config object.

For the first option see the documentation of ajv-errors. For the latter two have a a look at our preliminary documentation of the JSON Forms translation mechanism.

Hi @sdirix, is it possible to provide a code sample with: "use the JSON Forms translation mechanism, i.e. handing over an own translate function as part of the i18n config object. "

best regards,
André

The first snippet on the i18n documentation page is exactly that example.