summaryrefslogtreecommitdiff
path: root/examples
diff options
context:
space:
mode:
Diffstat (limited to 'examples')
-rw-r--r--examples/translate.py3
1 files changed, 1 insertions, 2 deletions
diff --git a/examples/translate.py b/examples/translate.py
index 9043a21..0169c88 100644
--- a/examples/translate.py
+++ b/examples/translate.py
@@ -1,7 +1,6 @@
from jinja2 import Environment
-print Environment().from_string("""\
-{{ foo.bar }}
+print Environment(parser_extensions=['jinja2.i18n.trans']).from_string("""\
{% trans %}Hello {{ user }}!{% endtrans %}
{% trans count=users|count %}{{ count }} user{% pluralize %}{{ count }} users{% endtrans %}
""").render(user="someone")