@intlayer/docs 6.0.0-canary.2 → 6.0.0-canary.3
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/intlayer_with_angular.md +3 -3
- package/docs/ar/intlayer_with_react_router_v7.md +3 -3
- package/docs/ar/intlayer_with_tanstack.md +3 -3
- package/docs/ar/intlayer_with_vite+preact.md +13 -13
- package/docs/ar/intlayer_with_vite+react.md +13 -13
- package/docs/ar/intlayer_with_vite+solid.md +7 -7
- package/docs/ar/intlayer_with_vite+svelte.md +7 -7
- package/docs/ar/intlayer_with_vite+vue.md +15 -15
- package/docs/ar/packages/vite-intlayer/index.md +3 -3
- package/docs/de/intlayer_with_angular.md +3 -3
- package/docs/de/intlayer_with_react_router_v7.md +3 -3
- package/docs/de/intlayer_with_tanstack.md +3 -3
- package/docs/de/intlayer_with_vite+preact.md +13 -13
- package/docs/de/intlayer_with_vite+react.md +13 -13
- package/docs/de/intlayer_with_vite+solid.md +7 -7
- package/docs/de/intlayer_with_vite+svelte.md +7 -7
- package/docs/de/intlayer_with_vite+vue.md +15 -15
- package/docs/de/packages/vite-intlayer/index.md +3 -3
- package/docs/en/intlayer_with_angular.md +3 -3
- package/docs/en/intlayer_with_react_router_v7.md +3 -3
- package/docs/en/intlayer_with_tanstack.md +3 -3
- package/docs/en/intlayer_with_vite+preact.md +13 -13
- package/docs/en/intlayer_with_vite+react.md +13 -13
- package/docs/en/intlayer_with_vite+solid.md +7 -7
- package/docs/en/intlayer_with_vite+svelte.md +7 -7
- package/docs/en/intlayer_with_vite+vue.md +13 -13
- package/docs/en/packages/vite-intlayer/index.md +3 -3
- package/docs/en-GB/intlayer_with_angular.md +3 -3
- package/docs/en-GB/intlayer_with_react_router_v7.md +3 -3
- package/docs/en-GB/intlayer_with_tanstack.md +3 -3
- package/docs/en-GB/intlayer_with_vite+preact.md +13 -13
- package/docs/en-GB/intlayer_with_vite+react.md +13 -13
- package/docs/en-GB/intlayer_with_vite+solid.md +7 -7
- package/docs/en-GB/intlayer_with_vite+svelte.md +7 -7
- package/docs/en-GB/intlayer_with_vite+vue.md +16 -17
- package/docs/en-GB/packages/vite-intlayer/index.md +3 -3
- package/docs/es/intlayer_with_angular.md +3 -3
- package/docs/es/intlayer_with_react_router_v7.md +3 -3
- package/docs/es/intlayer_with_tanstack.md +3 -3
- package/docs/es/intlayer_with_vite+preact.md +13 -13
- package/docs/es/intlayer_with_vite+react.md +13 -13
- package/docs/es/intlayer_with_vite+solid.md +7 -7
- package/docs/es/intlayer_with_vite+svelte.md +7 -7
- package/docs/es/intlayer_with_vite+vue.md +15 -15
- package/docs/es/packages/vite-intlayer/index.md +3 -3
- package/docs/fr/intlayer_with_angular.md +3 -3
- package/docs/fr/intlayer_with_react_router_v7.md +3 -3
- package/docs/fr/intlayer_with_tanstack.md +3 -3
- package/docs/fr/intlayer_with_vite+preact.md +13 -13
- package/docs/fr/intlayer_with_vite+react.md +13 -13
- package/docs/fr/intlayer_with_vite+solid.md +7 -7
- package/docs/fr/intlayer_with_vite+svelte.md +7 -7
- package/docs/fr/intlayer_with_vite+vue.md +15 -15
- package/docs/fr/packages/vite-intlayer/index.md +3 -3
- package/docs/hi/intlayer_with_angular.md +3 -3
- package/docs/hi/intlayer_with_react_router_v7.md +3 -3
- package/docs/hi/intlayer_with_tanstack.md +3 -3
- package/docs/hi/intlayer_with_vite+preact.md +13 -13
- package/docs/hi/intlayer_with_vite+react.md +13 -13
- package/docs/hi/intlayer_with_vite+solid.md +7 -7
- package/docs/hi/intlayer_with_vite+svelte.md +7 -7
- package/docs/hi/intlayer_with_vite+vue.md +15 -15
- package/docs/hi/packages/vite-intlayer/index.md +3 -3
- package/docs/it/intlayer_with_angular.md +3 -3
- package/docs/it/intlayer_with_react_router_v7.md +3 -3
- package/docs/it/intlayer_with_tanstack.md +3 -3
- package/docs/it/intlayer_with_vite+preact.md +13 -13
- package/docs/it/intlayer_with_vite+react.md +13 -13
- package/docs/it/intlayer_with_vite+solid.md +7 -7
- package/docs/it/intlayer_with_vite+svelte.md +7 -7
- package/docs/it/intlayer_with_vite+vue.md +15 -15
- package/docs/it/packages/vite-intlayer/index.md +3 -3
- package/docs/ja/intlayer_with_angular.md +3 -3
- package/docs/ja/intlayer_with_react_router_v7.md +3 -3
- package/docs/ja/intlayer_with_tanstack.md +3 -3
- package/docs/ja/intlayer_with_vite+preact.md +13 -13
- package/docs/ja/intlayer_with_vite+react.md +13 -13
- package/docs/ja/intlayer_with_vite+solid.md +11 -11
- package/docs/ja/intlayer_with_vite+svelte.md +7 -7
- package/docs/ja/intlayer_with_vite+vue.md +15 -15
- package/docs/ja/packages/vite-intlayer/index.md +3 -3
- package/docs/ko/intlayer_with_angular.md +3 -3
- package/docs/ko/intlayer_with_react_router_v7.md +3 -3
- package/docs/ko/intlayer_with_tanstack.md +3 -3
- package/docs/ko/intlayer_with_vite+preact.md +15 -15
- package/docs/ko/intlayer_with_vite+react.md +13 -13
- package/docs/ko/intlayer_with_vite+solid.md +7 -7
- package/docs/ko/intlayer_with_vite+svelte.md +12 -12
- package/docs/ko/intlayer_with_vite+vue.md +15 -15
- package/docs/ko/packages/vite-intlayer/index.md +3 -3
- package/docs/pt/intlayer_with_angular.md +3 -3
- package/docs/pt/intlayer_with_react_router_v7.md +3 -3
- package/docs/pt/intlayer_with_tanstack.md +3 -3
- package/docs/pt/intlayer_with_vite+preact.md +13 -13
- package/docs/pt/intlayer_with_vite+react.md +13 -13
- package/docs/pt/intlayer_with_vite+solid.md +7 -7
- package/docs/pt/intlayer_with_vite+svelte.md +7 -7
- package/docs/pt/intlayer_with_vite+vue.md +15 -15
- package/docs/pt/packages/vite-intlayer/index.md +3 -3
- package/docs/ru/intlayer_with_angular.md +3 -3
- package/docs/ru/intlayer_with_react_router_v7.md +3 -3
- package/docs/ru/intlayer_with_tanstack.md +3 -3
- package/docs/ru/intlayer_with_vite+preact.md +13 -13
- package/docs/ru/intlayer_with_vite+react.md +13 -13
- package/docs/ru/intlayer_with_vite+solid.md +7 -7
- package/docs/ru/intlayer_with_vite+svelte.md +7 -7
- package/docs/ru/intlayer_with_vite+vue.md +15 -15
- package/docs/ru/packages/vite-intlayer/index.md +3 -3
- package/docs/tr/intlayer_with_angular.md +3 -3
- package/docs/tr/intlayer_with_react_router_v7.md +3 -3
- package/docs/tr/intlayer_with_tanstack.md +2 -2
- package/docs/tr/intlayer_with_vite+preact.md +13 -13
- package/docs/tr/intlayer_with_vite+react.md +13 -13
- package/docs/tr/intlayer_with_vite+solid.md +7 -7
- package/docs/tr/intlayer_with_vite+svelte.md +7 -7
- package/docs/tr/intlayer_with_vite+vue.md +13 -13
- package/docs/tr/packages/vite-intlayer/index.md +3 -3
- package/docs/zh/intlayer_with_angular.md +3 -3
- package/docs/zh/intlayer_with_react_router_v7.md +3 -3
- package/docs/zh/intlayer_with_tanstack.md +3 -3
- package/docs/zh/intlayer_with_vite+preact.md +15 -15
- package/docs/zh/intlayer_with_vite+react.md +13 -13
- package/docs/zh/intlayer_with_vite+solid.md +7 -7
- package/docs/zh/intlayer_with_vite+svelte.md +7 -7
- package/docs/zh/intlayer_with_vite+vue.md +13 -13
- package/docs/zh/packages/vite-intlayer/index.md +3 -3
- package/frequent_questions/ar/intlayer_command_undefined.md +1 -2
- package/frequent_questions/de/intlayer_command_undefined.md +1 -2
- package/frequent_questions/en/intlayer_command_undefined.md +1 -2
- package/frequent_questions/en-GB/intlayer_command_undefined.md +1 -2
- package/frequent_questions/es/intlayer_command_undefined.md +1 -2
- package/frequent_questions/fr/intlayer_command_undefined.md +1 -2
- package/frequent_questions/hi/intlayer_command_undefined.md +1 -2
- package/frequent_questions/it/intlayer_command_undefined.md +1 -2
- package/frequent_questions/ja/intlayer_command_undefined.md +1 -2
- package/frequent_questions/ko/intlayer_command_undefined.md +1 -2
- package/frequent_questions/pt/intlayer_command_undefined.md +1 -2
- package/frequent_questions/ru/intlayer_command_undefined.md +1 -2
- package/frequent_questions/tr/intlayer_command_undefined.md +1 -1
- package/frequent_questions/zh/intlayer_command_undefined.md +1 -2
- package/package.json +10 -10
|
@@ -138,37 +138,37 @@ Agrega el plugin de intlayer en tu configuración.
|
|
|
138
138
|
```typescript fileName="vite.config.ts" codeFormat="typescript"
|
|
139
139
|
import { defineConfig } from "vite";
|
|
140
140
|
import preact from "@preact/preset-vite";
|
|
141
|
-
import {
|
|
141
|
+
import { intlayer } from "vite-intlayer";
|
|
142
142
|
|
|
143
143
|
// https://vitejs.dev/config/
|
|
144
144
|
export default defineConfig({
|
|
145
|
-
plugins: [preact(),
|
|
145
|
+
plugins: [preact(), intlayer()],
|
|
146
146
|
});
|
|
147
147
|
```
|
|
148
148
|
|
|
149
149
|
```javascript fileName="vite.config.mjs" codeFormat="esm"
|
|
150
150
|
import { defineConfig } from "vite";
|
|
151
151
|
import preact from "@preact/preset-vite";
|
|
152
|
-
import {
|
|
152
|
+
import { intlayer } from "vite-intlayer";
|
|
153
153
|
|
|
154
154
|
// https://vitejs.dev/config/
|
|
155
155
|
export default defineConfig({
|
|
156
|
-
plugins: [preact(),
|
|
156
|
+
plugins: [preact(), intlayer()],
|
|
157
157
|
});
|
|
158
158
|
```
|
|
159
159
|
|
|
160
160
|
```javascript fileName="vite.config.cjs" codeFormat="commonjs"
|
|
161
161
|
const { defineConfig } = require("vite");
|
|
162
162
|
const preact = require("@preact/preset-vite");
|
|
163
|
-
const {
|
|
163
|
+
const { intlayer } = require("vite-intlayer");
|
|
164
164
|
|
|
165
165
|
// https://vitejs.dev/config/
|
|
166
166
|
module.exports = defineConfig({
|
|
167
|
-
plugins: [preact(),
|
|
167
|
+
plugins: [preact(), intlayer()],
|
|
168
168
|
});
|
|
169
169
|
```
|
|
170
170
|
|
|
171
|
-
> El plugin `
|
|
171
|
+
> El plugin `intlayer()` de Vite se utiliza para integrar Intlayer con Vite. Garantiza la construcción de archivos de declaración de contenido y los supervisa en modo de desarrollo. Define variables de entorno de Intlayer dentro de la aplicación Vite. Además, proporciona alias para optimizar el rendimiento.
|
|
172
172
|
|
|
173
173
|
### Paso 4: Declara Tu Contenido
|
|
174
174
|
|
|
@@ -1060,33 +1060,33 @@ En paralelo, también puedes usar el `intlayerMiddlewarePlugin` para agregar enr
|
|
|
1060
1060
|
```typescript {3,7} fileName="vite.config.ts" codeFormat="typescript"
|
|
1061
1061
|
import { defineConfig } from "vite";
|
|
1062
1062
|
import preact from "@preact/preset-vite";
|
|
1063
|
-
import {
|
|
1063
|
+
import { intlayer, intlayerMiddlewarePlugin } from "vite-intlayer";
|
|
1064
1064
|
|
|
1065
1065
|
// https://vitejs.dev/config/
|
|
1066
1066
|
export default defineConfig({
|
|
1067
|
-
plugins: [preact(),
|
|
1067
|
+
plugins: [preact(), intlayer(), intlayerMiddlewarePlugin()],
|
|
1068
1068
|
});
|
|
1069
1069
|
```
|
|
1070
1070
|
|
|
1071
1071
|
```javascript {3,7} fileName="vite.config.mjs" codeFormat="esm"
|
|
1072
1072
|
import { defineConfig } from "vite";
|
|
1073
1073
|
import preact from "@preact/preset-vite";
|
|
1074
|
-
import {
|
|
1074
|
+
import { intlayer, intlayerMiddlewarePlugin } from "vite-intlayer";
|
|
1075
1075
|
|
|
1076
1076
|
// https://vitejs.dev/config/
|
|
1077
1077
|
export default defineConfig({
|
|
1078
|
-
plugins: [preact(),
|
|
1078
|
+
plugins: [preact(), intlayer(), intlayerMiddlewarePlugin()],
|
|
1079
1079
|
});
|
|
1080
1080
|
```
|
|
1081
1081
|
|
|
1082
1082
|
```javascript {3,7} fileName="vite.config.cjs" codeFormat="commonjs"
|
|
1083
1083
|
const { defineConfig } = require("vite");
|
|
1084
1084
|
const preact = require("@preact/preset-vite");
|
|
1085
|
-
const {
|
|
1085
|
+
const { intlayer, intlayerMiddlewarePlugin } = require("vite-intlayer");
|
|
1086
1086
|
|
|
1087
1087
|
// https://vitejs.dev/config/
|
|
1088
1088
|
module.exports = defineConfig({
|
|
1089
|
-
plugins: [preact(),
|
|
1089
|
+
plugins: [preact(), intlayer(), intlayerMiddlewarePlugin()],
|
|
1090
1090
|
});
|
|
1091
1091
|
```
|
|
1092
1092
|
|
|
@@ -137,37 +137,37 @@ Agrega el plugin intlayer en tu configuración.
|
|
|
137
137
|
```typescript fileName="vite.config.ts" codeFormat="typescript"
|
|
138
138
|
import { defineConfig } from "vite";
|
|
139
139
|
import react from "@vitejs/plugin-react-swc";
|
|
140
|
-
import {
|
|
140
|
+
import { intlayer } from "vite-intlayer";
|
|
141
141
|
|
|
142
142
|
// https://vitejs.dev/config/
|
|
143
143
|
export default defineConfig({
|
|
144
|
-
plugins: [react(),
|
|
144
|
+
plugins: [react(), intlayer()],
|
|
145
145
|
});
|
|
146
146
|
```
|
|
147
147
|
|
|
148
148
|
```javascript fileName="vite.config.mjs" codeFormat="esm"
|
|
149
149
|
import { defineConfig } from "vite";
|
|
150
150
|
import react from "@vitejs/plugin-react-swc";
|
|
151
|
-
import {
|
|
151
|
+
import { intlayer } from "vite-intlayer";
|
|
152
152
|
|
|
153
153
|
// https://vitejs.dev/config/
|
|
154
154
|
export default defineConfig({
|
|
155
|
-
plugins: [react(),
|
|
155
|
+
plugins: [react(), intlayer()],
|
|
156
156
|
});
|
|
157
157
|
```
|
|
158
158
|
|
|
159
159
|
```javascript fileName="vite.config.cjs" codeFormat="commonjs"
|
|
160
160
|
const { defineConfig } = require("vite");
|
|
161
161
|
const react = require("@vitejs/plugin-react-swc");
|
|
162
|
-
const {
|
|
162
|
+
const { intlayer } = require("vite-intlayer");
|
|
163
163
|
|
|
164
164
|
// https://vitejs.dev/config/
|
|
165
165
|
module.exports = defineConfig({
|
|
166
|
-
plugins: [react(),
|
|
166
|
+
plugins: [react(), intlayer()],
|
|
167
167
|
});
|
|
168
168
|
```
|
|
169
169
|
|
|
170
|
-
> El plugin `
|
|
170
|
+
> El plugin `intlayer()` de Vite se utiliza para integrar Intlayer con Vite. Garantiza la construcción de archivos de declaración de contenido y los supervisa en modo de desarrollo. Define variables de entorno de Intlayer dentro de la aplicación Vite. Además, proporciona alias para optimizar el rendimiento.
|
|
171
171
|
|
|
172
172
|
### Paso 4: Declara Tu Contenido
|
|
173
173
|
|
|
@@ -1008,33 +1008,33 @@ Paralelamente, también puedes usar el `intlayerMiddlewarePlugin` para agregar e
|
|
|
1008
1008
|
```typescript {3,7} fileName="vite.config.ts" codeFormat="typescript"
|
|
1009
1009
|
import { defineConfig } from "vite";
|
|
1010
1010
|
import react from "@vitejs/plugin-react-swc";
|
|
1011
|
-
import {
|
|
1011
|
+
import { intlayer, intlayerMiddlewarePlugin } from "vite-intlayer";
|
|
1012
1012
|
|
|
1013
1013
|
// https://vitejs.dev/config/
|
|
1014
1014
|
export default defineConfig({
|
|
1015
|
-
plugins: [react(),
|
|
1015
|
+
plugins: [react(), intlayer(), intlayerMiddlewarePlugin()],
|
|
1016
1016
|
});
|
|
1017
1017
|
```
|
|
1018
1018
|
|
|
1019
1019
|
```javascript {3,7} fileName="vite.config.mjs" codeFormat="esm"
|
|
1020
1020
|
import { defineConfig } from "vite";
|
|
1021
1021
|
import react from "@vitejs/plugin-react-swc";
|
|
1022
|
-
import {
|
|
1022
|
+
import { intlayer, intlayerMiddlewarePlugin } from "vite-intlayer";
|
|
1023
1023
|
|
|
1024
1024
|
// https://vitejs.dev/config/
|
|
1025
1025
|
export default defineConfig({
|
|
1026
|
-
plugins: [react(),
|
|
1026
|
+
plugins: [react(), intlayer(), intlayerMiddlewarePlugin()],
|
|
1027
1027
|
});
|
|
1028
1028
|
```
|
|
1029
1029
|
|
|
1030
1030
|
```javascript {3,7} fileName="vite.config.cjs" codeFormat="commonjs"
|
|
1031
1031
|
const { defineConfig } = require("vite");
|
|
1032
1032
|
const react = require("@vitejs/plugin-react-swc");
|
|
1033
|
-
const {
|
|
1033
|
+
const { intlayer, intlayerMiddlewarePlugin } = require("vite-intlayer");
|
|
1034
1034
|
|
|
1035
1035
|
// https://vitejs.dev/config/
|
|
1036
1036
|
module.exports = defineConfig({
|
|
1037
|
-
plugins: [react(),
|
|
1037
|
+
plugins: [react(), intlayer(), intlayerMiddlewarePlugin()],
|
|
1038
1038
|
});
|
|
1039
1039
|
```
|
|
1040
1040
|
|
|
@@ -139,37 +139,37 @@ Agrega el plugin intlayer en tu configuración.
|
|
|
139
139
|
```typescript fileName="vite.config.ts" codeFormat="typescript"
|
|
140
140
|
import { defineConfig } from "vite";
|
|
141
141
|
import react from "@vitejs/plugin-react-swc";
|
|
142
|
-
import {
|
|
142
|
+
import { intlayer } from "vite-intlayer";
|
|
143
143
|
|
|
144
144
|
// https://vitejs.dev/config/
|
|
145
145
|
export default defineConfig({
|
|
146
|
-
plugins: [react(),
|
|
146
|
+
plugins: [react(), intlayer()],
|
|
147
147
|
});
|
|
148
148
|
```
|
|
149
149
|
|
|
150
150
|
```javascript fileName="vite.config.mjs" codeFormat="esm"
|
|
151
151
|
import { defineConfig } from "vite";
|
|
152
152
|
import react from "@vitejs/plugin-react-swc";
|
|
153
|
-
import {
|
|
153
|
+
import { intlayer } from "vite-intlayer";
|
|
154
154
|
|
|
155
155
|
// https://vitejs.dev/config/
|
|
156
156
|
export default defineConfig({
|
|
157
|
-
plugins: [react(),
|
|
157
|
+
plugins: [react(), intlayer()],
|
|
158
158
|
});
|
|
159
159
|
```
|
|
160
160
|
|
|
161
161
|
```javascript fileName="vite.config.cjs" codeFormat="commonjs"
|
|
162
162
|
const { defineConfig } = require("vite");
|
|
163
163
|
const react = require("@vitejs/plugin-react-swc");
|
|
164
|
-
const {
|
|
164
|
+
const { intlayer } = require("vite-intlayer");
|
|
165
165
|
|
|
166
166
|
// https://vitejs.dev/config/
|
|
167
167
|
module.exports = defineConfig({
|
|
168
|
-
plugins: [react(),
|
|
168
|
+
plugins: [react(), intlayer()],
|
|
169
169
|
});
|
|
170
170
|
```
|
|
171
171
|
|
|
172
|
-
> El plugin `
|
|
172
|
+
> El plugin `intlayer()` de Vite se utiliza para integrar Intlayer con Vite. Asegura la construcción de archivos de declaración de contenido y los supervisa en modo de desarrollo. Define variables de entorno de Intlayer dentro de la aplicación Vite. Además, proporciona alias para optimizar el rendimiento.
|
|
173
173
|
|
|
174
174
|
### Paso 4: Declara tu contenido
|
|
175
175
|
|
|
@@ -139,37 +139,37 @@ Agrega el plugin intlayer en tu configuración.
|
|
|
139
139
|
```typescript fileName="vite.config.ts" codeFormat="typescript"
|
|
140
140
|
import { defineConfig } from "vite";
|
|
141
141
|
import react from "@vitejs/plugin-react-swc";
|
|
142
|
-
import {
|
|
142
|
+
import { intlayer } from "vite-intlayer";
|
|
143
143
|
|
|
144
144
|
// https://vitejs.dev/config/
|
|
145
145
|
export default defineConfig({
|
|
146
|
-
plugins: [react(),
|
|
146
|
+
plugins: [react(), intlayer()],
|
|
147
147
|
});
|
|
148
148
|
```
|
|
149
149
|
|
|
150
150
|
```javascript fileName="vite.config.mjs" codeFormat="esm"
|
|
151
151
|
import { defineConfig } from "vite";
|
|
152
152
|
import react from "@vitejs/plugin-react-swc";
|
|
153
|
-
import {
|
|
153
|
+
import { intlayer } from "vite-intlayer";
|
|
154
154
|
|
|
155
155
|
// https://vitejs.dev/config/
|
|
156
156
|
export default defineConfig({
|
|
157
|
-
plugins: [react(),
|
|
157
|
+
plugins: [react(), intlayer()],
|
|
158
158
|
});
|
|
159
159
|
```
|
|
160
160
|
|
|
161
161
|
```javascript fileName="vite.config.cjs" codeFormat="commonjs"
|
|
162
162
|
const { defineConfig } = require("vite");
|
|
163
163
|
const react = require("@vitejs/plugin-react-swc");
|
|
164
|
-
const {
|
|
164
|
+
const { intlayer } = require("vite-intlayer");
|
|
165
165
|
|
|
166
166
|
// https://vitejs.dev/config/
|
|
167
167
|
module.exports = defineConfig({
|
|
168
|
-
plugins: [react(),
|
|
168
|
+
plugins: [react(), intlayer()],
|
|
169
169
|
});
|
|
170
170
|
```
|
|
171
171
|
|
|
172
|
-
> El plugin `
|
|
172
|
+
> El plugin `intlayer()` para Vite se utiliza para integrar Intlayer con Vite. Asegura la construcción de archivos de declaración de contenido y los supervisa en modo de desarrollo. Define variables de entorno de Intlayer dentro de la aplicación Vite. Además, proporciona alias para optimizar el rendimiento.
|
|
173
173
|
|
|
174
174
|
### Paso 4: Declara Tu Contenido
|
|
175
175
|
|
|
@@ -136,37 +136,37 @@ Agrega el plugin de intlayer en tu configuración.
|
|
|
136
136
|
```typescript fileName="vite.config.ts" codeFormat="typescript"
|
|
137
137
|
import { defineConfig } from "vite";
|
|
138
138
|
import vue from "@vitejs/plugin-vue";
|
|
139
|
-
import {
|
|
139
|
+
import { intlayer } from "vite-intlayer";
|
|
140
140
|
|
|
141
141
|
// https://vitejs.dev/config/
|
|
142
142
|
export default defineConfig({
|
|
143
|
-
plugins: [vue(),
|
|
143
|
+
plugins: [vue(), intlayer()],
|
|
144
144
|
});
|
|
145
145
|
```
|
|
146
146
|
|
|
147
147
|
```javascript fileName="vite.config.mjs" codeFormat="esm"
|
|
148
148
|
import { defineConfig } from "vite";
|
|
149
149
|
import vue from "@vitejs/plugin-vue";
|
|
150
|
-
import {
|
|
150
|
+
import { intlayer } from "vite-intlayer";
|
|
151
151
|
|
|
152
152
|
// https://vitejs.dev/config/
|
|
153
153
|
export default defineConfig({
|
|
154
|
-
plugins: [vue(),
|
|
154
|
+
plugins: [vue(), intlayer()],
|
|
155
155
|
});
|
|
156
156
|
```
|
|
157
157
|
|
|
158
158
|
```javascript fileName="vite.config.cjs" codeFormat="commonjs"
|
|
159
159
|
const { defineConfig } = require("vite");
|
|
160
160
|
const vue = require("@vitejs/plugin-vue");
|
|
161
|
-
const {
|
|
161
|
+
const { intlayer } = require("vite-intlayer");
|
|
162
162
|
|
|
163
163
|
// https://vitejs.dev/config/
|
|
164
164
|
module.exports = defineConfig({
|
|
165
|
-
plugins: [vue(),
|
|
165
|
+
plugins: [vue(), intlayer()],
|
|
166
166
|
});
|
|
167
167
|
```
|
|
168
168
|
|
|
169
|
-
> El plugin `
|
|
169
|
+
> El plugin `intlayer()` de Vite se utiliza para integrar Intlayer con Vite. Asegura la construcción de archivos de declaración de contenido y los supervisa en modo de desarrollo. Define variables de entorno de Intlayer dentro de la aplicación Vite. Además, proporciona alias para optimizar el rendimiento.
|
|
170
170
|
|
|
171
171
|
### Paso 4: Declara Tu Contenido
|
|
172
172
|
|
|
@@ -702,41 +702,41 @@ Paralelamente, también puede usar el `intlayerMiddlewarePlugin` para agregar en
|
|
|
702
702
|
```typescript {3,7} fileName="vite.config.ts" codeFormat="typescript"
|
|
703
703
|
import { defineConfig } from "vite";
|
|
704
704
|
import vue from "@vitejs/plugin-vue";
|
|
705
|
-
import {
|
|
705
|
+
import { intlayer, intlayerMiddlewarePlugin } from "vite-intlayer";
|
|
706
706
|
|
|
707
707
|
// https://vitejs.dev/config/
|
|
708
708
|
export default defineConfig({
|
|
709
|
-
plugins: [vue(),
|
|
709
|
+
plugins: [vue(), intlayer(), intlayerMiddlewarePlugin()],
|
|
710
710
|
});
|
|
711
711
|
```
|
|
712
712
|
|
|
713
713
|
```javascript {3,7} fileName="vite.config.mjs" codeFormat="esm"
|
|
714
714
|
import { defineConfig } from "vite";
|
|
715
715
|
import vue from "@vitejs/plugin-vue";
|
|
716
|
-
import {
|
|
716
|
+
import { intlayer, intlayerMiddlewarePlugin } from "vite-intlayer";
|
|
717
717
|
|
|
718
718
|
// https://vitejs.dev/config/
|
|
719
719
|
export default defineConfig({
|
|
720
|
-
plugins: [vue(),
|
|
720
|
+
plugins: [vue(), intlayer(), intlayerMiddlewarePlugin()],
|
|
721
721
|
});
|
|
722
722
|
```
|
|
723
723
|
|
|
724
724
|
```javascript {3,7} fileName="vite.config.cjs" codeFormat="commonjs"
|
|
725
725
|
const { defineConfig } = require("vite");
|
|
726
726
|
const vue = require("@vitejs/plugin-vue");
|
|
727
|
-
const {
|
|
727
|
+
const { intlayer, intlayerMiddlewarePlugin } = require("vite-intlayer");
|
|
728
728
|
|
|
729
729
|
// https://vitejs.dev/config/
|
|
730
730
|
module.exports = defineConfig({
|
|
731
|
-
plugins: [vue(),
|
|
731
|
+
plugins: [vue(), intlayer(), intlayerMiddlewarePlugin()],
|
|
732
732
|
});
|
|
733
733
|
const { defineConfig } = require("vite");
|
|
734
734
|
const vue = require("@vitejs/plugin-vue");
|
|
735
|
-
const {
|
|
735
|
+
const { intlayer, intlayerMiddlewarePlugin } = require("vite-intlayer");
|
|
736
736
|
|
|
737
737
|
// https://vitejs.dev/config/
|
|
738
738
|
module.exports = defineConfig({
|
|
739
|
-
plugins: [vue(),
|
|
739
|
+
plugins: [vue(), intlayer(), intlayerMiddlewarePlugin()],
|
|
740
740
|
});
|
|
741
741
|
```
|
|
742
742
|
|
|
@@ -53,15 +53,15 @@ Consulta un ejemplo de cómo incluir los plugins en tu configuración de Vite.
|
|
|
53
53
|
|
|
54
54
|
```typescript fileName="vite.config.ts"
|
|
55
55
|
import { defineConfig } from "vite";
|
|
56
|
-
import {
|
|
56
|
+
import { intlayer, intlayerMiddlewarePlugin } from "vite-intlayer";
|
|
57
57
|
|
|
58
58
|
// https://vitejs.dev/config/
|
|
59
59
|
export default defineConfig({
|
|
60
|
-
plugins: [
|
|
60
|
+
plugins: [intlayer(), intlayerMiddlewarePlugin()],
|
|
61
61
|
});
|
|
62
62
|
```
|
|
63
63
|
|
|
64
|
-
> El plugin `
|
|
64
|
+
> El plugin `intlayer()` para Vite se utiliza para integrar Intlayer con Vite. Asegura la construcción de archivos de declaración de contenido y los supervisa en modo desarrollo. Define variables de entorno de Intlayer dentro de la aplicación Vite. Además, proporciona alias para optimizar el rendimiento.
|
|
65
65
|
|
|
66
66
|
> El plugin `intlayerMiddlewarePlugin()` añade enrutamiento del lado del servidor a tu aplicación. Este plugin detectará automáticamente la configuración regional actual basada en la URL y establecerá la cookie de localización apropiada. Si no se especifica ninguna localización, el plugin determinará la localización más adecuada basándose en las preferencias de idioma del navegador del usuario. Si no se detecta ninguna localización, redirigirá a la localización predeterminada.
|
|
67
67
|
|
|
@@ -174,7 +174,7 @@ import { prepareIntlayer, watch } from "@intlayer/chokidar";
|
|
|
174
174
|
import { getConfiguration, logger } from "@intlayer/config";
|
|
175
175
|
import type { Plugin } from "esbuild";
|
|
176
176
|
|
|
177
|
-
const
|
|
177
|
+
const intlayer: Plugin = {
|
|
178
178
|
name: "intlayer-esbuild-plugin",
|
|
179
179
|
setup(build) {
|
|
180
180
|
const configuration = getConfiguration();
|
|
@@ -204,10 +204,10 @@ const intlayerPlugin: Plugin = {
|
|
|
204
204
|
},
|
|
205
205
|
};
|
|
206
206
|
|
|
207
|
-
export default
|
|
207
|
+
export default intlayer;
|
|
208
208
|
```
|
|
209
209
|
|
|
210
|
-
> Le `
|
|
210
|
+
> Le `intlayer` pour esbuild garantit que Intlayer est préparé avant le démarrage de la compilation et surveille les changements en mode développement.
|
|
211
211
|
|
|
212
212
|
#### Option 2 : Utilisation de Webpack
|
|
213
213
|
|
|
@@ -146,20 +146,20 @@ Ajoutez le plugin intlayer dans votre configuration :
|
|
|
146
146
|
```typescript fileName="vite.config.ts" codeFormat="typescript"
|
|
147
147
|
import { reactRouter } from "@react-router/dev/vite";
|
|
148
148
|
import { defineConfig } from "vite";
|
|
149
|
-
import { intlayerMiddlewarePlugin,
|
|
149
|
+
import { intlayerMiddlewarePlugin, intlayer } from "vite-intlayer";
|
|
150
150
|
import tsconfigPaths from "vite-tsconfig-paths";
|
|
151
151
|
|
|
152
152
|
export default defineConfig({
|
|
153
153
|
plugins: [
|
|
154
154
|
reactRouter(),
|
|
155
155
|
tsconfigPaths(),
|
|
156
|
-
|
|
156
|
+
intlayer(),
|
|
157
157
|
intlayerMiddlewarePlugin(),
|
|
158
158
|
],
|
|
159
159
|
});
|
|
160
160
|
```
|
|
161
161
|
|
|
162
|
-
> Le plugin Vite `
|
|
162
|
+
> Le plugin Vite `intlayer()` est utilisé pour intégrer Intlayer avec Vite. Il assure la génération des fichiers de déclaration de contenu et les surveille en mode développement. Il définit les variables d'environnement Intlayer au sein de l'application Vite. De plus, il fournit des alias pour optimiser les performances.
|
|
163
163
|
|
|
164
164
|
### Étape 5 : Créer les composants de mise en page
|
|
165
165
|
|
|
@@ -140,20 +140,20 @@ Ajoutez le plugin intlayer dans votre configuration :
|
|
|
140
140
|
```typescript fileName="vite.config.ts" codeFormat="typescript"
|
|
141
141
|
import { reactRouter } from "@react-router/dev/vite";
|
|
142
142
|
import { defineConfig } from "vite";
|
|
143
|
-
import { intlayerMiddlewarePlugin,
|
|
143
|
+
import { intlayerMiddlewarePlugin, intlayer } from "vite-intlayer";
|
|
144
144
|
import tsconfigPaths from "vite-tsconfig-paths";
|
|
145
145
|
|
|
146
146
|
export default defineConfig({
|
|
147
147
|
plugins: [
|
|
148
148
|
reactRouter(),
|
|
149
149
|
tsconfigPaths(),
|
|
150
|
-
|
|
150
|
+
intlayer(),
|
|
151
151
|
intlayerMiddlewarePlugin(),
|
|
152
152
|
],
|
|
153
153
|
});
|
|
154
154
|
```
|
|
155
155
|
|
|
156
|
-
> Le plugin Vite `
|
|
156
|
+
> Le plugin Vite `intlayer()` est utilisé pour intégrer Intlayer avec Vite. Il assure la construction des fichiers de déclaration de contenu et les surveille en mode développement. Il définit les variables d'environnement Intlayer au sein de l'application Vite. De plus, il fournit des alias pour optimiser les performances.
|
|
157
157
|
|
|
158
158
|
### Étape 5 : Créez les composants de mise en page
|
|
159
159
|
|
|
@@ -138,37 +138,37 @@ Ajoutez le plugin intlayer dans votre configuration.
|
|
|
138
138
|
```typescript fileName="vite.config.ts" codeFormat="typescript"
|
|
139
139
|
import { defineConfig } from "vite";
|
|
140
140
|
import preact from "@preact/preset-vite";
|
|
141
|
-
import {
|
|
141
|
+
import { intlayer } from "vite-intlayer";
|
|
142
142
|
|
|
143
143
|
// https://vitejs.dev/config/
|
|
144
144
|
export default defineConfig({
|
|
145
|
-
plugins: [preact(),
|
|
145
|
+
plugins: [preact(), intlayer()],
|
|
146
146
|
});
|
|
147
147
|
```
|
|
148
148
|
|
|
149
149
|
```javascript fileName="vite.config.mjs" codeFormat="esm"
|
|
150
150
|
import { defineConfig } from "vite";
|
|
151
151
|
import preact from "@preact/preset-vite";
|
|
152
|
-
import {
|
|
152
|
+
import { intlayer } from "vite-intlayer";
|
|
153
153
|
|
|
154
154
|
// https://vitejs.dev/config/
|
|
155
155
|
export default defineConfig({
|
|
156
|
-
plugins: [preact(),
|
|
156
|
+
plugins: [preact(), intlayer()],
|
|
157
157
|
});
|
|
158
158
|
```
|
|
159
159
|
|
|
160
160
|
```javascript fileName="vite.config.cjs" codeFormat="commonjs"
|
|
161
161
|
const { defineConfig } = require("vite");
|
|
162
162
|
const preact = require("@preact/preset-vite");
|
|
163
|
-
const {
|
|
163
|
+
const { intlayer } = require("vite-intlayer");
|
|
164
164
|
|
|
165
165
|
// https://vitejs.dev/config/
|
|
166
166
|
module.exports = defineConfig({
|
|
167
|
-
plugins: [preact(),
|
|
167
|
+
plugins: [preact(), intlayer()],
|
|
168
168
|
});
|
|
169
169
|
```
|
|
170
170
|
|
|
171
|
-
> Le plugin Vite `
|
|
171
|
+
> Le plugin Vite `intlayer()` est utilisé pour intégrer Intlayer avec Vite. Il assure la génération des fichiers de déclaration de contenu et les surveille en mode développement. Il définit les variables d'environnement Intlayer au sein de l'application Vite. De plus, il fournit des alias pour optimiser les performances.
|
|
172
172
|
|
|
173
173
|
### Étape 4 : Déclarez Votre Contenu
|
|
174
174
|
|
|
@@ -1044,33 +1044,33 @@ En parallèle, vous pouvez également utiliser le `intlayerMiddlewarePlugin` pou
|
|
|
1044
1044
|
```typescript {3,7} fileName="vite.config.ts" codeFormat="typescript"
|
|
1045
1045
|
import { defineConfig } from "vite";
|
|
1046
1046
|
import preact from "@preact/preset-vite";
|
|
1047
|
-
import {
|
|
1047
|
+
import { intlayer, intlayerMiddlewarePlugin } from "vite-intlayer";
|
|
1048
1048
|
|
|
1049
1049
|
// https://vitejs.dev/config/
|
|
1050
1050
|
export default defineConfig({
|
|
1051
|
-
plugins: [preact(),
|
|
1051
|
+
plugins: [preact(), intlayer(), intlayerMiddlewarePlugin()],
|
|
1052
1052
|
});
|
|
1053
1053
|
```
|
|
1054
1054
|
|
|
1055
1055
|
```javascript {3,7} fileName="vite.config.mjs" codeFormat="esm"
|
|
1056
1056
|
import { defineConfig } from "vite";
|
|
1057
1057
|
import preact from "@preact/preset-vite";
|
|
1058
|
-
import {
|
|
1058
|
+
import { intlayer, intlayerMiddlewarePlugin } from "vite-intlayer";
|
|
1059
1059
|
|
|
1060
1060
|
// https://vitejs.dev/config/
|
|
1061
1061
|
export default defineConfig({
|
|
1062
|
-
plugins: [preact(),
|
|
1062
|
+
plugins: [preact(), intlayer(), intlayerMiddlewarePlugin()],
|
|
1063
1063
|
});
|
|
1064
1064
|
```
|
|
1065
1065
|
|
|
1066
1066
|
```javascript {3,7} fileName="vite.config.cjs" codeFormat="commonjs"
|
|
1067
1067
|
const { defineConfig } = require("vite");
|
|
1068
1068
|
const preact = require("@preact/preset-vite");
|
|
1069
|
-
const {
|
|
1069
|
+
const { intlayer, intlayerMiddlewarePlugin } = require("vite-intlayer");
|
|
1070
1070
|
|
|
1071
1071
|
// https://vitejs.dev/config/
|
|
1072
1072
|
module.exports = defineConfig({
|
|
1073
|
-
plugins: [preact(),
|
|
1073
|
+
plugins: [preact(), intlayer(), intlayerMiddlewarePlugin()],
|
|
1074
1074
|
});
|
|
1075
1075
|
```
|
|
1076
1076
|
|
|
@@ -137,37 +137,37 @@ Ajoutez le plugin intlayer dans votre configuration.
|
|
|
137
137
|
```typescript fileName="vite.config.ts" codeFormat="typescript"
|
|
138
138
|
import { defineConfig } from "vite";
|
|
139
139
|
import react from "@vitejs/plugin-react-swc";
|
|
140
|
-
import {
|
|
140
|
+
import { intlayer } from "vite-intlayer";
|
|
141
141
|
|
|
142
142
|
// https://vitejs.dev/config/
|
|
143
143
|
export default defineConfig({
|
|
144
|
-
plugins: [react(),
|
|
144
|
+
plugins: [react(), intlayer()],
|
|
145
145
|
});
|
|
146
146
|
```
|
|
147
147
|
|
|
148
148
|
```javascript fileName="vite.config.mjs" codeFormat="esm"
|
|
149
149
|
import { defineConfig } from "vite";
|
|
150
150
|
import react from "@vitejs/plugin-react-swc";
|
|
151
|
-
import {
|
|
151
|
+
import { intlayer } from "vite-intlayer";
|
|
152
152
|
|
|
153
153
|
// https://vitejs.dev/config/
|
|
154
154
|
export default defineConfig({
|
|
155
|
-
plugins: [react(),
|
|
155
|
+
plugins: [react(), intlayer()],
|
|
156
156
|
});
|
|
157
157
|
```
|
|
158
158
|
|
|
159
159
|
```javascript fileName="vite.config.cjs" codeFormat="commonjs"
|
|
160
160
|
const { defineConfig } = require("vite");
|
|
161
161
|
const react = require("@vitejs/plugin-react-swc");
|
|
162
|
-
const {
|
|
162
|
+
const { intlayer } = require("vite-intlayer");
|
|
163
163
|
|
|
164
164
|
// https://vitejs.dev/config/
|
|
165
165
|
module.exports = defineConfig({
|
|
166
|
-
plugins: [react(),
|
|
166
|
+
plugins: [react(), intlayer()],
|
|
167
167
|
});
|
|
168
168
|
```
|
|
169
169
|
|
|
170
|
-
> Le plugin Vite `
|
|
170
|
+
> Le plugin Vite `intlayer()` est utilisé pour intégrer Intlayer avec Vite. Il assure la génération des fichiers de déclaration de contenu et les surveille en mode développement. Il définit les variables d'environnement Intlayer au sein de l'application Vite. De plus, il fournit des alias pour optimiser les performances.
|
|
171
171
|
|
|
172
172
|
### Étape 4 : Déclarez Votre Contenu
|
|
173
173
|
|
|
@@ -1008,33 +1008,33 @@ En parallèle, vous pouvez également utiliser le `intlayerMiddlewarePlugin` pou
|
|
|
1008
1008
|
```typescript {3,7} fileName="vite.config.ts" codeFormat="typescript"
|
|
1009
1009
|
import { defineConfig } from "vite";
|
|
1010
1010
|
import react from "@vitejs/plugin-react-swc";
|
|
1011
|
-
import {
|
|
1011
|
+
import { intlayer, intlayerMiddlewarePlugin } from "vite-intlayer";
|
|
1012
1012
|
|
|
1013
1013
|
// https://vitejs.dev/config/
|
|
1014
1014
|
export default defineConfig({
|
|
1015
|
-
plugins: [react(),
|
|
1015
|
+
plugins: [react(), intlayer(), intlayerMiddlewarePlugin()],
|
|
1016
1016
|
});
|
|
1017
1017
|
```
|
|
1018
1018
|
|
|
1019
1019
|
```javascript {3,7} fileName="vite.config.mjs" codeFormat="esm"
|
|
1020
1020
|
import { defineConfig } from "vite";
|
|
1021
1021
|
import react from "@vitejs/plugin-react-swc";
|
|
1022
|
-
import {
|
|
1022
|
+
import { intlayer, intlayerMiddlewarePlugin } from "vite-intlayer";
|
|
1023
1023
|
|
|
1024
1024
|
// https://vitejs.dev/config/
|
|
1025
1025
|
export default defineConfig({
|
|
1026
|
-
plugins: [react(),
|
|
1026
|
+
plugins: [react(), intlayer(), intlayerMiddlewarePlugin()],
|
|
1027
1027
|
});
|
|
1028
1028
|
```
|
|
1029
1029
|
|
|
1030
1030
|
```javascript {3,7} fileName="vite.config.cjs" codeFormat="commonjs"
|
|
1031
1031
|
const { defineConfig } = require("vite");
|
|
1032
1032
|
const react = require("@vitejs/plugin-react-swc");
|
|
1033
|
-
const {
|
|
1033
|
+
const { intlayer, intlayerMiddlewarePlugin } = require("vite-intlayer");
|
|
1034
1034
|
|
|
1035
1035
|
// https://vitejs.dev/config/
|
|
1036
1036
|
module.exports = defineConfig({
|
|
1037
|
-
plugins: [react(),
|
|
1037
|
+
plugins: [react(), intlayer(), intlayerMiddlewarePlugin()],
|
|
1038
1038
|
});
|
|
1039
1039
|
```
|
|
1040
1040
|
|