svelte-i18n/Lang.svelte
2019-11-22 13:51:18 -03:00

12 lines
237 B
Svelte

<script>
import { locale, loading } from './dist/i18n.mjs'
$: {
if (typeof window !== 'undefined') {
document.documentElement.setAttribute('lang', $locale)
}
}
</script>
<slot loading={$loading} locale={$locale} />