From b1736548c890050a353ced11166861d59fa22869 Mon Sep 17 00:00:00 2001 From: Alem Tuzlak Date: Thu, 20 Feb 2025 14:19:32 +0100 Subject: [PATCH 1/2] Fix for server translations not working properly --- app/localization/i18n.server.ts | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/app/localization/i18n.server.ts b/app/localization/i18n.server.ts index fedcd4058..e9dc7382b 100644 --- a/app/localization/i18n.server.ts +++ b/app/localization/i18n.server.ts @@ -1,6 +1,6 @@ -import { resolve } from "node:path" import { RemixI18Next } from "remix-i18next/server" import i18n from "~/localization/i18n" // your i18n configuration file +import { resources } from "./resource" const i18next = new RemixI18Next({ detection: { @@ -11,9 +11,7 @@ const i18next = new RemixI18Next({ // when translating messages server-side only i18next: { ...i18n, - backend: { - loadPath: resolve("./public/locales/{{lng}}/{{ns}}.json"), - }, + resources }, }) From 1e9245db6ade83d2fe858e263edde180bb273b54 Mon Sep 17 00:00:00 2001 From: Alem Tuzlak Date: Thu, 20 Feb 2025 14:21:04 +0100 Subject: [PATCH 2/2] fix --- app/localization/i18n.server.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/localization/i18n.server.ts b/app/localization/i18n.server.ts index e9dc7382b..f92e0b7d5 100644 --- a/app/localization/i18n.server.ts +++ b/app/localization/i18n.server.ts @@ -11,7 +11,7 @@ const i18next = new RemixI18Next({ // when translating messages server-side only i18next: { ...i18n, - resources + resources, }, })