Initial commit: fristy.net personal site
Build & Push / Lint & Build (push) Successful in 1m15s
Build & Push / Build & Push Image (push) Successful in 52s

This commit is contained in:
fristy committed 2026-09-10 04:59:12 +03:00
commit ad943fff8c
51 files changed
+6052

No files matched your search

+11
View File
@@ -0,0 +1,11 @@
import { cookies } from "next/headers";
import { DEFAULT_LOCALE, LOCALE_COOKIE, isLocale, type Locale } from "./locales";
export async function getLocale(): Promise<Locale> {
const store = await cookies();
const raw = store.get(LOCALE_COOKIE)?.value;
if (raw && isLocale(raw)) {
return raw;
}
return DEFAULT_LOCALE;
}