updated welsh translations
This commit is contained in:
+7
-2
@@ -2,6 +2,7 @@ import Document, { Html, Head, Main, NextScript } from "next/document";
|
||||
import SkipLink from "../components/skiplink";
|
||||
import { Tracking, TrackingNoScript } from "../components/tracking";
|
||||
import { nanoid } from "nanoid";
|
||||
import { setCookie } from "nookies";
|
||||
|
||||
class MyDocument extends Document {
|
||||
static async getInitialProps(ctx) {
|
||||
@@ -19,12 +20,16 @@ class MyDocument extends Document {
|
||||
useGATracking = false;
|
||||
}
|
||||
|
||||
setCookie(ctx, "pedw_locale", ctx.locale, {
|
||||
path: "/",
|
||||
});
|
||||
|
||||
return { ...initialProps, useGATracking };
|
||||
}
|
||||
|
||||
render() {
|
||||
const googleTagManagerID = process.env.GOOGLE_TAG_MANAGER || null;
|
||||
const { useGATracking } = this.props;
|
||||
const { useGATracking, locale } = this.props;
|
||||
|
||||
const generatedNonce = nanoid();
|
||||
|
||||
@@ -39,7 +44,7 @@ class MyDocument extends Document {
|
||||
csp += `style-src 'self' https://fonts.googleapis.com 'unsafe-inline' data:;`;
|
||||
|
||||
return (
|
||||
<Html lang="en">
|
||||
<Html lang={locale}>
|
||||
<Head>
|
||||
<meta httpEquiv="Content-Security-Policy" content={csp} />
|
||||
{useGATracking && (
|
||||
|
||||
Reference in New Issue
Block a user