[Django]-What's gettext_lazy on django is for?

11👍

Its used for translation for creating translation files like this:

# app/locale/cs/LC_MESSAGES/django.po


#: templates/app/index.html:3
msgid "email address"
msgstr "emailová adresa"

Than it can be rendered in template as translated text. Nothing will happen if you remove it and don’t want to use multilingualism.

Leave a comment