Update example init

This commit is contained in:
Christian Kaisermann 2020-02-06 14:37:17 -03:00
parent bb406c1f79
commit bf22d1f0c3

View File

@ -1,4 +1,4 @@
import { register, init } from 'svelte-i18n'
import { register, init, getLocaleFromNavigator } from 'svelte-i18n'
register('en', () => import('../messages/en.json'))
register('pt-BR', () => import('../messages/pt-BR.json'))
@ -6,5 +6,5 @@ register('es-ES', () => import('../messages/es-ES.json'))
init({
fallbackLocale: 'en',
initialLocale: { navigator: true },
initialLocale: getLocaleFromNavigator(),
})