[Django]-Change the language attrib in HTML tag based on user's language Django Wagtail

4👍

Use the get_current_language tag:

<!doctype html>
{% load i18n %}
{% get_current_language as LANGUAGE_CODE %}
<html class="no-js" lang="{{ LANGUAGE_CODE }}">
👤gasman

Leave a comment