diff options
| author | Georg Bauer <gb@hugo.westfalen.de> | 2005-10-01 16:24:21 +0000 |
|---|---|---|
| committer | Georg Bauer <gb@hugo.westfalen.de> | 2005-10-01 16:24:21 +0000 |
| commit | ae3c26df6250ba4a2bd0bbd27f499eb211df9f15 (patch) | |
| tree | 538e037c4831a3ea70e62594e225e0cc3ea6d5df /docs | |
| parent | 280747f7571ac042c63f5575365f369a2106afed (diff) | |
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
Diffstat (limited to 'docs')
| -rw-r--r-- | docs/translation.txt | 14 |
1 files changed, 14 insertions, 0 deletions
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:: + + <html> + <title>{{ _('This is the title') }}</title> + <body> + <p>{{ _('Hello World!') }}</p> + </body> + </html> + +This is much shorter, but won't allow you to use gettext_noop or ngettext. + How the Language is Discovered ============================== |
