From 6064bf0a93c864dc1337c3b50868414c34952bab Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E7=A7=91=E7=A7=91?= Date: Tue, 16 May 2023 10:17:23 +0800 Subject: [PATCH] docs: update `defineI18nLocale` parameters in lazy-load-translations (#2062) --- docs/content/2.guide/8.lazy-load-translations.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/docs/content/2.guide/8.lazy-load-translations.md b/docs/content/2.guide/8.lazy-load-translations.md index d61421fbe..bba6433ba 100755 --- a/docs/content/2.guide/8.lazy-load-translations.md +++ b/docs/content/2.guide/8.lazy-load-translations.md @@ -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' } @@ -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}`) })