diff --git a/lib/client/getServerSideProps.ts b/lib/client/getServerSideProps.ts index b208f3e..01e204b 100644 --- a/lib/client/getServerSideProps.ts +++ b/lib/client/getServerSideProps.ts @@ -20,7 +20,7 @@ const getServerSideProps: GetServerSideProps = async (ctx) => { if (user) { return { props: { - ...(await serverSideTranslations(user.locale ?? "en", ["common"])), + ...(await serverSideTranslations(user.locale ?? i18n.defaultLocale, ["common"])), }, }; } @@ -49,7 +49,7 @@ const getServerSideProps: GetServerSideProps = async (ctx) => { return { props: { - ...(await serverSideTranslations(bestMatch ?? "en", ["common"])), + ...(await serverSideTranslations(bestMatch ?? i18n.defaultLocale, ["common"])), }, }; }; diff --git a/pages/login.tsx b/pages/login.tsx index e1b530c..bf4526a 100644 --- a/pages/login.tsx +++ b/pages/login.tsx @@ -290,7 +290,7 @@ const getServerSideProps: GetServerSideProps = async (ctx) => { return { props: { availableLogins, - ...(await serverSideTranslations(user.locale ?? "en", ["common"])), + ...(await serverSideTranslations(user.locale ?? i18n.defaultLocale, ["common"])), }, }; } @@ -320,7 +320,7 @@ const getServerSideProps: GetServerSideProps = async (ctx) => { return { props: { availableLogins, - ...(await serverSideTranslations(bestMatch ?? "en", ["common"])), + ...(await serverSideTranslations(bestMatch ?? i18n.defaultLocale, ["common"])), }, }; }; diff --git a/pages/register.tsx b/pages/register.tsx index 282558b..066e0d7 100644 --- a/pages/register.tsx +++ b/pages/register.tsx @@ -337,7 +337,7 @@ const getServerSideProps: GetServerSideProps = async (ctx) => { return { props: { availableLogins, - ...(await serverSideTranslations(user.locale ?? "en", ["common"])), + ...(await serverSideTranslations(user.locale ?? i18n.defaultLocale, ["common"])), }, }; } @@ -367,7 +367,7 @@ const getServerSideProps: GetServerSideProps = async (ctx) => { return { props: { availableLogins, - ...(await serverSideTranslations(bestMatch ?? "en", ["common"])), + ...(await serverSideTranslations(bestMatch ?? i18n.defaultLocale, ["common"])), }, }; };