Skip to content

Commit

Permalink
Update README.md
Browse files Browse the repository at this point in the history
  • Loading branch information
jarda-svoboda committed Jul 6, 2023
1 parent 7c2d3f8 commit e5bcf9c
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 5 deletions.
6 changes: 2 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -82,10 +82,9 @@ const config = ({
export const { t, locale, locales, loading, loadTranslations } = new i18n(config);
```

...load your translations in `__layout.svelte`...
...load your translations in `+layout.js`...

```svelte
<script context="module">
```js
import { locale, loadTranslations } from '$lib/translations';

export const load = async ({ url }) => {
Expand All @@ -99,7 +98,6 @@ export const { t, locale, locales, loading, loadTranslations } = new i18n(config

return {};
}
</script>
```

...and include your translations within pages and components.
Expand Down
1 change: 0 additions & 1 deletion docs/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,6 @@ Custom preprocess function `(input) => JSON.parse(JSON.stringify(input).replace(
{"a": {"b": [{"c": {"d": "🦄"}}, {"c": {"d": 2}}]}}
```


### `parser`: __[Parser.T](https://github.com/sveltekit-i18n/base/blob/master/src/types.ts)__
This property defines translation syntax you want to use. For more, see [Parsers](https://github.com/sveltekit-i18n/parsers#readme).

Expand Down

0 comments on commit e5bcf9c

Please sign in to comment.