Files
landing/src/i18n/locale.ts
T
anthony 2606508713 feat: add i18n dictionaries and service data
Locale-aware EN/FR string dictionaries and the two-service data model
(CVE Watch with per-locale URLs, Convert with a single URL).
2026-08-02 15:51:45 +02:00

12 lines
318 B
TypeScript

export type Locale = 'en' | 'fr';
export const locales: Locale[] = ['en', 'fr'];
export function otherLocale(locale: Locale): Locale {
return locale === 'en' ? 'fr' : 'en';
}
export function swapLocalePath(pathname: string, from: Locale, to: Locale): string {
return pathname.replace(`/${from}/`, `/${to}/`);
}