Skip to content
Myr

translate.py

This file

Path

examples/basic/translate.py

6 lines · 273 bytes · Python

Last changed by

Not known.

History of this file

Take it

1from jinja2 import Environment23print Environment(extensions=['jinja2.i18n.TransExtension']).from_string("""\4{% trans %}Hello {{ user }}!{% endtrans %}5{% trans count=users|count %}{{ count }} user{% pluralize %}{{ count }} users{% endtrans %}6""").render(user="someone")