From ae3c26df6250ba4a2bd0bbd27f499eb211df9f15 Mon Sep 17 00:00:00 2001 From: Georg Bauer Date: Sat, 1 Oct 2005 16:24:21 +0000 Subject: i18n: changed resolve_variable and resolve_variable_with_filters to allways accept string constants and to accept i18n string constants with _(), too. That way the i18n tag isn't needed in simple cases. git-svn-id: http://code.djangoproject.com/svn/django/branches/i18n@760 bcc190cf-cafb-0310-a4f2-bffc1f526a37 --- docs/translation.txt | 14 ++++++++++++++ 1 file changed, 14 insertions(+) (limited to 'docs') diff --git a/docs/translation.txt b/docs/translation.txt index 8c90e51b9b..58f634da08 100644 --- a/docs/translation.txt +++ b/docs/translation.txt @@ -102,6 +102,20 @@ variables, not more complex expressions. To translate a variable value, you can just do {% i18n _(variable) %}. This can even include filters like {% i18n _(variable|lower} %}. +There is additional support for i18n string constants for other situations +as well. All template tags that do variable resolving (with or without filters) +will accept string constants, too. Those string constants can now be i18n +strings like this:: + + + {{ _('This is the title') }} + +

{{ _('Hello World!') }}

+ + + +This is much shorter, but won't allow you to use gettext_noop or ngettext. + How the Language is Discovered ============================== -- cgit v1.3