Added support for time zones. Thanks Luke Plant for the review. Fixed #2626.

For more information on this project, see this thread:
cf0423bbb8



git-svn-id: http://code.djangoproject.com/svn/django/trunk@17106 bcc190cf-cafb-0310-a4f2-bffc1f526a37
This commit is contained in:
Aymeric Augustin 2011-11-18 13:01:06 +00:00
parent 01f70349c9
commit 9b1cb755a2
58 changed files with 2720 additions and 284 deletions

View file

@ -2318,8 +2318,45 @@ Value Argument Outputs
if no mapping for None is given)
========== ====================== ==================================
Other tags and filter libraries
-------------------------------
Internationalization tags and filters
-------------------------------------
Django provides template tags and filters to control each aspect of
`internationalization </topics/i18n/index>`_ in templates. They allow for
granular control of translations, formatting, and time zone conversions.
i18n
^^^^
This library allows specifying translatable text in templates.
To enable it, set :setting:`USE_I18N` to ``True``, then load it with
``{% load i18n %}``.
See :ref:`specifying-translation-strings-in-template-code`.
l10n
^^^^
This library provides control over the localization of values in templates.
You only need to load the library using ``{% load l10n %}``, but you'll often
set :setting:`USE_L10N` to ``True`` so that localization is active by default.
See :ref:`topic-l10n-templates`.
tz
^^
.. versionadded:: 1.4
This library provides control over time zone conversions in templates.
Like ``l10n``, you only need to load the library using ``{% load tz %}``,
but you'll usually also set :setting:`USE_TZ` to ``True`` so that conversion
to local time happens by default.
See :ref:`time-zones-in-templates`.
Other tags and filters libraries
--------------------------------
Django comes with a couple of other template-tag libraries that you have to
enable explicitly in your :setting:`INSTALLED_APPS` setting and enable in your
@ -2348,28 +2385,6 @@ django.contrib.webdesign
A collection of template tags that can be useful while designing a Web site,
such as a generator of Lorem Ipsum text. See :doc:`/ref/contrib/webdesign`.
i18n
^^^^
Provides a couple of templatetags that allow specifying translatable text in
Django templates. It is slightly different from the libraries described
above because you don't need to add any application to the
:setting:`INSTALLED_APPS` setting but rather set :setting:`USE_I18N` to True,
then loading it with ``{% load i18n %}``.
See :ref:`specifying-translation-strings-in-template-code`.
l10n
^^^^
Provides a couple of templatetags that allow control over the localization of
values in Django templates. It is slightly different from the libraries
described above because you don't need to add any application to the
:setting:`INSTALLED_APPS`; you only need to load the library using
``{% load l10n %}``.
See :ref:`topic-l10n-templates`.
static
^^^^^^