1
0
mirror of https://github.com/django/django.git synced 2025-10-24 14:16:09 +00:00

[5.1.x] Fixed #35306 -- Documented fallback localization formats in templates when localization is disabled.

Backport of 3ac0e43207 from main.
This commit is contained in:
lufafajoshua
2024-06-24 12:02:55 +02:00
committed by Sarah Boyce
parent 63178036b3
commit 3d55f2966d
2 changed files with 12 additions and 5 deletions

View File

@@ -89,6 +89,9 @@ To activate or deactivate localization for a template block, use:
{{ value }}
{% endlocalize %}
When localization is disabled, the :ref:`localization settings <settings-l10n>`
formats are applied.
See :tfilter:`localize` and :tfilter:`unlocalize` for template filters that will
do the same job on a per-variable basis.
@@ -133,8 +136,9 @@ To force localization of a single value, use :tfilter:`localize`. To
control localization over a large section of a template, use the
:ttag:`localize` template tag.
Returns a string representation for unlocalized numbers (``int``, ``float``,
or ``Decimal``).
Returns a string representation for numbers (``int``, ``float``, or
``Decimal``) with the :ref:`localization settings <settings-l10n>` formats
applied.
.. _custom-format-files: