summaryrefslogtreecommitdiff
path: root/docs
diff options
context:
space:
mode:
authorGeorg Bauer <gb@hugo.westfalen.de>2005-11-03 17:10:16 +0000
committerGeorg Bauer <gb@hugo.westfalen.de>2005-11-03 17:10:16 +0000
commit9e724c25236b1e00a36a146e66b5deaa43d2af96 (patch)
tree5ea3f671bb5c24f6d959293441069b57f01031a5 /docs
parent11e6a880111f60b9d037a4f1f53b7b68d1da552f (diff)
i18n: fixed documentation and message scanner for constant string translations
git-svn-id: http://code.djangoproject.com/svn/django/branches/i18n@1066 bcc190cf-cafb-0310-a4f2-bffc1f526a37
Diffstat (limited to 'docs')
-rw-r--r--docs/translation.txt10
1 files changed, 10 insertions, 0 deletions
diff --git a/docs/translation.txt b/docs/translation.txt
index 21d947d1d6..637719b879 100644
--- a/docs/translation.txt
+++ b/docs/translation.txt
@@ -172,6 +172,16 @@ two tags::
All tags live in the ``i18n`` tag library, so you need to specify
``{% load i18n %}`` in the head of your template to make use of them.
+There are some places where you will encounter constant strings in your template code.
+One is filter arguments, the other are normal string constants for tags. If you need to
+translate those, you can use the ``_("....")`` syntax::
+
+ {% some_special_tag _("Page not found") value|yesno:_("yes,no") %}
+
+In this case both the filter and the tag will see the already translated string, so they
+don't need to be aware of translations. And both strings will be pulled out of the templates
+for translation and stored in the .po files.
+
The ``setlang`` redirect view
-----------------------------