Fixed #6392 -- Made django.contrib.humanize template tags locale aware. Thanks, Dave McLain.

git-svn-id: http://code.djangoproject.com/svn/django/trunk@16168 bcc190cf-cafb-0310-a4f2-bffc1f526a37
This commit is contained in:
Jannis Leidel 2011-05-06 13:29:58 +00:00
parent 7dd72360a2
commit 8f3e1c1c63
7 changed files with 207 additions and 49 deletions

View file

@ -43,6 +43,12 @@ Examples:
* ``450000`` becomes ``450,000``.
* ``4500000`` becomes ``4,500,000``.
:ref:`Format localization <format-localization>` will be respected if enabled,
e.g. with the ``'de'`` language:
* ``45000`` becomes ``'45.000'``.
* ``450000`` becomes ``'450.000'``.
You can pass in either an integer or a string representation of an integer.
.. templatefilter:: intword
@ -61,6 +67,13 @@ Examples:
Values up to 1000000000000000 (one quadrillion) are supported.
:ref:`Format localization <format-localization>` will be respected if enabled,
e.g. with the ``'de'`` language:
* ``1000000`` becomes ``'1,0 Million'``.
* ``1200000`` becomes ``'1,2 Million'``.
* ``1200000000`` becomes ``'1,2 Milliarden'``.
You can pass in either an integer or a string representation of an integer.
.. templatefilter:: naturalday