This commit is contained in:
unurled 2025-07-06 14:56:36 +02:00
parent 764d0c0526
commit ac111154fe
7 changed files with 183 additions and 0 deletions

12
src/lib/i18n/index.ts Normal file
View file

@ -0,0 +1,12 @@
import { browser } from '$app/environment';
import { init, register } from 'svelte-i18n';
const defaultLocale = 'en';
register('en', () => import('./locales/en.json'));
register('fr', () => import('./locales/fr.json'));
init({
fallbackLocale: defaultLocale,
initialLocale: browser ? window.navigator.language : defaultLocale
});

View file

View file