Opened 12 years ago

Last modified 11 years ago

#16075 closed Bug

Django 1.3 new "localize" tag/filter doesn't work? — at Version 1

Reported by: sci.feng@… Owned by: nobody
Component: Documentation Version: 1.3
Severity: Normal Keywords: dceu2011
Cc: Triage Stage: Ready for checkin
Has patch: yes Needs documentation: no
Needs tests: no Patch needs improvement: no
Easy pickings: no UI/UX: no

Description (last modified by Jannis Leidel)

I've noticed that Django 1.3 introduced the new "localize" tag/filter.

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!

Change History (1)

comment:1 Changed 12 years ago by Jannis Leidel

Component: Template systemDocumentation
Description: modified (diff)
Triage Stage: UnreviewedAccepted

Simply put, this is a documentation issue. You need to load the template tag library first ({% load l10n %}), as mentioned here:

Note: See TracTickets for help on using tickets.
Back to Top