Skip to content
Browse files

edit

  • Loading branch information...
1 parent 8d3945e commit 79ca23ef1e2eeeef851cbf2a78115f4f2e3354fb Bibby committed with anandology Mar 25, 2009
Showing with 5 additions and 1 deletion.
  1. +5 −1 cookbook/template_jinja.md
View
6 cookbook/template_jinja.md
@@ -30,7 +30,7 @@ You need to install both Jinja2 and webpy(0.3) first, and then try out the follo
# Used for Jinja2 i18n extension.
#lang = gettext.translation('domain', 'localedir', languages=['zh_CN'])
- #render._lookup.install_gettext_translations(default_lang)
+ #render._lookup.install_gettext_translations(lang)
class hello:
def GET(self, name):
@@ -40,5 +40,9 @@ You need to install both Jinja2 and webpy(0.3) first, and then try out the follo
app.run()
### Template file: templates/hello.html
+
Hello, {{ name }}.
+For i18n string:
+
+ {{ _('Hello') }}, {{ name }}.

0 comments on commit 79ca23e

Please sign in to comment.
Something went wrong with that request. Please try again.