From: Yuri Pieters Date: Sun, 11 Jun 2023 15:21:41 +0000 (+0100) Subject: Set html lang attr to the interface language X-Git-Url: http://these/git/%22https:/nerdica.net/README.ja.md?a=commitdiff_plain;h=10a29f053f21a66de097c12eb97844adeaa89626;p=lemmy-ui.git Set html lang attr to the interface language --- diff --git a/src/server/index.tsx b/src/server/index.tsx index 1fab13d..b7f4fb5 100644 --- a/src/server/index.tsx +++ b/src/server/index.tsx @@ -346,7 +346,7 @@ async function createSsrHtml(root: string, isoData: IsoDataOptionalSite) { return ` - + diff --git a/src/shared/components/common/html-tags.tsx b/src/shared/components/common/html-tags.tsx index 4c673d9..0e6cb2d 100644 --- a/src/shared/components/common/html-tags.tsx +++ b/src/shared/components/common/html-tags.tsx @@ -2,7 +2,7 @@ import { htmlToText } from "html-to-text"; import { Component } from "inferno"; import { Helmet } from "inferno-helmet"; import { httpExternalPath } from "../../env"; -import { md } from "../../utils"; +import { getLanguages, md } from "../../utils"; interface HtmlTagsProps { title: string; @@ -17,9 +17,12 @@ export class HtmlTags extends Component { const url = httpExternalPath(this.props.path); const desc = this.props.description; const image = this.props.image; + const lang = getLanguages()[0]; return ( + + {["title", "og:title", "twitter:title"].map(t => ( ))}