Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

docs: fix path in lazy-load translations #3215

Merged
merged 1 commit into from
Nov 13, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
20 changes: 11 additions & 9 deletions docs/content/docs/2.guide/7.lazy-load-translations.md
Original file line number Diff line number Diff line change
Expand Up @@ -19,9 +19,10 @@ Example files structure:
```bash
-| nuxt-project/
---| i18n/
-----| en-US.json
-----| es-ES.js
-----| fr-FR.js
-----| locales/
-------| en-US.json
-------| es-ES.js
-------| fr-FR.js
---| nuxt.config.ts
```

Expand Down Expand Up @@ -50,7 +51,7 @@ export default defineNuxtConfig({
})
```

```ts [lang/fr-FR.ts]
```ts [i18n/locales/fr-FR.ts]
export default defineI18nLocale(async locale => {
return {
welcome: 'Bienvenue'
Expand Down Expand Up @@ -96,11 +97,12 @@ The following is an example of a lang directory containing locale files for the
```bash
-| nuxt-project/
---| i18n/
-----| es.json # locale messages for common Spanish
-----| es-AR.json # locale messages for Argentina
-----| es-UY.json # locale messages for Uruguay
-----| es-US.json # locale messages for Estados Unidos
-----| ... # other countries
-----| locales/
-------| es.json # locale messages for common Spanish
-------| es-AR.json # locale messages for Argentina
-------| es-UY.json # locale messages for Uruguay
-------| es-US.json # locale messages for Estados Unidos
-------| ... # other countries
---| nuxt.config.ts
```

Expand Down