Preferred Languages

Reactive Navigator Languages.

Usage

<script>
    import { preferredLang } from "@sveu/browser"

    const lang = preferredLang()
</script>
<script>
    import { preferredLang } from "@sveu/browser"

    const lang = preferredLang()
</script>
svelte

Example

Lang: en

<script >
    import { preferredLang } from "@sveu/browser"

    const lang = preferredLang()
</script>

<h1 class="text-center">Lang: {$lang}</h1>
<script >
    import { preferredLang } from "@sveu/browser"

    const lang = preferredLang()
</script>

<h1 class="text-center">Lang: {$lang}</h1>
svelte
1
2
3
4
5
6
7
Click fold/expand code