svnt
(Svnt)
June 21, 2022, 9:28am
1
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
sdirix
(Stefan Dirix)
June 24, 2022, 7:47am
2
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é
sdirix
(Stefan Dirix)
July 3, 2023, 8:47am
4
The first snippet on the i18n
documentation page is exactly that example.