first
This commit is contained in:
commit
8538ab969a
434 changed files with 44051 additions and 0 deletions
10
apps/web/modules/i18n/lib/update-locale.ts
Normal file
10
apps/web/modules/i18n/lib/update-locale.ts
Normal file
|
|
@ -0,0 +1,10 @@
|
|||
"use server";
|
||||
|
||||
import { setLocaleCookie } from "@i18n/lib/locale-cookie";
|
||||
import type { Locale } from "@repo/i18n";
|
||||
import { revalidatePath } from "next/cache";
|
||||
|
||||
export async function updateLocale(locale: Locale) {
|
||||
await setLocaleCookie(locale);
|
||||
revalidatePath("/");
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue