Added language from localizations to HTML tag

This commit is contained in:
squidfunk 2017-04-22 14:51:41 +02:00 committed by Martin Donath
parent eea31eb528
commit 6336e5055c
5 changed files with 5 additions and 2 deletions

View File

@ -362,6 +362,7 @@ macro `t`:
``` jinja ``` jinja
{% macro t(key) %}{{ { {% macro t(key) %}{{ {
"language": "en",
"edit.link.title": "Edit this page", "edit.link.title": "Edit this page",
"footer.previous": "Previous", "footer.previous": "Previous",
"footer.next": "Next", "footer.next": "Next",

View File

@ -1,6 +1,6 @@
{% import "partials/language.html" as lang %} {% import "partials/language.html" as lang %}
<!DOCTYPE html> <!DOCTYPE html>
<html class="no-js"> <html lang="{{ lang.t('language') }}" class="no-js">
<head> <head>
{% block site_meta %} {% block site_meta %}
<meta charset="utf-8"> <meta charset="utf-8">

View File

@ -1,4 +1,5 @@
{% macro t(key) %}{{ { {% macro t(key) %}{{ {
"language": "en",
"edit.link.title": "Edit this page", "edit.link.title": "Edit this page",
"footer.previous": "Previous", "footer.previous": "Previous",
"footer.next": "Next", "footer.next": "Next",

View File

@ -23,7 +23,7 @@
{% import "partials/language.html" as lang %} {% import "partials/language.html" as lang %}
<!DOCTYPE html> <!DOCTYPE html>
<html class="no-js"> <html lang="{{ lang.t('language') }}" class="no-js">
<head> <head>
<!-- Block: metatags --> <!-- Block: metatags -->

View File

@ -22,6 +22,7 @@
<!-- Translations --> <!-- Translations -->
{% macro t(key) %}{{ { {% macro t(key) %}{{ {
"language": "en",
"edit.link.title": "Edit this page", "edit.link.title": "Edit this page",
"footer.previous": "Previous", "footer.previous": "Previous",
"footer.next": "Next", "footer.next": "Next",