Added lang store

This commit is contained in:
Alexis
2025-03-20 15:44:11 +01:00
parent e70841e7b4
commit 99aa951d47
7 changed files with 91 additions and 16 deletions

8
src/i18n/store.ts Normal file
View File

@@ -0,0 +1,8 @@
import { type Language } from './ui';
import { persistentAtom } from '@nanostores/persistent';
export const currentLang = persistentAtom<Language>('lang', "fr");
export function setLang(lang: Language) {
currentLang.set(lang);
}