Include language tag in html/@lang

This commit is contained in:
Jonas Schäfer
2020-03-07 16:56:15 +01:00
parent e07fbb0c97
commit af08f31cf3
2 changed files with 3 additions and 2 deletions

View File

@@ -28,7 +28,7 @@ babel = Babel(app)
@babel.localeselector
def select_locale():
def selected_locale():
return request.accept_languages.best_match(
current_app.config['LANGUAGES']
)
@@ -125,6 +125,7 @@ def proc():
return {
"url_for_avatar": url_for_avatar,
"text_to_css": colour.text_to_css,
"lang": selected_locale(),
}

View File

@@ -1,5 +1,5 @@
<!DOCTYPE html>
<html>
<html lang="{{ lang }}">
<head>
<meta charset="utf-8">
{% block head_lead %}{% endblock %}