diff --git a/app.py b/app.py index 1f49c87..a888e7c 100644 --- a/app.py +++ b/app.py @@ -4486,6 +4486,9 @@ def api_submit(): @app.route("/beitrag/") def public_detail(sub_id: int): + lang = request.args.get("lang", "de") + if lang not in ("de", "en", "fr", "es"): + lang = "de" """Public detail view — full media, text, and metadata.""" import base64 db = get_db() @@ -4558,7 +4561,10 @@ def public_detail(sub_id: int): except Exception: pass - content = (row["summary"] or row["content"] or "").strip() + # ── Mehrsprachigkeit ── + translation = get_translated_content(db, sub_id, lang, row) + content = translation["content"] + display_text = translation["display_text"] # Comments comment_rows = db.execute( diff --git a/src/app.py b/src/app.py index 2869c1b..b659c64 100644 --- a/src/app.py +++ b/src/app.py @@ -3323,7 +3323,7 @@ def public_frontend(): -