{# Base template for edX-specific pages. #}

{% load i18n %}
{% load statici18n %}
{% load render_bundle from webpack_loader %}

<!DOCTYPE html>
{% language render_language %}
<html lang="{{render_language}}">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>{% block title %}{% endblock title %}</title>

    {% if LANGUAGE_BIDI %}
      {% render_bundle 'base.style-rtl' 'css' %}
    {% else %}
      {% render_bundle 'base.style-ltr' 'css' %}
    {% endif %}

    <script src="{% statici18n render_language %}"></script>

    {# Hook for credentials themes to overwrite. #}
    {% block theme_meta %}
    {% endblock %}

    {% block stylesheets %}
    {% endblock %}
</head>
<body>
{% block content %}
    <div class="wrapper-view" dir="{% if LANGUAGE_BIDI %}rtl{% else %}ltr{% endif %}">
        {% block header %}
          {% include '_header.html' %}
        {% endblock header %}

        {% block wrapper_content %}
        {% endblock wrapper_content %}
    </div>
{% endblock content %}

<script type="application/javascript">
    window.edx = {};
</script>

{% include '_analytics.html' %}

{% block javascript %}{% endblock %}
</body>
</html>
{% endlanguage %}

{# Base template for edX-specific pages. #}

{% load i18n %}
{% load statici18n %}
{% load render_bundle from webpack_loader %}

<!DOCTYPE html>
{% with render_language|default:"en" as page_language %}
{% language page_language %}
<html lang="{{page_language}}">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>{% block title %}{% endblock title %}</title>

    {% if LANGUAGE_BIDI %}
      {% render_bundle 'base.style-rtl' 'css' %}
    {% else %}
      {% render_bundle 'base.style-ltr' 'css' %}
    {% endif %}

    <script src="{% statici18n page_language %}"></script>

    {# Hook for credentials themes to overwrite. #}
    {% block theme_meta %}
    {% endblock %}

    {% block stylesheets %}
    {% endblock %}
</head>
<body>
{% block content %}
    <div class="wrapper-view" dir="{% if LANGUAGE_BIDI %}rtl{% else %}ltr{% endif %}">
        {% block header %}
          {% include '_header.html' %}
        {% endblock header %}

        {% block wrapper_content %}
        {% endblock wrapper_content %}
    </div>
{% endblock content %}

<script type="application/javascript">
    window.edx = {};
</script>

{% include '_analytics.html' %}

{% block javascript %}{% endblock %}
</body>
</html>
{% endlanguage %}
{% endwith %}
Set default for render_language to avoid 404s if language isn't set
Set default for render_language to avoid 404s if language isn't set
