@intlayer/docs 8.3.0-canary.4 → 8.3.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/docs/ar/compiler.md +84 -49
- package/docs/ar/configuration.md +80 -37
- package/docs/ar/intlayer_with_nextjs_16.md +174 -1
- package/docs/ar/intlayer_with_nextjs_compiler.md +174 -1
- package/docs/ar/intlayer_with_react_router_v7.md +224 -1
- package/docs/ar/intlayer_with_react_router_v7_fs_routes.md +225 -1
- package/docs/ar/intlayer_with_svelte_kit.md +175 -2
- package/docs/ar/intlayer_with_tanstack.md +176 -1
- package/docs/ar/intlayer_with_vite+preact.md +174 -1
- package/docs/ar/intlayer_with_vite+react.md +174 -1
- package/docs/ar/intlayer_with_vite+solid.md +174 -1
- package/docs/ar/intlayer_with_vite+svelte.md +174 -1
- package/docs/ar/intlayer_with_vite+vue.md +174 -1
- package/docs/de/compiler.md +83 -48
- package/docs/de/configuration.md +434 -212
- package/docs/de/intlayer_with_nextjs_16.md +176 -1
- package/docs/de/intlayer_with_nextjs_compiler.md +106 -349
- package/docs/de/intlayer_with_react_router_v7.md +225 -2
- package/docs/de/intlayer_with_react_router_v7_fs_routes.md +221 -79
- package/docs/de/intlayer_with_svelte_kit.md +158 -2
- package/docs/de/intlayer_with_tanstack.md +159 -1
- package/docs/de/intlayer_with_vite+preact.md +157 -1
- package/docs/de/intlayer_with_vite+react.md +157 -1
- package/docs/de/intlayer_with_vite+solid.md +159 -3
- package/docs/de/intlayer_with_vite+svelte.md +157 -1
- package/docs/de/intlayer_with_vite+vue.md +157 -1
- package/docs/en/compiler.md +60 -33
- package/docs/en/configuration.md +80 -57
- package/docs/en/intlayer_with_nextjs_16.md +176 -0
- package/docs/en/intlayer_with_nextjs_compiler.md +179 -1
- package/docs/en/intlayer_with_react_router_v7.md +159 -0
- package/docs/en/intlayer_with_react_router_v7_fs_routes.md +159 -0
- package/docs/en/intlayer_with_svelte_kit.md +159 -0
- package/docs/en/intlayer_with_tanstack.md +160 -1
- package/docs/en/intlayer_with_vite+preact.md +159 -0
- package/docs/en/intlayer_with_vite+react.md +159 -0
- package/docs/en/intlayer_with_vite+solid.md +148 -27
- package/docs/en/intlayer_with_vite+svelte.md +159 -0
- package/docs/en/intlayer_with_vite+vue.md +142 -41
- package/docs/en-GB/compiler.md +66 -34
- package/docs/en-GB/configuration.md +78 -36
- package/docs/es/compiler.md +83 -48
- package/docs/es/configuration.md +429 -206
- package/docs/es/intlayer_with_adonisjs.md +1 -1
- package/docs/es/intlayer_with_express.md +1 -1
- package/docs/es/intlayer_with_fastify.md +1 -1
- package/docs/es/intlayer_with_hono.md +1 -1
- package/docs/es/intlayer_with_nestjs.md +1 -1
- package/docs/es/intlayer_with_nextjs_16.md +176 -3
- package/docs/es/intlayer_with_nextjs_compiler.md +175 -2
- package/docs/es/intlayer_with_nuxt.md +1 -1
- package/docs/es/intlayer_with_react_router_v7.md +227 -4
- package/docs/es/intlayer_with_react_router_v7_fs_routes.md +162 -4
- package/docs/es/intlayer_with_svelte_kit.md +158 -2
- package/docs/es/intlayer_with_tanstack.md +160 -2
- package/docs/es/intlayer_with_vite+preact.md +162 -6
- package/docs/es/intlayer_with_vite+react.md +160 -4
- package/docs/es/intlayer_with_vite+solid.md +163 -7
- package/docs/es/intlayer_with_vite+svelte.md +157 -1
- package/docs/es/intlayer_with_vite+vue.md +165 -9
- package/docs/fr/compiler.md +81 -46
- package/docs/fr/configuration.md +355 -134
- package/docs/fr/intlayer_with_adonisjs.md +1 -1
- package/docs/fr/intlayer_with_express.md +1 -1
- package/docs/fr/intlayer_with_fastify.md +1 -1
- package/docs/fr/intlayer_with_hono.md +1 -1
- package/docs/fr/intlayer_with_nestjs.md +1 -1
- package/docs/fr/intlayer_with_nextjs_16.md +183 -7
- package/docs/fr/intlayer_with_nextjs_compiler.md +179 -3
- package/docs/fr/intlayer_with_react_router_v7.md +229 -3
- package/docs/fr/intlayer_with_react_router_v7_fs_routes.md +237 -6
- package/docs/fr/intlayer_with_svelte_kit.md +158 -2
- package/docs/fr/intlayer_with_tanstack.md +159 -1
- package/docs/fr/intlayer_with_vite+preact.md +164 -8
- package/docs/fr/intlayer_with_vite+react.md +162 -6
- package/docs/fr/intlayer_with_vite+solid.md +163 -7
- package/docs/fr/intlayer_with_vite+svelte.md +157 -1
- package/docs/fr/intlayer_with_vite+vue.md +164 -8
- package/docs/hi/compiler.md +81 -46
- package/docs/hi/configuration.md +87 -44
- package/docs/hi/intlayer_with_nextjs_16.md +174 -1
- package/docs/hi/intlayer_with_nextjs_compiler.md +174 -1
- package/docs/hi/intlayer_with_react_router_v7.md +224 -1
- package/docs/hi/intlayer_with_react_router_v7_fs_routes.md +225 -1
- package/docs/hi/intlayer_with_svelte_kit.md +158 -2
- package/docs/hi/intlayer_with_tanstack.md +159 -1
- package/docs/hi/intlayer_with_vite+preact.md +157 -1
- package/docs/hi/intlayer_with_vite+react.md +157 -1
- package/docs/hi/intlayer_with_vite+solid.md +157 -1
- package/docs/hi/intlayer_with_vite+svelte.md +157 -1
- package/docs/hi/intlayer_with_vite+vue.md +157 -1
- package/docs/id/compiler.md +84 -51
- package/docs/id/configuration.md +83 -45
- package/docs/id/intlayer_with_nextjs_16.md +174 -1
- package/docs/id/intlayer_with_nextjs_compiler.md +174 -1
- package/docs/id/intlayer_with_react_router_v7.md +224 -1
- package/docs/id/intlayer_with_react_router_v7_fs_routes.md +225 -1
- package/docs/id/intlayer_with_svelte_kit.md +158 -2
- package/docs/id/intlayer_with_tanstack.md +159 -1
- package/docs/id/intlayer_with_vite+preact.md +157 -1
- package/docs/id/intlayer_with_vite+react.md +157 -1
- package/docs/id/intlayer_with_vite+solid.md +157 -1
- package/docs/id/intlayer_with_vite+svelte.md +157 -1
- package/docs/id/intlayer_with_vite+vue.md +157 -1
- package/docs/it/compiler.md +81 -46
- package/docs/it/configuration.md +426 -204
- package/docs/it/intlayer_with_nextjs_16.md +174 -1
- package/docs/it/intlayer_with_nextjs_compiler.md +174 -1
- package/docs/it/intlayer_with_react_router_v7.md +225 -2
- package/docs/it/intlayer_with_react_router_v7_fs_routes.md +226 -2
- package/docs/it/intlayer_with_svelte_kit.md +158 -2
- package/docs/it/intlayer_with_tanstack.md +159 -1
- package/docs/it/intlayer_with_vite+preact.md +157 -1
- package/docs/it/intlayer_with_vite+react.md +157 -1
- package/docs/it/intlayer_with_vite+solid.md +159 -3
- package/docs/it/intlayer_with_vite+svelte.md +157 -1
- package/docs/it/intlayer_with_vite+vue.md +157 -1
- package/docs/ja/compiler.md +94 -58
- package/docs/ja/configuration.md +88 -45
- package/docs/ja/intlayer_with_nextjs_16.md +174 -1
- package/docs/ja/intlayer_with_nextjs_compiler.md +174 -1
- package/docs/ja/intlayer_with_react_router_v7.md +184 -394
- package/docs/ja/intlayer_with_react_router_v7_fs_routes.md +226 -2
- package/docs/ja/intlayer_with_svelte_kit.md +119 -595
- package/docs/ja/intlayer_with_tanstack.md +131 -642
- package/docs/ja/intlayer_with_vite+preact.md +111 -1231
- package/docs/ja/intlayer_with_vite+react.md +129 -1304
- package/docs/ja/intlayer_with_vite+solid.md +159 -3
- package/docs/ja/intlayer_with_vite+svelte.md +157 -1
- package/docs/ja/intlayer_with_vite+vue.md +157 -1
- package/docs/ko/compiler.md +88 -52
- package/docs/ko/configuration.md +87 -44
- package/docs/ko/intlayer_with_nextjs_16.md +174 -1
- package/docs/ko/intlayer_with_nextjs_compiler.md +174 -1
- package/docs/ko/intlayer_with_react_router_v7.md +225 -2
- package/docs/ko/intlayer_with_react_router_v7_fs_routes.md +226 -2
- package/docs/ko/intlayer_with_svelte_kit.md +158 -2
- package/docs/ko/intlayer_with_tanstack.md +159 -1
- package/docs/ko/intlayer_with_vite+preact.md +157 -1
- package/docs/ko/intlayer_with_vite+react.md +157 -1
- package/docs/ko/intlayer_with_vite+solid.md +159 -3
- package/docs/ko/intlayer_with_vite+svelte.md +157 -1
- package/docs/ko/intlayer_with_vite+vue.md +157 -1
- package/docs/pl/compiler.md +84 -51
- package/docs/pl/configuration.md +83 -37
- package/docs/pl/intlayer_with_nextjs_16.md +174 -1
- package/docs/pl/intlayer_with_nextjs_compiler.md +174 -1
- package/docs/pl/intlayer_with_react_router_v7.md +224 -1
- package/docs/pl/intlayer_with_react_router_v7_fs_routes.md +225 -1
- package/docs/pl/intlayer_with_svelte_kit.md +158 -2
- package/docs/pl/intlayer_with_tanstack.md +159 -1
- package/docs/pl/intlayer_with_vite+preact.md +157 -1
- package/docs/pl/intlayer_with_vite+react.md +157 -1
- package/docs/pl/intlayer_with_vite+solid.md +157 -1
- package/docs/pl/intlayer_with_vite+svelte.md +157 -1
- package/docs/pl/intlayer_with_vite+vue.md +157 -1
- package/docs/pt/compiler.md +81 -46
- package/docs/pt/configuration.md +404 -194
- package/docs/pt/intlayer_with_nextjs_16.md +174 -1
- package/docs/pt/intlayer_with_nextjs_compiler.md +174 -1
- package/docs/pt/intlayer_with_react_router_v7.md +224 -1
- package/docs/pt/intlayer_with_react_router_v7_fs_routes.md +225 -1
- package/docs/pt/intlayer_with_svelte_kit.md +158 -2
- package/docs/pt/intlayer_with_tanstack.md +159 -1
- package/docs/pt/intlayer_with_vite+preact.md +157 -1
- package/docs/pt/intlayer_with_vite+react.md +157 -1
- package/docs/pt/intlayer_with_vite+solid.md +157 -1
- package/docs/pt/intlayer_with_vite+svelte.md +157 -1
- package/docs/pt/intlayer_with_vite+vue.md +157 -1
- package/docs/ru/compiler.md +90 -57
- package/docs/ru/configuration.md +76 -46
- package/docs/ru/intlayer_with_nextjs_16.md +174 -1
- package/docs/ru/intlayer_with_nextjs_compiler.md +174 -1
- package/docs/ru/intlayer_with_react_router_v7.md +224 -1
- package/docs/ru/intlayer_with_react_router_v7_fs_routes.md +225 -1
- package/docs/ru/intlayer_with_svelte_kit.md +158 -2
- package/docs/ru/intlayer_with_tanstack.md +159 -1
- package/docs/ru/intlayer_with_vite+preact.md +157 -1
- package/docs/ru/intlayer_with_vite+react.md +157 -1
- package/docs/ru/intlayer_with_vite+solid.md +157 -1
- package/docs/ru/intlayer_with_vite+svelte.md +157 -1
- package/docs/ru/intlayer_with_vite+vue.md +157 -1
- package/docs/tr/compiler.md +85 -52
- package/docs/tr/configuration.md +83 -40
- package/docs/tr/intlayer_with_nextjs_16.md +174 -1
- package/docs/tr/intlayer_with_nextjs_compiler.md +174 -1
- package/docs/tr/intlayer_with_react_router_v7.md +224 -1
- package/docs/tr/intlayer_with_react_router_v7_fs_routes.md +225 -1
- package/docs/tr/intlayer_with_svelte_kit.md +158 -2
- package/docs/tr/intlayer_with_tanstack.md +159 -1
- package/docs/tr/intlayer_with_vite+preact.md +157 -1
- package/docs/tr/intlayer_with_vite+react.md +157 -1
- package/docs/tr/intlayer_with_vite+solid.md +157 -1
- package/docs/tr/intlayer_with_vite+svelte.md +157 -1
- package/docs/tr/intlayer_with_vite+vue.md +157 -1
- package/docs/uk/compiler.md +96 -61
- package/docs/uk/configuration.md +83 -37
- package/docs/uk/intlayer_with_nextjs_16.md +174 -1
- package/docs/uk/intlayer_with_nextjs_compiler.md +174 -1
- package/docs/uk/intlayer_with_react_router_v7.md +224 -1
- package/docs/uk/intlayer_with_react_router_v7_fs_routes.md +225 -1
- package/docs/uk/intlayer_with_svelte_kit.md +157 -1
- package/docs/uk/intlayer_with_tanstack.md +159 -1
- package/docs/uk/intlayer_with_vite+preact.md +157 -1
- package/docs/uk/intlayer_with_vite+react.md +157 -1
- package/docs/uk/intlayer_with_vite+solid.md +157 -1
- package/docs/uk/intlayer_with_vite+svelte.md +157 -1
- package/docs/uk/intlayer_with_vite+vue.md +157 -1
- package/docs/vi/compiler.md +85 -50
- package/docs/vi/configuration.md +85 -39
- package/docs/vi/intlayer_with_nextjs_16.md +174 -1
- package/docs/vi/intlayer_with_nextjs_compiler.md +174 -1
- package/docs/vi/intlayer_with_react_router_v7.md +224 -1
- package/docs/vi/intlayer_with_react_router_v7_fs_routes.md +225 -1
- package/docs/vi/intlayer_with_svelte_kit.md +158 -2
- package/docs/vi/intlayer_with_tanstack.md +159 -1
- package/docs/vi/intlayer_with_vite+preact.md +157 -1
- package/docs/vi/intlayer_with_vite+react.md +157 -1
- package/docs/vi/intlayer_with_vite+solid.md +157 -1
- package/docs/vi/intlayer_with_vite+svelte.md +157 -1
- package/docs/vi/intlayer_with_vite+vue.md +157 -1
- package/docs/zh/compiler.md +84 -49
- package/docs/zh/configuration.md +80 -37
- package/docs/zh/intlayer_with_adonisjs.md +1 -1
- package/docs/zh/intlayer_with_express.md +1 -1
- package/docs/zh/intlayer_with_fastify.md +1 -1
- package/docs/zh/intlayer_with_hono.md +1 -1
- package/docs/zh/intlayer_with_nestjs.md +1 -1
- package/docs/zh/intlayer_with_nextjs_16.md +174 -1
- package/docs/zh/intlayer_with_nextjs_compiler.md +174 -1
- package/docs/zh/intlayer_with_react_router_v7.md +227 -4
- package/docs/zh/intlayer_with_react_router_v7_fs_routes.md +228 -4
- package/docs/zh/intlayer_with_svelte_kit.md +158 -2
- package/docs/zh/intlayer_with_tanstack.md +159 -1
- package/docs/zh/intlayer_with_vite+preact.md +159 -3
- package/docs/zh/intlayer_with_vite+react.md +157 -1
- package/docs/zh/intlayer_with_vite+solid.md +161 -5
- package/docs/zh/intlayer_with_vite+svelte.md +157 -1
- package/docs/zh/intlayer_with_vite+vue.md +158 -2
- package/package.json +6 -6
|
@@ -44,7 +44,7 @@ Al internacionalizar el backend, tu aplicación no solo respeta las diferencias
|
|
|
44
44
|
<iframe
|
|
45
45
|
src="https://stackblitz.com/github/aymericzip/intlayer-adonisjs-template?embed=1&ctl=1&file=intlayer.config.ts"
|
|
46
46
|
className="m-auto overflow-hidden rounded-lg border-0 max-md:size-full max-md:h-[700px] md:aspect-16/9 md:w-full"
|
|
47
|
-
title="Demo CodeSandbox -
|
|
47
|
+
title="Demo CodeSandbox - Cómo internacionalizar tu aplicación usando Intlayer"
|
|
48
48
|
sandbox="allow-forms allow-modals allow-popups allow-presentation allow-same-origin allow-scripts"
|
|
49
49
|
loading="lazy"
|
|
50
50
|
/>
|
|
@@ -49,7 +49,7 @@ Internacionalizar tu backend es esencial para atender eficazmente a una audienci
|
|
|
49
49
|
<iframe
|
|
50
50
|
src="https://stackblitz.com/github/aymericzip/intlayer-express-template?embed=1&ctl=1&file=intlayer.config.ts"
|
|
51
51
|
className="m-auto overflow-hidden rounded-lg border-0 max-md:size-full max-md:h-[700px] md:aspect-16/9 md:w-full"
|
|
52
|
-
title="Demo CodeSandbox -
|
|
52
|
+
title="Demo CodeSandbox - Cómo internacionalizar tu aplicación usando Intlayer"
|
|
53
53
|
sandbox="allow-forms allow-modals allow-popups allow-presentation allow-same-origin allow-scripts"
|
|
54
54
|
loading="lazy"
|
|
55
55
|
/>
|
|
@@ -49,7 +49,7 @@ Al internacionalizar el backend, tu aplicación no solo respeta las diferencias
|
|
|
49
49
|
<iframe
|
|
50
50
|
src="https://stackblitz.com/github/aymericzip/intlayer-fastify-template?embed=1&ctl=1&file=intlayer.config.ts"
|
|
51
51
|
className="m-auto overflow-hidden rounded-lg border-0 max-md:size-full max-md:h-[700px] md:aspect-16/9 md:w-full"
|
|
52
|
-
title="Demo CodeSandbox -
|
|
52
|
+
title="Demo CodeSandbox - Cómo internacionalizar tu aplicación usando Intlayer"
|
|
53
53
|
sandbox="allow-forms allow-modals allow-popups allow-presentation allow-same-origin allow-scripts"
|
|
54
54
|
loading="lazy"
|
|
55
55
|
/>
|
|
@@ -47,7 +47,7 @@ Al internacionalizar el backend, su aplicación no solo respeta las diferencias
|
|
|
47
47
|
<iframe
|
|
48
48
|
src="https://stackblitz.com/github/aymericzip/intlayer-hono-template?embed=1&ctl=1&file=intlayer.config.ts"
|
|
49
49
|
className="m-auto overflow-hidden rounded-lg border-0 max-md:size-full max-md:h-[700px] md:aspect-16/9 md:w-full"
|
|
50
|
-
title="Demo CodeSandbox -
|
|
50
|
+
title="Demo CodeSandbox - Cómo internacionalizar tu aplicación usando Intlayer"
|
|
51
51
|
sandbox="allow-forms allow-modals allow-popups allow-presentation allow-same-origin allow-scripts"
|
|
52
52
|
loading="lazy"
|
|
53
53
|
/>
|
|
@@ -52,7 +52,7 @@ Al internacionalizar el backend, su aplicación no solo respeta las diferencias
|
|
|
52
52
|
<iframe
|
|
53
53
|
src="https://stackblitz.com/github/aymericzip/intlayer-nestjs-template?embed=1&ctl=1&file=intlayer.config.ts"
|
|
54
54
|
className="m-auto overflow-hidden rounded-lg border-0 max-md:size-full max-md:h-[700px] md:aspect-16/9 md:w-full"
|
|
55
|
-
title="Demo CodeSandbox -
|
|
55
|
+
title="Demo CodeSandbox - Cómo internacionalizar tu aplicación usando Intlayer"
|
|
56
56
|
sandbox="allow-forms allow-modals allow-popups allow-presentation allow-same-origin allow-scripts"
|
|
57
57
|
loading="lazy"
|
|
58
58
|
/>
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
---
|
|
2
2
|
createdAt: 2024-12-06
|
|
3
|
-
updatedAt:
|
|
3
|
+
updatedAt: 2026-03-12
|
|
4
4
|
title: Next.js i18n - Cómo traducir una aplicación Next.js 16 en 2026
|
|
5
5
|
description: Descubre cómo hacer que tu sitio web Next.js 16 sea multilingüe. Sigue la documentación para internacionalizar (i18n) y traducirlo.
|
|
6
6
|
keywords:
|
|
@@ -31,7 +31,7 @@ history:
|
|
|
31
31
|
# Traduce tu sitio web Next.js 16 usando Intlayer | Internacionalización (i18n)
|
|
32
32
|
|
|
33
33
|
<Tabs defaultTab="video">
|
|
34
|
-
<Tab label="
|
|
34
|
+
<Tab label="Vídeo" value="video">
|
|
35
35
|
|
|
36
36
|
<iframe title="¿La mejor solución i18n para Next.js? Descubre Intlayer" class="m-auto aspect-16/9 w-full overflow-hidden rounded-lg border-0" allow="autoplay; gyroscope;" loading="lazy" width="1080" height="auto" src="https://www.youtube.com/embed/e_PPG7PTqGU?autoplay=0&origin=http://intlayer.org&controls=0&rel=1"/>
|
|
37
37
|
|
|
@@ -41,7 +41,7 @@ history:
|
|
|
41
41
|
<iframe
|
|
42
42
|
src="https://stackblitz.com/github/aymericzip/intlayer-next-16-template?embed=1&ctl=1&file=intlayer.config.ts"
|
|
43
43
|
className="m-auto overflow-hidden rounded-lg border-0 max-md:size-full max-md:h-[700px] md:aspect-16/9 md:w-full"
|
|
44
|
-
title="Demo CodeSandbox -
|
|
44
|
+
title="Demo CodeSandbox - Cómo internacionalizar tu aplicación usando Intlayer"
|
|
45
45
|
sandbox="allow-forms allow-modals allow-popups allow-presentation allow-same-origin allow-scripts"
|
|
46
46
|
loading="lazy"
|
|
47
47
|
/>
|
|
@@ -1731,6 +1731,179 @@ Esta limitación ocurre porque Turbopack no puede ejecutar plugins de webpack en
|
|
|
1731
1731
|
|
|
1732
1732
|
> Si estás usando next-intlayer@<=6.x.x, necesitas mantener el flag `--turbopack` para que la aplicación Next.js 16 funcione correctamente con Turbopack. Recomendamos usar next-intlayer@>=7.x.x para evitar esta limitación.
|
|
1733
1733
|
|
|
1734
|
+
### (Opcional) Paso 14 : Extraer el contenido de tus componentes
|
|
1735
|
+
|
|
1736
|
+
Si tienes una base de código existente, transformar miles de archivos puede llevar mucho tiempo.
|
|
1737
|
+
|
|
1738
|
+
Para facilitar este proceso, Intlayer propone un [compilador](https://github.com/aymericzip/intlayer/blob/main/docs/docs/es/compiler.md) / [extractor](https://github.com/aymericzip/intlayer/blob/main/docs/docs/es/cli/extract.md) para transformar tus componentes y extraer el contenido.
|
|
1739
|
+
|
|
1740
|
+
Para configurarlo, puedes agregar una sección `compiler` en tu archivo `intlayer.config.ts` :
|
|
1741
|
+
|
|
1742
|
+
```typescript fileName="intlayer.config.ts" codeFormat="typescript"
|
|
1743
|
+
import { type IntlayerConfig } from "intlayer";
|
|
1744
|
+
|
|
1745
|
+
const config: IntlayerConfig = {
|
|
1746
|
+
// ... Resto de tu configuración
|
|
1747
|
+
compiler: {
|
|
1748
|
+
/**
|
|
1749
|
+
* Indica si el compilador debe estar habilitado.
|
|
1750
|
+
*/
|
|
1751
|
+
enabled: true,
|
|
1752
|
+
|
|
1753
|
+
/**
|
|
1754
|
+
* Define la ruta de los archivos de salida
|
|
1755
|
+
*/
|
|
1756
|
+
output: ({ fileName, extension }) => `./${fileName}${extension}`,
|
|
1757
|
+
|
|
1758
|
+
/**
|
|
1759
|
+
* Indica si los componentes deben guardarse después de ser transformados. De esa manera, el compilador se puede ejecutar solo una vez para transformar la aplicación y luego se puede eliminar.
|
|
1760
|
+
*/
|
|
1761
|
+
saveComponents: false,
|
|
1762
|
+
|
|
1763
|
+
/**
|
|
1764
|
+
* Prefijo de clave de diccionario
|
|
1765
|
+
*/
|
|
1766
|
+
dictionaryKeyPrefix: "",
|
|
1767
|
+
},
|
|
1768
|
+
};
|
|
1769
|
+
|
|
1770
|
+
export default config;
|
|
1771
|
+
```
|
|
1772
|
+
|
|
1773
|
+
```javascript fileName="intlayer.config.mjs" codeFormat="esm"
|
|
1774
|
+
/** @type {import('intlayer').IntlayerConfig} */
|
|
1775
|
+
const config = {
|
|
1776
|
+
// ... Resto de tu configuración
|
|
1777
|
+
compiler: {
|
|
1778
|
+
/**
|
|
1779
|
+
* Indica si el compilador debe estar habilitado.
|
|
1780
|
+
*/
|
|
1781
|
+
enabled: true,
|
|
1782
|
+
|
|
1783
|
+
/**
|
|
1784
|
+
* Define la ruta de los archivos de salida
|
|
1785
|
+
*/
|
|
1786
|
+
output: ({ fileName, extension }) => `./${fileName}${extension}`,
|
|
1787
|
+
|
|
1788
|
+
/**
|
|
1789
|
+
* Indica si los componentes deben guardarse después de ser transformados. De esa manera, el compilador se puede ejecutar solo una vez para transformar la aplicación y luego se puede eliminar.
|
|
1790
|
+
*/
|
|
1791
|
+
saveComponents: false,
|
|
1792
|
+
|
|
1793
|
+
/**
|
|
1794
|
+
* Prefijo de clave de diccionario
|
|
1795
|
+
*/
|
|
1796
|
+
dictionaryKeyPrefix: "",
|
|
1797
|
+
},
|
|
1798
|
+
};
|
|
1799
|
+
|
|
1800
|
+
export default config;
|
|
1801
|
+
```
|
|
1802
|
+
|
|
1803
|
+
```javascript fileName="intlayer.config.cjs" codeFormat="commonjs"
|
|
1804
|
+
/** @type {import('intlayer').IntlayerConfig} */
|
|
1805
|
+
const config = {
|
|
1806
|
+
// ... Resto de tu configuración
|
|
1807
|
+
compiler: {
|
|
1808
|
+
/**
|
|
1809
|
+
* Indica si el compilador debe estar habilitado.
|
|
1810
|
+
*/
|
|
1811
|
+
enabled: true,
|
|
1812
|
+
|
|
1813
|
+
/**
|
|
1814
|
+
* Define la ruta de los archivos de salida
|
|
1815
|
+
*/
|
|
1816
|
+
output: ({ fileName, extension }) => `./${fileName}${extension}`,
|
|
1817
|
+
|
|
1818
|
+
/**
|
|
1819
|
+
* Indica si los componentes deben guardarse después de ser transformados. De esa manera, el compilador se puede ejecutar solo una vez para transformar la aplicación y luego se puede eliminar.
|
|
1820
|
+
*/
|
|
1821
|
+
saveComponents: false,
|
|
1822
|
+
|
|
1823
|
+
/**
|
|
1824
|
+
* Prefijo de clave de diccionario
|
|
1825
|
+
*/
|
|
1826
|
+
dictionaryKeyPrefix: "",
|
|
1827
|
+
},
|
|
1828
|
+
};
|
|
1829
|
+
|
|
1830
|
+
module.exports = config;
|
|
1831
|
+
```
|
|
1832
|
+
|
|
1833
|
+
<Tabs>
|
|
1834
|
+
<Tab value='Comando de extracción'>
|
|
1835
|
+
|
|
1836
|
+
Ejecuta el extractor para transformar tus componentes y extraer el contenido
|
|
1837
|
+
|
|
1838
|
+
```bash packageManager="npm"
|
|
1839
|
+
npx intlayer extract
|
|
1840
|
+
```
|
|
1841
|
+
|
|
1842
|
+
```bash packageManager="pnpm"
|
|
1843
|
+
pnpm intlayer extract
|
|
1844
|
+
```
|
|
1845
|
+
|
|
1846
|
+
```bash packageManager="yarn"
|
|
1847
|
+
yarn intlayer extract
|
|
1848
|
+
```
|
|
1849
|
+
|
|
1850
|
+
```bash packageManager="bun"
|
|
1851
|
+
bunx intlayer extract
|
|
1852
|
+
```
|
|
1853
|
+
|
|
1854
|
+
</Tab>
|
|
1855
|
+
<Tab value='Compilador Babel'>
|
|
1856
|
+
|
|
1857
|
+
```bash packageManager="npm"
|
|
1858
|
+
npm install @intlayer/babel --save-dev
|
|
1859
|
+
```
|
|
1860
|
+
|
|
1861
|
+
```bash packageManager="pnpm"
|
|
1862
|
+
pnpm add @intlayer/babel --save-dev
|
|
1863
|
+
```
|
|
1864
|
+
|
|
1865
|
+
```bash packageManager="yarn"
|
|
1866
|
+
yarn add @intlayer/babel --save-dev
|
|
1867
|
+
```
|
|
1868
|
+
|
|
1869
|
+
```bash packageManager="bun"
|
|
1870
|
+
bun add @intlayer/babel --dev
|
|
1871
|
+
```
|
|
1872
|
+
|
|
1873
|
+
```js fileName="babel.config.js"
|
|
1874
|
+
const {
|
|
1875
|
+
intlayerExtractBabelPlugin,
|
|
1876
|
+
getExtractPluginOptions,
|
|
1877
|
+
} = require("@intlayer/babel");
|
|
1878
|
+
|
|
1879
|
+
module.exports = {
|
|
1880
|
+
presets: ["next/babel"],
|
|
1881
|
+
plugins: [
|
|
1882
|
+
// Extraer contenido de los componentes en diccionarios
|
|
1883
|
+
[intlayerExtractBabelPlugin, getExtractPluginOptions()],
|
|
1884
|
+
],
|
|
1885
|
+
};
|
|
1886
|
+
```
|
|
1887
|
+
|
|
1888
|
+
```bash packageManager="npm"
|
|
1889
|
+
npm run build # O npm run dev
|
|
1890
|
+
```
|
|
1891
|
+
|
|
1892
|
+
```bash packageManager="pnpm"
|
|
1893
|
+
pnpm run build # O pnpm run dev
|
|
1894
|
+
```
|
|
1895
|
+
|
|
1896
|
+
```bash packageManager="yarn"
|
|
1897
|
+
yarn build # O yarn dev
|
|
1898
|
+
```
|
|
1899
|
+
|
|
1900
|
+
```bash packageManager="bun"
|
|
1901
|
+
bun run build # Or bun run dev
|
|
1902
|
+
```
|
|
1903
|
+
|
|
1904
|
+
</Tab>
|
|
1905
|
+
</Tabs>
|
|
1906
|
+
|
|
1734
1907
|
### Configurar TypeScript
|
|
1735
1908
|
|
|
1736
1909
|
Intlayer usa la ampliación de módulos para aprovechar las ventajas de TypeScript y fortalecer tu base de código.
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
---
|
|
2
2
|
createdAt: 2026-01-10
|
|
3
|
-
updatedAt: 2026-
|
|
3
|
+
updatedAt: 2026-03-12
|
|
4
4
|
title: Next.js i18n - Transformar una aplicación Next.js existente en una aplicación multilingüe en 2026
|
|
5
5
|
description: Descubra cómo hacer que su aplicación Next.js existente sea multilingüe utilizando el Compilador Intlayer. Siga la documentación para internacionalizar (i18n) y traducir su aplicación mediante Inteligencia Artificial (IA).
|
|
6
6
|
keywords:
|
|
@@ -31,7 +31,7 @@ history:
|
|
|
31
31
|
# Cómo hacer que una aplicación Next.js existente sea multilingüe (i18n) (guía i18n 2026)
|
|
32
32
|
|
|
33
33
|
<Tabs defaultTab="video">
|
|
34
|
-
<Tab label="
|
|
34
|
+
<Tab label="Vídeo" value="video">
|
|
35
35
|
|
|
36
36
|
<iframe title="¿La mejor solución i18n para Next.js? Descubre Intlayer" class="m-auto aspect-16/9 w-full overflow-hidden rounded-lg border-0" allow="autoplay; gyroscope;" loading="lazy" width="1080" height="auto" src="https://www.youtube.com/embed/e_PPG7PTqGU?autoplay=0&origin=http://intlayer.org&controls=0&rel=1"/>
|
|
37
37
|
|
|
@@ -455,6 +455,179 @@ bun add @intlayer/swc --dev
|
|
|
455
455
|
|
|
456
456
|
> Nota: Si establece la opción como `importMode: 'dynamic'` o `importMode: 'fetch'` (en la configuración de `dictionary`), dependerá de Suspense, por lo que tendrá que envolver sus llamadas a `useIntlayer` en un límite de `Suspense`. Esto significa que no podrá usar `useIntlayer` directamente en el nivel superior de su componente Página / Layout.
|
|
457
457
|
|
|
458
|
+
### (Opcional) Paso 11 : Extraer el contenido de tus componentes
|
|
459
|
+
|
|
460
|
+
Si tienes una base de código existente, transformar miles de archivos puede llevar mucho tiempo.
|
|
461
|
+
|
|
462
|
+
Para facilitar este proceso, Intlayer propone un [compilador](https://github.com/aymericzip/intlayer/blob/main/docs/docs/es/compiler.md) / [extractor](https://github.com/aymericzip/intlayer/blob/main/docs/docs/es/cli/extract.md) para transformar tus componentes y extraer el contenido.
|
|
463
|
+
|
|
464
|
+
Para configurarlo, puedes agregar una sección `compiler` en tu archivo `intlayer.config.ts` :
|
|
465
|
+
|
|
466
|
+
```typescript fileName="intlayer.config.ts" codeFormat="typescript"
|
|
467
|
+
import { type IntlayerConfig } from "intlayer";
|
|
468
|
+
|
|
469
|
+
const config: IntlayerConfig = {
|
|
470
|
+
// ... Resto de tu configuración
|
|
471
|
+
compiler: {
|
|
472
|
+
/**
|
|
473
|
+
* Indica si el compilador debe estar habilitado.
|
|
474
|
+
*/
|
|
475
|
+
enabled: true,
|
|
476
|
+
|
|
477
|
+
/**
|
|
478
|
+
* Define la ruta de los archivos de salida
|
|
479
|
+
*/
|
|
480
|
+
output: ({ fileName, extension }) => `./${fileName}${extension}`,
|
|
481
|
+
|
|
482
|
+
/**
|
|
483
|
+
* Indica si los componentes deben guardarse después de ser transformados. De esa manera, el compilador se puede ejecutar solo una vez para transformar la aplicación y luego se puede eliminar.
|
|
484
|
+
*/
|
|
485
|
+
saveComponents: false,
|
|
486
|
+
|
|
487
|
+
/**
|
|
488
|
+
* Prefijo de clave de diccionario
|
|
489
|
+
*/
|
|
490
|
+
dictionaryKeyPrefix: "",
|
|
491
|
+
},
|
|
492
|
+
};
|
|
493
|
+
|
|
494
|
+
export default config;
|
|
495
|
+
```
|
|
496
|
+
|
|
497
|
+
```javascript fileName="intlayer.config.mjs" codeFormat="esm"
|
|
498
|
+
/** @type {import('intlayer').IntlayerConfig} */
|
|
499
|
+
const config = {
|
|
500
|
+
// ... Resto de tu configuración
|
|
501
|
+
compiler: {
|
|
502
|
+
/**
|
|
503
|
+
* Indica si el compilador debe estar habilitado.
|
|
504
|
+
*/
|
|
505
|
+
enabled: true,
|
|
506
|
+
|
|
507
|
+
/**
|
|
508
|
+
* Define la ruta de los archivos de salida
|
|
509
|
+
*/
|
|
510
|
+
output: ({ fileName, extension }) => `./${fileName}${extension}`,
|
|
511
|
+
|
|
512
|
+
/**
|
|
513
|
+
* Indica si los componentes deben guardarse después de ser transformados. De esa manera, el compilador se puede ejecutar solo una vez para transformar la aplicación y luego se puede eliminar.
|
|
514
|
+
*/
|
|
515
|
+
saveComponents: false,
|
|
516
|
+
|
|
517
|
+
/**
|
|
518
|
+
* Prefijo de clave de diccionario
|
|
519
|
+
*/
|
|
520
|
+
dictionaryKeyPrefix: "",
|
|
521
|
+
},
|
|
522
|
+
};
|
|
523
|
+
|
|
524
|
+
export default config;
|
|
525
|
+
```
|
|
526
|
+
|
|
527
|
+
```javascript fileName="intlayer.config.cjs" codeFormat="commonjs"
|
|
528
|
+
/** @type {import('intlayer').IntlayerConfig} */
|
|
529
|
+
const config = {
|
|
530
|
+
// ... Resto de tu configuración
|
|
531
|
+
compiler: {
|
|
532
|
+
/**
|
|
533
|
+
* Indica si el compilador debe estar habilitado.
|
|
534
|
+
*/
|
|
535
|
+
enabled: true,
|
|
536
|
+
|
|
537
|
+
/**
|
|
538
|
+
* Define la ruta de los archivos de salida
|
|
539
|
+
*/
|
|
540
|
+
output: ({ fileName, extension }) => `./${fileName}${extension}`,
|
|
541
|
+
|
|
542
|
+
/**
|
|
543
|
+
* Indica si los componentes deben guardarse después de ser transformados. De esa manera, el compilador se puede ejecutar solo una vez para transformar la aplicación y luego se puede eliminar.
|
|
544
|
+
*/
|
|
545
|
+
saveComponents: false,
|
|
546
|
+
|
|
547
|
+
/**
|
|
548
|
+
* Prefijo de clave de diccionario
|
|
549
|
+
*/
|
|
550
|
+
dictionaryKeyPrefix: "",
|
|
551
|
+
},
|
|
552
|
+
};
|
|
553
|
+
|
|
554
|
+
module.exports = config;
|
|
555
|
+
```
|
|
556
|
+
|
|
557
|
+
<Tabs>
|
|
558
|
+
<Tab value='Comando de extracción'>
|
|
559
|
+
|
|
560
|
+
Ejecuta el extractor para transformar tus componentes y extraer el contenido
|
|
561
|
+
|
|
562
|
+
```bash packageManager="npm"
|
|
563
|
+
npx intlayer extract
|
|
564
|
+
```
|
|
565
|
+
|
|
566
|
+
```bash packageManager="pnpm"
|
|
567
|
+
pnpm intlayer extract
|
|
568
|
+
```
|
|
569
|
+
|
|
570
|
+
```bash packageManager="yarn"
|
|
571
|
+
yarn intlayer extract
|
|
572
|
+
```
|
|
573
|
+
|
|
574
|
+
```bash packageManager="bun"
|
|
575
|
+
bunx intlayer extract
|
|
576
|
+
```
|
|
577
|
+
|
|
578
|
+
</Tab>
|
|
579
|
+
<Tab value='Compilador Babel'>
|
|
580
|
+
|
|
581
|
+
```bash packageManager="npm"
|
|
582
|
+
npm install @intlayer/babel --save-dev
|
|
583
|
+
```
|
|
584
|
+
|
|
585
|
+
```bash packageManager="pnpm"
|
|
586
|
+
pnpm add @intlayer/babel --save-dev
|
|
587
|
+
```
|
|
588
|
+
|
|
589
|
+
```bash packageManager="yarn"
|
|
590
|
+
yarn add @intlayer/babel --save-dev
|
|
591
|
+
```
|
|
592
|
+
|
|
593
|
+
```bash packageManager="bun"
|
|
594
|
+
bun add @intlayer/babel --dev
|
|
595
|
+
```
|
|
596
|
+
|
|
597
|
+
```js fileName="babel.config.js"
|
|
598
|
+
const {
|
|
599
|
+
intlayerExtractBabelPlugin,
|
|
600
|
+
getExtractPluginOptions,
|
|
601
|
+
} = require("@intlayer/babel");
|
|
602
|
+
|
|
603
|
+
module.exports = {
|
|
604
|
+
presets: ["next/babel"],
|
|
605
|
+
plugins: [
|
|
606
|
+
// Extraer contenido de los componentes en diccionarios
|
|
607
|
+
[intlayerExtractBabelPlugin, getExtractPluginOptions()],
|
|
608
|
+
],
|
|
609
|
+
};
|
|
610
|
+
```
|
|
611
|
+
|
|
612
|
+
```bash packageManager="npm"
|
|
613
|
+
npm run build # O npm run dev
|
|
614
|
+
```
|
|
615
|
+
|
|
616
|
+
```bash packageManager="pnpm"
|
|
617
|
+
pnpm run build # O pnpm run dev
|
|
618
|
+
```
|
|
619
|
+
|
|
620
|
+
```bash packageManager="yarn"
|
|
621
|
+
yarn build # O yarn dev
|
|
622
|
+
```
|
|
623
|
+
|
|
624
|
+
```bash packageManager="bun"
|
|
625
|
+
bun run build # Or bun run dev
|
|
626
|
+
```
|
|
627
|
+
|
|
628
|
+
</Tab>
|
|
629
|
+
</Tabs>
|
|
630
|
+
|
|
458
631
|
### Configurar TypeScript
|
|
459
632
|
|
|
460
633
|
Intlayer utiliza la aumentación de módulos para obtener los beneficios de TypeScript y fortalecer su base de código.
|
|
@@ -47,7 +47,7 @@ Con Intlayer, puedes:
|
|
|
47
47
|
## Guía paso a paso para configurar Intlayer en una aplicación Nuxt
|
|
48
48
|
|
|
49
49
|
<Tabs defaultTab="video">
|
|
50
|
-
<Tab label="
|
|
50
|
+
<Tab label="Vídeo" value="video">
|
|
51
51
|
|
|
52
52
|
<iframe title="¿Cómo traducir tu aplicación Nuxt y Vue usando Intlayer? Descubre Intlayer" class="m-auto aspect-16/9 w-full overflow-hidden rounded-lg border-0" allow="autoplay; gyroscope;" loading="lazy" width="1080" height="auto" src="https://www.youtube.com/embed/nhUcUAVQ6eQ?autoplay=0&origin=http://intlayer.org&controls=0&rel=1"/>
|
|
53
53
|
|