Hello
I want to have text input validation errors in different languages.
I have a fixed set of supported languages and i am able to use a dropdown list and session storage to store language preference. I have a json file with translations of all areas of the website and i am using it to change headings , button text etc through drnamic attributes.
But I don’t know how to do the same for form/text input validation errors.
My example uses pure HTML for the error message. In your case I would try placing the dmx-bind: thingy in front of the data- attribute and the variable as the text as in
Thank you Ben for explaining the dmx-bind i feel i get it now but the code below is not working
I feel that something is overriding the code below and forcing the error message to be the one in the visual editor
So the code says this
but the editor remains this and the page only shows this message
I’m able to access the validation message like this so perhaps i should just a make an additional text area below the English error to show the translated error? Or is there a better way?
I’m able to show the translated error message using form2.pwd.validationMessage to look up the translated value but i am not able to hide the English Message . How do i do that please ?
I think that you will find that the default message will appear in the language that the browser has been set to. e.g. Browsers in English will show an English message, browsers formatted to Dutch will show the default message in Dutch.
I tried Hindi, French and Dutch. The browsers language changed after relaunching the browser. The Browser UI is appearing in Hindi/French/Dutch. However the error message remains English