#24913: Localize filter tag doesn't work for thousand separator then USE_L10N is
False
-------------------------------------+-------------------------------------
Reporter: Andertaker | Owner: ana-
| balica
Type: Bug | Status: assigned
Component: | Version: 1.7
Internationalization |
Severity: Normal | Resolution:
Keywords: localize | Triage Stage: Accepted
Has patch: 0 | Needs documentation: 0
Needs tests: 1 | Patch needs improvement: 0
Easy pickings: 0 | UI/UX: 0
-------------------------------------+-------------------------------------
Description changed by ana-balica:
Old description:
> in settings.py
> '''USE_L10N = False
> USE_THOUSAND_SEPARATOR = True'''
>
> it template
> {% localize on %}
> {{ object.price }}
> {% endlocalize %}
> or
> {{ object.price|localize }}
>
> but there is no affect
>
> I think in util.formats.number_format function should be something like
> this
> if use_l10n:
> force_grouping = True
New description:
In settings.py set
'''USE_L10N = False
USE_THOUSAND_SEPARATOR = True'''
In the template do this:
{{{
{% localize on %}
{{ object.price }}
{% endlocalize %}
}}}
or
{{{
{{ object.price|localize }}
}}}
Switching on the localization doesn't trigger the `USE_THOUSAND_SEPARATOR`
setting in case it's set to True.
I think in util.formats.number_format function should be something like
this
{{{
if use_l10n:
force_grouping = True
}}}
--
--
Ticket URL: <https://code.djangoproject.com/ticket/24913#comment:3>
Django <https://code.djangoproject.com/>
The Web framework for perfectionists with deadlines.
--
You received this message because you are subscribed to the Google Groups
"Django updates" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To post to this group, send email to [email protected].
To view this discussion on the web visit
https://groups.google.com/d/msgid/django-updates/068.16a8b96d0bddc464ff4753cd591cc1b2%40djangoproject.com.
For more options, visit https://groups.google.com/d/optout.