livrare website cu erp si crm

This commit is contained in:
DP Software services 2026-07-28 14:47:28 +03:00
parent 28773e3a72
commit 5c7bf7c295
257 changed files with 31929 additions and 0 deletions

21
website/src/i18n/index.ts Normal file
View file

@ -0,0 +1,21 @@
import ro from "./ro.json";
import en from "./en.json";
export type Locale = "ro" | "en";
export const LOCALE_COOKIE = "didi_locale";
export const LOCALE_COOKIE_MAX_AGE = 60 * 60 * 24 * 365; // 1 year
export const SUPPORTED_LOCALES: Locale[] = ["ro", "en"];
export const DEFAULT_LOCALE: Locale = "ro";
const dictionaries: Record<Locale, typeof ro> = { ro, en };
export function getDictionary(locale: Locale) {
return dictionaries[locale] || dictionaries[DEFAULT_LOCALE];
}
export function isLocale(value: string | undefined | null): value is Locale {
return value === "ro" || value === "en";
}
export type Dictionary = typeof ro;