Tuesday, 1 October 2019

How do I translate Javascript standard error messages in Django?

I've a couple of Django projects using translations and everything works fine except Javascript error messages on forms are not translating.

For example, on my Login form, if I simply press enter I will get the JS error message "Please fill in this field" in English, whether I've selected English, French, German or any other language. This is not my JS error message and if I run manage.py makemessages -d djangojs, then this message doesn't show up to translate so I don't think I need to correct through that process.

Can anyone advise me how to ensure the user is getting JavaScript error messages in their language. Thanks



from How do I translate Javascript standard error messages in Django?

No comments:

Post a Comment