spb/wp-spboucher-ai
Public
1import "server-only";2import { headers } from "next/headers";3import { cache } from "react";4import { pickLocale, t, type Locale } from "./index";5export const getLocale = cache(async (): Promise<Locale> => pickLocale((await headers()).get("x-locale")));6export async function getT() { const locale = await getLocale(); return { locale, t: t(locale) }; }7