#16075: Django 1.3 new "localize" tag/filter doesn't work?
--------------------------------------+-------------------------------
               Reporter:  sci.feng@…  |          Owner:  nobody
                   Type:  Bug         |         Status:  new
              Milestone:              |      Component:  Documentation
                Version:  1.3         |       Severity:  Normal
             Resolution:              |       Keywords:
           Triage Stage:  Accepted    |      Has patch:  0
    Needs documentation:  0           |    Needs tests:  0
Patch needs improvement:  0           |  Easy pickings:  0
--------------------------------------+-------------------------------
Changes (by jezdez):

 * needs_better_patch:   => 0
 * component:  Template system => Documentation
 * needs_tests:   => 0
 * needs_docs:   => 0
 * stage:  Unreviewed => Accepted


Old description:

> I've noticed that Django 1.3 introduced the new "localize" tag/filter.
> http://docs.djangoproject.com/en/1.3/topics/i18n/localization/
>
> It says:
>
>     To activate or deactivate localization for a template block, use:
>
>     {% localize on %}
>         {{ value }}
>     {% endlocalize %}
>
>     {% localize off %}
>         {{ value }}
>     {% endlocalize %}
>
> However I always got the error message:
>
>     Invalid block tag: 'localize'
>
> Looks like the "localize" filter doesn't work as well. Can anybody help
> me? Or can anybody else confirm if this is a bug? Thanks!

New description:

 I've noticed that Django 1.3 introduced the new "localize" tag/filter.
 http://docs.djangoproject.com/en/1.3/topics/i18n/localization/

 It says:

 {{{
     To activate or deactivate localization for a template block, use:

     {% localize on %}
         {{ value }}
     {% endlocalize %}

     {% localize off %}
         {{ value }}
     {% endlocalize %}
 }}}

 However I always got the error message:

     Invalid block tag: 'localize'

 Looks like the "localize" filter doesn't work as well. Can anybody help
 me? Or can anybody else confirm if this is a bug? Thanks!

--

Comment:

 Simply put, this is a documentation issue. You need to load the template
 tag library first (`{% load l10n %}`), as mentioned here:
 http://docs.djangoproject.com/en/1.3/ref/templates/builtins/#l10n

-- 
Ticket URL: <https://code.djangoproject.com/ticket/16075#comment:1>
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 post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/django-updates?hl=en.

Reply via email to