]>
Commit | Line | Data |
---|---|---|
8050f772 BB |
1 | import { addMessages, getLocaleFromNavigator, init } from 'svelte-i18n'; |
2 | ||
3 | import en from './translations/en.json'; | |
862a5f9c | 4 | import es from './translations/es.json'; |
8050f772 BB |
5 | |
6 | addMessages('en', en); | |
862a5f9c | 7 | addMessages('es', es); |
8050f772 BB |
8 | |
9 | init({ | |
10 | fallbackLocale: 'en', | |
a7cf03c1 | 11 | initialLocale: getLocaleFromNavigator().replace(/-[A-Z]{2}$/, '') |
8050f772 | 12 | }); |