Skip to content

Commit

Permalink
docs: update defineI18nLocale parameters in lazy-load-translations (#…
Browse files Browse the repository at this point in the history
  • Loading branch information
Bernankez authored May 16, 2023
1 parent 4ea4909 commit 6064bf0
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions docs/content/2.guide/8.lazy-load-translations.md
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ export default defineNuxtConfig({
```

```ts {}[lang/fr-FR.ts]
export default defineI18nLocale(async (context, locale) => {
export default defineI18nLocale(async (locale) => {
return {
welcome: 'Welcome'
}
Expand Down Expand Up @@ -92,7 +92,7 @@ If you want to use it, you must set the `experimental.jsTsFormatResource` module
If the function returns an Object available in nuxt i18n module, you can configure the dynamic locale messages, like the API (including external API) or back-end, via fetch:

```js
export default defineI18nLocale((context, locale) => {
export default defineI18nLocale((locale) => {
// for example, fetch locale messages from nuxt server
return $fetch(`/api/${locale}`)
})
Expand Down

0 comments on commit 6064bf0

Please sign in to comment.