↧
Answer by Anton Strogonoff for _() or {% trans %} in Django templates?
So it seems that there's technically no difference as of Django 1.5. Template engine internally marks a variable for translation (by setting its translate attribute) in two cases:when you do {% trans...
View ArticleAnswer by gagamil for _() or {% trans %} in Django templates?
The trans template tag calls the ugettext() function. In Django _() is an alias to ugettext().This is covered in the django docs.
View Article_() or {% trans %} in Django templates?
In Django templates, you can use either {{ _("Hello World") }} or {% trans "Hello World" %} to mark strings to be translated. In docs, the “official” approach seems to be the {% trans %} tag, but the...
View Article
More Pages to Explore .....