mirror of
https://github.com/Sendouc/sendou.ink.git
synced 2026-05-26 13:28:25 -05:00
* Initial * Faster user page * Remove redundant function * Favorite badge sorting * Upgrade deps * Simplify entry.server * Bun tests initial * Update package.json npm -> bun * Update README * Type safe translations again * Don't load streams info for finalized tournaments * Translations as an object * More unit test work * Convert match.server.test * test * test * test * test * test * test * test * test * test * test * test * test * test * test * test * test * test * Test & all done * Working cf * Bun GA try * No cache * spacing * spacing 2 * Add SQL logging * Remove NR * Hmm * Hmm 2 * Interesting * SKALOP_SYSTEM_MESSAGE_URL * . * . * ? * . * ? * Server.ts adjust * Downgrade Tldraw * E2E test fix * Fix lint
27 lines
595 B
TypeScript
27 lines
595 B
TypeScript
import { createCookie } from "@remix-run/node";
|
|
import { RemixI18Next } from "remix-i18next/server";
|
|
import { config } from "./config";
|
|
import { resources } from "./resources.server";
|
|
|
|
const TEN_YEARS_IN_SECONDS = 31_536_000 * 10;
|
|
|
|
export const i18nCookie = createCookie("i18n", {
|
|
sameSite: "lax",
|
|
path: "/",
|
|
maxAge: TEN_YEARS_IN_SECONDS,
|
|
});
|
|
|
|
export const i18next = new RemixI18Next({
|
|
detection: {
|
|
cookie: i18nCookie,
|
|
supportedLanguages: config.supportedLngs,
|
|
fallbackLanguage: config.fallbackLng,
|
|
},
|
|
i18next: {
|
|
...config,
|
|
resources: resources,
|
|
},
|
|
});
|
|
|
|
export default i18next;
|