svelte-i18n/Lang.svelte

12 lines
237 B
Svelte
Raw Normal View History

2019-11-19 22:23:20 +01:00
<script>
import { locale, loading } from './dist/i18n.mjs'
2019-11-19 22:23:20 +01:00
$: {
if (typeof window !== 'undefined') {
document.documentElement.setAttribute('lang', $locale)
}
}
</script>
<slot loading={$loading} locale={$locale} />