Files
claudemesh/packages/i18n/src/config.ts
Alejandro Gutiérrez d3163a5bff feat(db): mesh data model — meshes, members, invites, audit log
- pgSchema "mesh" with 4 tables isolating the peer mesh domain
- Enums: visibility, transport, tier, role
- audit_log is metadata-only (E2E encryption enforced at broker/client)
- Cascade on mesh delete, soft-delete via archivedAt/revokedAt

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-04-04 21:19:32 +01:00

50 lines
1014 B
TypeScript

import { logger } from "@turbostarter/shared/logger";
import { env } from "./env";
import type { InitOptions, Namespace } from "i18next";
export const config = {
locales: ["en", "es"],
defaultLocale: env.NEXT_PUBLIC_DEFAULT_LOCALE,
namespaces: [
"common",
"admin",
"organization",
"dashboard",
"auth",
"billing",
"marketing",
"validation",
],
cookie: "locale",
} as const;
export const getInitOptions = ({
locale,
defaultLocale,
ns,
}: {
locale?: string;
defaultLocale?: string;
ns?: Namespace;
}): InitOptions => ({
supportedLngs: config.locales,
fallbackLng: defaultLocale ?? config.defaultLocale,
lng: locale,
defaultNS: config.namespaces,
fallbackNS: config.namespaces,
ns: ns ?? config.namespaces,
preload: false,
interpolation: {
escapeValue: false,
},
missingInterpolationHandler: (text, value, options) => {
logger.debug(
`Missing interpolation value for key: ${text}`,
value,
options,
);
},
});