]> Raphaël G. Git Repositories - airbundle/commitdiff
Add lang in html tag from request locale
authorRaphaël Gertz <git@rapsys.eu>
Wed, 9 Dec 2020 20:45:30 +0000 (21:45 +0100)
committerRaphaël Gertz <git@rapsys.eu>
Wed, 9 Dec 2020 20:45:30 +0000 (21:45 +0100)
Resources/views/base.html.twig

index e103e060347d33a4eb087a987af4cc99973634c8..638e2bcab68154bb56431ed43a4b8a7030b556c6 100644 (file)
@@ -1,5 +1,5 @@
 <!DOCTYPE html>
-<html{% if lang is defined and lang %} lang="{{ lang }}"{% endif %}>
+<html{% if app.request.locale is defined and app.request.locale %} lang="{{ app.request.locale }}"{% endif %}>
        <head>
                {% block metas %}<meta charset="UTF-8">{% endblock %}
                <title>{% block title %}Welcome!{% endblock %}</title>