I want to have a custom error page shown to the user in case of an error. My problem is, that it has to be i18n-ed.
Idea:
Validate in node -> if not accepted -> res.render('error', {message: errorMessageNameTooLong});
-> in jade, render that to a placeholder, which translates the errors from my translation.json p(data-i18n='errorMessageNameTooLong')
Problem:
How can i pass the message, so that the VALUE will be the data-i18n attribute in jade?
So far, i'm stuck with pre-formatting my jade template to p(data-i18n="errormsg")
but that makes it impossible to display (i.e. translate) more than one error.
I want the p
to have a custom data-i18n attribute, depending on what error it actually is...
i hope that is understandable :D
thanks for the help :)