refactor(dokploy): update i18next build

This commit is contained in:
Mauricio Siu
2024-11-17 11:04:15 -06:00
parent b1f7d05743
commit 56ea356723
6 changed files with 13 additions and 9 deletions

View File

@@ -4,3 +4,12 @@ export function getLocale(cookies: NextApiRequestCookies) {
const locale = cookies.DOKPLOY_LOCALE ?? "en";
return locale;
}
// libs/i18n.js
import { serverSideTranslations as originalServerSideTranslations } from "next-i18next/serverSideTranslations";
import nextI18NextConfig from "../next-i18next.config.cjs";
export const serverSideTranslations = (
locale: string,
namespaces = ["common"],
) => originalServerSideTranslations(locale, namespaces, nextI18NextConfig);