Skip to content

Commit

Permalink
docs: remove isLocaleLoading reference
Browse files Browse the repository at this point in the history
  • Loading branch information
ivanhofer committed Apr 23, 2023
1 parent 2c1d171 commit e91796f
Showing 1 changed file with 1 addition and 21 deletions.
22 changes: 1 addition & 21 deletions packages/adapter-svelte/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -56,9 +56,8 @@ Then inside your root-component, you need to load your locales and call `setLoca
import { setLocale } from './i18n/i18n-svelte'
// TODO: load locales (https://github.com/ivanhofer/typesafe-i18n/tree/main/packages/generator#loading-locales)
// e.g. take a look at the example implementation (https://github.com/ivanhofer/typesafe-i18n-demo-svelte/blob/master/src/App.svelte#L20)
setLocale('en')
setLocale()
</script>

<!-- HTML markup -->
Expand Down Expand Up @@ -167,25 +166,6 @@ If you want to change the locale, you need to call `setLocale` with the locale a
</div>
```

### isLocaleLoading

Svelte store that returns a `boolean`. It can be used to wait for the locale to be loaded.

```html
<script>
import { isLocaleLoading } from './i18n/i18n-svelte'
</script>

{#if $isLocaleLoading}
loading...
{:else}

<!-- your app code goes here -->

{/if}
```


<!-- ------------------------------------------------------------------------------------------ -->
<!-- ------------------------------------------------------------------------------------------ -->
<!-- ------------------------------------------------------------------------------------------ -->
Expand Down

0 comments on commit e91796f

Please sign in to comment.