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

13 lines
224 B
Svelte

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