---
title: '{% localize %}'
description: turns localized formatting on or off for a block.
date: '2026-08-21'
categories:
  - Template Tag
  - Formatting
canonical: https://djangotemplatetagsandfilters.com/tags/localize/
doc_link: >-
  https://docs.djangoproject.com/en/6.1/topics/i18n/formatting/#std-templatetag-localize
---

# {% localize %}

turns localized formatting on or off for a block.

## Documentation

Turns locale-aware formatting on or off for everything inside it, rather than one value at a time.

### Template

```django
{% load l10n %}
{% localize off %}
  {{ value }}
{% endlocalize %}
```

`off` is the one people want: a number headed for JavaScript, a CSV, or an HTML attribute has to stay machine-readable, and a comma decimal separator quietly breaks all three.
