diff options
author | Armin Ronacher <armin.ronacher@active-4.com> | 2008-04-16 14:21:57 +0200 |
---|---|---|
committer | Armin Ronacher <armin.ronacher@active-4.com> | 2008-04-16 14:21:57 +0200 |
commit | 2e9396ba8f6cfa9007d29724c6a14d3905078bcf (patch) | |
tree | a46432224e023a6efb1437b128ef9eaaf6b648ff /examples | |
parent | b9bed15d7b461c6cea569e10b20c41da73667d3b (diff) | |
download | jinja2-2e9396ba8f6cfa9007d29724c6a14d3905078bcf.tar.gz |
reimplemented {% trans %}
--HG--
branch : trunk
Diffstat (limited to 'examples')
-rw-r--r-- | examples/translate.py | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/examples/translate.py b/examples/translate.py new file mode 100644 index 0000000..8b38d02 --- /dev/null +++ b/examples/translate.py @@ -0,0 +1,6 @@ +from jinja2 import Environment + +print Environment().from_string("""\ +{% trans %}Hello {{ user }}!{% endtrans %} +{% trans count=users|count %}{{ count }} user{% pluralize %}{{ count }} users{% endtrans %} +""").render() |