{% get_current_language %} Tag

puts the active language code in a variable.

Utility As Markdown

Argument(s)
as varname
Closing tag
Not required
Requires
{% load i18n %}

Documentation

The language code currently in effect, for marking the selected entry in a switcher or setting lang on the page.

Template

{% load i18n %}
{% get_current_language as LANGUAGE_CODE %}
<html lang="{{ LANGUAGE_CODE }}">

More Utility Tags

All Utility Tags


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

Send Feedback

Official Documentation
This page last updated on August 20, 2026