feat: Wabenhain Honig-Shop Anwendung
Vollstaendige Next.js/Prisma-E-Commerce-Anwendung fuer eine Imkerei: Shop, Warenkorb, Stripe-Checkout, Kundenkonto mit 2FA, Admin-Bereich (Produkte, Ernten, Chargen, Bestellungen, Gutscheine, admin-editierbare Website-Inhalte), i18n (DE/EN), Rate-Limiting/CSP/Audit-Log-Haertung, PostgreSQL- und MySQL-Unterstuetzung ueber austauschbare Prisma- Treiber-Adapter, Unit-/Komponenten-/E2E-Tests.
This commit is contained in:
1 parent
5c76fcc266
commit
c7927f2883
240 files changed
+26096
-137
No files matched your search
@@ -0,0 +1,21 @@
|
||||
// Zentrale Sprachkonfiguration: um eine weitere Sprache zu ergaenzen, genuegt
|
||||
// es, sie hier zur locales-Liste hinzuzufuegen und eine passende Datei unter
|
||||
// dictionaries/<code>.ts anzulegen (siehe dictionaries/en.ts als Vorlage) —
|
||||
// get-dictionary.ts, der LanguageSwitcher und alle Verbraucher der
|
||||
// Dictionary lesen die Liste dynamisch, kein Code an anderer Stelle muss
|
||||
// angepasst werden.
|
||||
export const locales = ["de", "en"] as const;
|
||||
export type Locale = (typeof locales)[number];
|
||||
|
||||
export const defaultLocale: Locale = "de";
|
||||
|
||||
export const localeLabels: Record<Locale, string> = {
|
||||
de: "Deutsch",
|
||||
en: "English",
|
||||
};
|
||||
|
||||
export const LOCALE_COOKIE = "locale";
|
||||
|
||||
export function isLocale(value: string | undefined | null): value is Locale {
|
||||
return !!value && (locales as readonly string[]).includes(value);
|
||||
}
|
||||
Reference in new issue
Block a user