feat(i18n): add i18n support

This commit is contained in:
JiPai
2024-11-08 01:32:46 +08:00
parent 237106428b
commit 0ca8ee17be
9 changed files with 145 additions and 2 deletions

View File

@@ -0,0 +1,6 @@
import type { NextApiRequestCookies } from "next/dist/server/api-utils";
export function getLocale(cookies: NextApiRequestCookies) {
const locale = cookies.DOKPLOY_LOCALE ?? "en";
return locale;
}