]> git.r.bdr.sh - rbdr/forum/blame - src/lib/i18n.ts
Remove outdated docs
[rbdr/forum] / src / lib / i18n.ts
CommitLineData
8050f772
BB
1import { addMessages, getLocaleFromNavigator, init } from 'svelte-i18n';
2
3import en from './translations/en.json';
862a5f9c 4import es from './translations/es.json';
8050f772
BB
5
6addMessages('en', en);
862a5f9c 7addMessages('es', es);
8050f772
BB
8
9init({
cac85db0
RBR
10 fallbackLocale: 'en',
11 initialLocale: getLocaleFromNavigator().replace(/-[A-Z]{2}$/, '')
8050f772 12});