Set the charset and the current language in the HTML head

<meta charset="utf-8"> keeps the encoding when a page is saved locally.
<html lang> now uses the language of the request instead of a fixed
"en", which matters for screen readers, hyphenation and the browser's
translation prompt.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
finnandClaude Opus 5.5 committed 2026-10-22 17:53:01 +00:00
1 parent 78702f133c
commit 7ba0253837
2 files changed
+3 -2

No files matched your search

+1 -1
View File
@@ -19,7 +19,7 @@ class TranslationHandler:
def init(cls, app):
cls.app = app
cls.always_reload_translations = app.debug
app.context_processor(lambda: dict(t=t))
app.context_processor(lambda: dict(t=t, language=cls.language))
@classmethod
def is_language_available(cls, language):