13 lines
No EOL
381 B
TypeScript
13 lines
No EOL
381 B
TypeScript
import { browser } from '$app/environment'
|
|
import { init, register } from 'svelte-i18n'
|
|
|
|
const defaultLocale = 'en'
|
|
|
|
register('en', () => import('../locales/en.json'))
|
|
register('nl', () => import('../locales/nl.json'))
|
|
register('es', () => import('../locales/es.json'))
|
|
|
|
init({
|
|
fallbackLocale: defaultLocale,
|
|
initialLocale: browser ? window.navigator.language : defaultLocale,
|
|
}) |