|language_bidi Filter

says whether a language is right-to-left.

Logic As Markdown

Argument
code (required)
Requires
{% load i18n %}

Documentation

True when the given language is written right to left.

Template

{% load i18n %}
{% if lang.code|language_bidi %}dir="rtl"{% endif %}

The per-language answer to what {% get_current_language_bidi %} tells you about the active one.

More Logic Filters

All Logic Filters


Did we get something wrong? Is there a use case for the language_bidi filter that we should add? Please let us know.

Send Feedback

Official Documentation
This page last updated on August 20, 2026