@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.
Files changed (141) hide show
  1. package/docs/ar/intlayer_with_angular.md +3 -3
  2. package/docs/ar/intlayer_with_react_router_v7.md +3 -3
  3. package/docs/ar/intlayer_with_tanstack.md +3 -3
  4. package/docs/ar/intlayer_with_vite+preact.md +13 -13
  5. package/docs/ar/intlayer_with_vite+react.md +13 -13
  6. package/docs/ar/intlayer_with_vite+solid.md +7 -7
  7. package/docs/ar/intlayer_with_vite+svelte.md +7 -7
  8. package/docs/ar/intlayer_with_vite+vue.md +15 -15
  9. package/docs/ar/packages/vite-intlayer/index.md +3 -3
  10. package/docs/de/intlayer_with_angular.md +3 -3
  11. package/docs/de/intlayer_with_react_router_v7.md +3 -3
  12. package/docs/de/intlayer_with_tanstack.md +3 -3
  13. package/docs/de/intlayer_with_vite+preact.md +13 -13
  14. package/docs/de/intlayer_with_vite+react.md +13 -13
  15. package/docs/de/intlayer_with_vite+solid.md +7 -7
  16. package/docs/de/intlayer_with_vite+svelte.md +7 -7
  17. package/docs/de/intlayer_with_vite+vue.md +15 -15
  18. package/docs/de/packages/vite-intlayer/index.md +3 -3
  19. package/docs/en/intlayer_with_angular.md +3 -3
  20. package/docs/en/intlayer_with_react_router_v7.md +3 -3
  21. package/docs/en/intlayer_with_tanstack.md +3 -3
  22. package/docs/en/intlayer_with_vite+preact.md +13 -13
  23. package/docs/en/intlayer_with_vite+react.md +13 -13
  24. package/docs/en/intlayer_with_vite+solid.md +7 -7
  25. package/docs/en/intlayer_with_vite+svelte.md +7 -7
  26. package/docs/en/intlayer_with_vite+vue.md +13 -13
  27. package/docs/en/packages/vite-intlayer/index.md +3 -3
  28. package/docs/en-GB/intlayer_with_angular.md +3 -3
  29. package/docs/en-GB/intlayer_with_react_router_v7.md +3 -3
  30. package/docs/en-GB/intlayer_with_tanstack.md +3 -3
  31. package/docs/en-GB/intlayer_with_vite+preact.md +13 -13
  32. package/docs/en-GB/intlayer_with_vite+react.md +13 -13
  33. package/docs/en-GB/intlayer_with_vite+solid.md +7 -7
  34. package/docs/en-GB/intlayer_with_vite+svelte.md +7 -7
  35. package/docs/en-GB/intlayer_with_vite+vue.md +16 -17
  36. package/docs/en-GB/packages/vite-intlayer/index.md +3 -3
  37. package/docs/es/intlayer_with_angular.md +3 -3
  38. package/docs/es/intlayer_with_react_router_v7.md +3 -3
  39. package/docs/es/intlayer_with_tanstack.md +3 -3
  40. package/docs/es/intlayer_with_vite+preact.md +13 -13
  41. package/docs/es/intlayer_with_vite+react.md +13 -13
  42. package/docs/es/intlayer_with_vite+solid.md +7 -7
  43. package/docs/es/intlayer_with_vite+svelte.md +7 -7
  44. package/docs/es/intlayer_with_vite+vue.md +15 -15
  45. package/docs/es/packages/vite-intlayer/index.md +3 -3
  46. package/docs/fr/intlayer_with_angular.md +3 -3
  47. package/docs/fr/intlayer_with_react_router_v7.md +3 -3
  48. package/docs/fr/intlayer_with_tanstack.md +3 -3
  49. package/docs/fr/intlayer_with_vite+preact.md +13 -13
  50. package/docs/fr/intlayer_with_vite+react.md +13 -13
  51. package/docs/fr/intlayer_with_vite+solid.md +7 -7
  52. package/docs/fr/intlayer_with_vite+svelte.md +7 -7
  53. package/docs/fr/intlayer_with_vite+vue.md +15 -15
  54. package/docs/fr/packages/vite-intlayer/index.md +3 -3
  55. package/docs/hi/intlayer_with_angular.md +3 -3
  56. package/docs/hi/intlayer_with_react_router_v7.md +3 -3
  57. package/docs/hi/intlayer_with_tanstack.md +3 -3
  58. package/docs/hi/intlayer_with_vite+preact.md +13 -13
  59. package/docs/hi/intlayer_with_vite+react.md +13 -13
  60. package/docs/hi/intlayer_with_vite+solid.md +7 -7
  61. package/docs/hi/intlayer_with_vite+svelte.md +7 -7
  62. package/docs/hi/intlayer_with_vite+vue.md +15 -15
  63. package/docs/hi/packages/vite-intlayer/index.md +3 -3
  64. package/docs/it/intlayer_with_angular.md +3 -3
  65. package/docs/it/intlayer_with_react_router_v7.md +3 -3
  66. package/docs/it/intlayer_with_tanstack.md +3 -3
  67. package/docs/it/intlayer_with_vite+preact.md +13 -13
  68. package/docs/it/intlayer_with_vite+react.md +13 -13
  69. package/docs/it/intlayer_with_vite+solid.md +7 -7
  70. package/docs/it/intlayer_with_vite+svelte.md +7 -7
  71. package/docs/it/intlayer_with_vite+vue.md +15 -15
  72. package/docs/it/packages/vite-intlayer/index.md +3 -3
  73. package/docs/ja/intlayer_with_angular.md +3 -3
  74. package/docs/ja/intlayer_with_react_router_v7.md +3 -3
  75. package/docs/ja/intlayer_with_tanstack.md +3 -3
  76. package/docs/ja/intlayer_with_vite+preact.md +13 -13
  77. package/docs/ja/intlayer_with_vite+react.md +13 -13
  78. package/docs/ja/intlayer_with_vite+solid.md +11 -11
  79. package/docs/ja/intlayer_with_vite+svelte.md +7 -7
  80. package/docs/ja/intlayer_with_vite+vue.md +15 -15
  81. package/docs/ja/packages/vite-intlayer/index.md +3 -3
  82. package/docs/ko/intlayer_with_angular.md +3 -3
  83. package/docs/ko/intlayer_with_react_router_v7.md +3 -3
  84. package/docs/ko/intlayer_with_tanstack.md +3 -3
  85. package/docs/ko/intlayer_with_vite+preact.md +15 -15
  86. package/docs/ko/intlayer_with_vite+react.md +13 -13
  87. package/docs/ko/intlayer_with_vite+solid.md +7 -7
  88. package/docs/ko/intlayer_with_vite+svelte.md +12 -12
  89. package/docs/ko/intlayer_with_vite+vue.md +15 -15
  90. package/docs/ko/packages/vite-intlayer/index.md +3 -3
  91. package/docs/pt/intlayer_with_angular.md +3 -3
  92. package/docs/pt/intlayer_with_react_router_v7.md +3 -3
  93. package/docs/pt/intlayer_with_tanstack.md +3 -3
  94. package/docs/pt/intlayer_with_vite+preact.md +13 -13
  95. package/docs/pt/intlayer_with_vite+react.md +13 -13
  96. package/docs/pt/intlayer_with_vite+solid.md +7 -7
  97. package/docs/pt/intlayer_with_vite+svelte.md +7 -7
  98. package/docs/pt/intlayer_with_vite+vue.md +15 -15
  99. package/docs/pt/packages/vite-intlayer/index.md +3 -3
  100. package/docs/ru/intlayer_with_angular.md +3 -3
  101. package/docs/ru/intlayer_with_react_router_v7.md +3 -3
  102. package/docs/ru/intlayer_with_tanstack.md +3 -3
  103. package/docs/ru/intlayer_with_vite+preact.md +13 -13
  104. package/docs/ru/intlayer_with_vite+react.md +13 -13
  105. package/docs/ru/intlayer_with_vite+solid.md +7 -7
  106. package/docs/ru/intlayer_with_vite+svelte.md +7 -7
  107. package/docs/ru/intlayer_with_vite+vue.md +15 -15
  108. package/docs/ru/packages/vite-intlayer/index.md +3 -3
  109. package/docs/tr/intlayer_with_angular.md +3 -3
  110. package/docs/tr/intlayer_with_react_router_v7.md +3 -3
  111. package/docs/tr/intlayer_with_tanstack.md +2 -2
  112. package/docs/tr/intlayer_with_vite+preact.md +13 -13
  113. package/docs/tr/intlayer_with_vite+react.md +13 -13
  114. package/docs/tr/intlayer_with_vite+solid.md +7 -7
  115. package/docs/tr/intlayer_with_vite+svelte.md +7 -7
  116. package/docs/tr/intlayer_with_vite+vue.md +13 -13
  117. package/docs/tr/packages/vite-intlayer/index.md +3 -3
  118. package/docs/zh/intlayer_with_angular.md +3 -3
  119. package/docs/zh/intlayer_with_react_router_v7.md +3 -3
  120. package/docs/zh/intlayer_with_tanstack.md +3 -3
  121. package/docs/zh/intlayer_with_vite+preact.md +15 -15
  122. package/docs/zh/intlayer_with_vite+react.md +13 -13
  123. package/docs/zh/intlayer_with_vite+solid.md +7 -7
  124. package/docs/zh/intlayer_with_vite+svelte.md +7 -7
  125. package/docs/zh/intlayer_with_vite+vue.md +13 -13
  126. package/docs/zh/packages/vite-intlayer/index.md +3 -3
  127. package/frequent_questions/ar/intlayer_command_undefined.md +1 -2
  128. package/frequent_questions/de/intlayer_command_undefined.md +1 -2
  129. package/frequent_questions/en/intlayer_command_undefined.md +1 -2
  130. package/frequent_questions/en-GB/intlayer_command_undefined.md +1 -2
  131. package/frequent_questions/es/intlayer_command_undefined.md +1 -2
  132. package/frequent_questions/fr/intlayer_command_undefined.md +1 -2
  133. package/frequent_questions/hi/intlayer_command_undefined.md +1 -2
  134. package/frequent_questions/it/intlayer_command_undefined.md +1 -2
  135. package/frequent_questions/ja/intlayer_command_undefined.md +1 -2
  136. package/frequent_questions/ko/intlayer_command_undefined.md +1 -2
  137. package/frequent_questions/pt/intlayer_command_undefined.md +1 -2
  138. package/frequent_questions/ru/intlayer_command_undefined.md +1 -2
  139. package/frequent_questions/tr/intlayer_command_undefined.md +1 -1
  140. package/frequent_questions/zh/intlayer_command_undefined.md +1 -2
  141. package/package.json +10 -10
@@ -134,37 +134,37 @@ Add the intlayer plugin into your configuration.
134
134
  ```typescript fileName="vite.config.ts" codeFormat="typescript"
135
135
  import { defineConfig } from "vite";
136
136
  import vue from "@vitejs/plugin-vue";
137
- import { intlayerPlugin } from "vite-intlayer";
137
+ import { intlayer } from "vite-intlayer";
138
138
 
139
139
  // https://vitejs.dev/config/
140
140
  export default defineConfig({
141
- plugins: [vue(), intlayerPlugin()],
141
+ plugins: [vue(), intlayer()],
142
142
  });
143
143
  ```
144
144
 
145
145
  ```javascript fileName="vite.config.mjs" codeFormat="esm"
146
146
  import { defineConfig } from "vite";
147
147
  import vue from "@vitejs/plugin-vue";
148
- import { intlayerPlugin } from "vite-intlayer";
148
+ import { intlayer } from "vite-intlayer";
149
149
 
150
150
  // https://vitejs.dev/config/
151
151
  export default defineConfig({
152
- plugins: [vue(), intlayerPlugin()],
152
+ plugins: [vue(), intlayer()],
153
153
  });
154
154
  ```
155
155
 
156
156
  ```javascript fileName="vite.config.cjs" codeFormat="commonjs"
157
157
  const { defineConfig } = require("vite");
158
158
  const vue = require("@vitejs/plugin-vue");
159
- const { intlayerPlugin } = require("vite-intlayer");
159
+ const { intlayer } = require("vite-intlayer");
160
160
 
161
161
  // https://vitejs.dev/config/
162
162
  module.exports = defineConfig({
163
- plugins: [vue(), intlayerPlugin()],
163
+ plugins: [vue(), intlayer()],
164
164
  });
165
165
  ```
166
166
 
167
- > The `intlayerPlugin()` Vite plugin is used to integrate Intlayer with Vite. It ensures the building of content declaration files and monitors them in development mode. It defines Intlayer environment variables within the Vite application. Additionally, it provides aliases to optimize performance.
167
+ > The `intlayer()` Vite plugin is used to integrate Intlayer with Vite. It ensures the building of content declaration files and monitors them in development mode. It defines Intlayer environment variables within the Vite application. Additionally, it provides aliases to optimize performance.
168
168
 
169
169
  ### Step 4: Declare Your Content
170
170
 
@@ -652,33 +652,33 @@ In parallel, you can also use the `intlayerMiddlewarePlugin` to add server-side
652
652
  ```typescript {3,7} fileName="vite.config.ts" codeFormat="typescript"
653
653
  import { defineConfig } from "vite";
654
654
  import vue from "@vitejs/plugin-vue";
655
- import { intlayerPlugin, intlayerMiddlewarePlugin } from "vite-intlayer";
655
+ import { intlayer, intlayerMiddlewarePlugin } from "vite-intlayer";
656
656
 
657
657
  // https://vitejs.dev/config/
658
658
  export default defineConfig({
659
- plugins: [vue(), intlayerPlugin(), intlayerMiddlewarePlugin()],
659
+ plugins: [vue(), intlayer(), intlayerMiddlewarePlugin()],
660
660
  });
661
661
  ```
662
662
 
663
663
  ```javascript {3,7} fileName="vite.config.mjs" codeFormat="esm"
664
664
  import { defineConfig } from "vite";
665
665
  import vue from "@vitejs/plugin-vue";
666
- import { intlayerPlugin, intlayerMiddlewarePlugin } from "vite-intlayer";
666
+ import { intlayer, intlayerMiddlewarePlugin } from "vite-intlayer";
667
667
 
668
668
  // https://vitejs.dev/config/
669
669
  export default defineConfig({
670
- plugins: [vue(), intlayerPlugin(), intlayerMiddlewarePlugin()],
670
+ plugins: [vue(), intlayer(), intlayerMiddlewarePlugin()],
671
671
  });
672
672
  ```
673
673
 
674
674
  ```javascript {3,7} fileName="vite.config.cjs" codeFormat="commonjs"
675
675
  const { defineConfig } = require("vite");
676
676
  const vue = require("@vitejs/plugin-vue");
677
- const { intlayerPlugin, intlayerMiddlewarePlugin } = require("vite-intlayer");
677
+ const { intlayer, intlayerMiddlewarePlugin } = require("vite-intlayer");
678
678
 
679
679
  // https://vitejs.dev/config/
680
680
  module.exports = defineConfig({
681
- plugins: [vue(), intlayerPlugin(), intlayerMiddlewarePlugin()],
681
+ plugins: [vue(), intlayer(), intlayerMiddlewarePlugin()],
682
682
  });
683
683
  ```
684
684
 
@@ -53,15 +53,15 @@ See an example of how to include the plugins into your vite configuration.
53
53
 
54
54
  ```typescript fileName="vite.config.ts"
55
55
  import { defineConfig } from "vite";
56
- import { intlayerPlugin, intlayerMiddlewarePlugin } from "vite-intlayer";
56
+ import { intlayer, intlayerMiddlewarePlugin } from "vite-intlayer";
57
57
 
58
58
  // https://vitejs.dev/config/
59
59
  export default defineConfig({
60
- plugins: [intlayerPlugin(), intlayerMiddlewarePlugin()],
60
+ plugins: [intlayer(), intlayerMiddlewarePlugin()],
61
61
  });
62
62
  ```
63
63
 
64
- > The `intlayerPlugin()` Vite plugin is used to integrate Intlayer with Vite. It ensures the building of content declaration files and monitors them in development mode. It defines Intlayer environment variables within the Vite application. Additionally, it provides aliases to optimize performance.
64
+ > The `intlayer()` Vite plugin is used to integrate Intlayer with Vite. It ensures the building of content declaration files and monitors them in development mode. It defines Intlayer environment variables within the Vite application. Additionally, it provides aliases to optimize performance.
65
65
 
66
66
  > The `intlayerMiddlewarePlugin()` add server-side routing to your application. This plugin will automatically detect the current locale based on the URL and set the appropriate locale cookie. If no locale is specified, the plugin will determine the most appropriate locale based on the user's browser language preferences. If no locale is detected, it will redirect to the default locale.
67
67
 
@@ -183,7 +183,7 @@ import { prepareIntlayer, watch } from "@intlayer/chokidar";
183
183
  import { getConfiguration, logger } from "@intlayer/config";
184
184
  import type { Plugin } from "esbuild";
185
185
 
186
- const intlayerPlugin: Plugin = {
186
+ const intlayer: Plugin = {
187
187
  name: "intlayer-esbuild-plugin",
188
188
  setup(build) {
189
189
  const configuration = getConfiguration();
@@ -213,10 +213,10 @@ const intlayerPlugin: Plugin = {
213
213
  },
214
214
  };
215
215
 
216
- export default intlayerPlugin;
216
+ export default intlayer;
217
217
  ```
218
218
 
219
- > The `intlayerPlugin` for esbuild ensures that Intlayer is prepared before the build starts and watches for changes in development mode.
219
+ > The `intlayer` for esbuild ensures that Intlayer is prepared before the build starts and watches for changes in development mode.
220
220
 
221
221
  #### Option 2: Using Webpack
222
222
 
@@ -144,20 +144,20 @@ Add the intlayer plugin into your configuration:
144
144
  ```typescript fileName="vite.config.ts" codeFormat="typescript"
145
145
  import { reactRouter } from "@react-router/dev/vite";
146
146
  import { defineConfig } from "vite";
147
- import { intlayerMiddlewarePlugin, intlayerPlugin } from "vite-intlayer";
147
+ import { intlayerMiddlewarePlugin, intlayer } from "vite-intlayer";
148
148
  import tsconfigPaths from "vite-tsconfig-paths";
149
149
 
150
150
  export default defineConfig({
151
151
  plugins: [
152
152
  reactRouter(),
153
153
  tsconfigPaths(),
154
- intlayerPlugin(),
154
+ intlayer(),
155
155
  intlayerMiddlewarePlugin(),
156
156
  ],
157
157
  });
158
158
  ```
159
159
 
160
- > The `intlayerPlugin()` Vite plugin is used to integrate Intlayer with Vite. It ensures the building of content declaration files and monitors them in development mode. It defines Intlayer environment variables within the Vite application. Additionally, it provides aliases to optimise performance.
160
+ > The `intlayer()` Vite plugin is used to integrate Intlayer with Vite. It ensures the building of content declaration files and monitors them in development mode. It defines Intlayer environment variables within the Vite application. Additionally, it provides aliases to optimise performance.
161
161
 
162
162
  ### Step 5: Create Layout Components
163
163
 
@@ -140,20 +140,20 @@ Add the intlayer plugin into your 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, intlayerPlugin } from "vite-intlayer";
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
- intlayerPlugin(),
150
+ intlayer(),
151
151
  intlayerMiddlewarePlugin(),
152
152
  ],
153
153
  });
154
154
  ```
155
155
 
156
- > The `intlayerPlugin()` Vite plugin is used to integrate Intlayer with Vite. It ensures the building of content declaration files and monitors them in development mode. It defines Intlayer environment variables within the Vite application. Additionally, it provides aliases to optimise performance.
156
+ > The `intlayer()` Vite plugin is used to integrate Intlayer with Vite. It ensures the building of content declaration files and monitors them in development mode. It defines Intlayer environment variables within the Vite application. Additionally, it provides aliases to optimise performance.
157
157
 
158
158
  ### Step 5: Create Layout Components
159
159
 
@@ -136,37 +136,37 @@ Add the intlayer plugin into your configuration.
136
136
  ```typescript fileName="vite.config.ts" codeFormat="typescript"
137
137
  import { defineConfig } from "vite";
138
138
  import preact from "@preact/preset-vite";
139
- import { intlayerPlugin } from "vite-intlayer";
139
+ import { intlayer } from "vite-intlayer";
140
140
 
141
141
  // https://vitejs.dev/config/
142
142
  export default defineConfig({
143
- plugins: [preact(), intlayerPlugin()],
143
+ plugins: [preact(), 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 preact from "@preact/preset-vite";
150
- import { intlayerPlugin } from "vite-intlayer";
150
+ import { intlayer } from "vite-intlayer";
151
151
 
152
152
  // https://vitejs.dev/config/
153
153
  export default defineConfig({
154
- plugins: [preact(), intlayerPlugin()],
154
+ plugins: [preact(), 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 preact = require("@preact/preset-vite");
161
- const { intlayerPlugin } = require("vite-intlayer");
161
+ const { intlayer } = require("vite-intlayer");
162
162
 
163
163
  // https://vitejs.dev/config/
164
164
  module.exports = defineConfig({
165
- plugins: [preact(), intlayerPlugin()],
165
+ plugins: [preact(), intlayer()],
166
166
  });
167
167
  ```
168
168
 
169
- > The `intlayerPlugin()` Vite plugin is used to integrate Intlayer with Vite. It ensures the building of content declaration files and monitors them in development mode. It defines Intlayer environment variables within the Vite application. Additionally, it provides aliases to optimise performance.
169
+ > The `intlayer()` Vite plugin is used to integrate Intlayer with Vite. It ensures the building of content declaration files and monitors them in development mode. It defines Intlayer environment variables within the Vite application. Additionally, it provides aliases to optimise performance.
170
170
 
171
171
  ### Step 4: Declare Your Content
172
172
 
@@ -1053,33 +1053,33 @@ In parallel, you can also use the `intlayerMiddlewarePlugin` to add server-side
1053
1053
  ```typescript {3,7} fileName="vite.config.ts" codeFormat="typescript"
1054
1054
  import { defineConfig } from "vite";
1055
1055
  import preact from "@preact/preset-vite";
1056
- import { intlayerPlugin, intlayerMiddlewarePlugin } from "vite-intlayer";
1056
+ import { intlayer, intlayerMiddlewarePlugin } from "vite-intlayer";
1057
1057
 
1058
1058
  // https://vitejs.dev/config/
1059
1059
  export default defineConfig({
1060
- plugins: [preact(), intlayerPlugin(), intlayerMiddlewarePlugin()],
1060
+ plugins: [preact(), intlayer(), intlayerMiddlewarePlugin()],
1061
1061
  });
1062
1062
  ```
1063
1063
 
1064
1064
  ```javascript {3,7} fileName="vite.config.mjs" codeFormat="esm"
1065
1065
  import { defineConfig } from "vite";
1066
1066
  import preact from "@preact/preset-vite";
1067
- import { intlayerPlugin, intlayerMiddlewarePlugin } from "vite-intlayer";
1067
+ import { intlayer, intlayerMiddlewarePlugin } from "vite-intlayer";
1068
1068
 
1069
1069
  // https://vitejs.dev/config/
1070
1070
  export default defineConfig({
1071
- plugins: [preact(), intlayerPlugin(), intlayerMiddlewarePlugin()],
1071
+ plugins: [preact(), intlayer(), intlayerMiddlewarePlugin()],
1072
1072
  });
1073
1073
  ```
1074
1074
 
1075
1075
  ```javascript {3,7} fileName="vite.config.cjs" codeFormat="commonjs"
1076
1076
  const { defineConfig } = require("vite");
1077
1077
  const preact = require("@preact/preset-vite");
1078
- const { intlayerPlugin, intlayerMiddlewarePlugin } = require("vite-intlayer");
1078
+ const { intlayer, intlayerMiddlewarePlugin } = require("vite-intlayer");
1079
1079
 
1080
1080
  // https://vitejs.dev/config/
1081
1081
  module.exports = defineConfig({
1082
- plugins: [preact(), intlayerPlugin(), intlayerMiddlewarePlugin()],
1082
+ plugins: [preact(), intlayer(), intlayerMiddlewarePlugin()],
1083
1083
  });
1084
1084
  ```
1085
1085
 
@@ -137,37 +137,37 @@ Add the intlayer plugin into your 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 { intlayerPlugin } from "vite-intlayer";
140
+ import { intlayer } from "vite-intlayer";
141
141
 
142
142
  // https://vitejs.dev/config/
143
143
  export default defineConfig({
144
- plugins: [react(), intlayerPlugin()],
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 { intlayerPlugin } from "vite-intlayer";
151
+ import { intlayer } from "vite-intlayer";
152
152
 
153
153
  // https://vitejs.dev/config/
154
154
  export default defineConfig({
155
- plugins: [react(), intlayerPlugin()],
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 { intlayerPlugin } = require("vite-intlayer");
162
+ const { intlayer } = require("vite-intlayer");
163
163
 
164
164
  // https://vitejs.dev/config/
165
165
  module.exports = defineConfig({
166
- plugins: [react(), intlayerPlugin()],
166
+ plugins: [react(), intlayer()],
167
167
  });
168
168
  ```
169
169
 
170
- > The `intlayerPlugin()` Vite plugin is used to integrate Intlayer with Vite. It ensures the building of content declaration files and monitors them in development mode. It defines Intlayer environment variables within the Vite application. Additionally, it provides aliases to optimise performance.
170
+ > The `intlayer()` Vite plugin is used to integrate Intlayer with Vite. It ensures the building of content declaration files and monitors them in development mode. It defines Intlayer environment variables within the Vite application. Additionally, it provides aliases to optimise performance.
171
171
 
172
172
  ### Step 4: Declare Your Content
173
173
 
@@ -1042,33 +1042,33 @@ In parallel, you can also use the `intlayerMiddlewarePlugin` to add server-side
1042
1042
  ```typescript {3,7} fileName="vite.config.ts" codeFormat="typescript"
1043
1043
  import { defineConfig } from "vite";
1044
1044
  import react from "@vitejs/plugin-react-swc";
1045
- import { intlayerPlugin, intlayerMiddlewarePlugin } from "vite-intlayer";
1045
+ import { intlayer, intlayerMiddlewarePlugin } from "vite-intlayer";
1046
1046
 
1047
1047
  // https://vitejs.dev/config/
1048
1048
  export default defineConfig({
1049
- plugins: [react(), intlayerPlugin(), intlayerMiddlewarePlugin()],
1049
+ plugins: [react(), intlayer(), intlayerMiddlewarePlugin()],
1050
1050
  });
1051
1051
  ```
1052
1052
 
1053
1053
  ```javascript {3,7} fileName="vite.config.mjs" codeFormat="esm"
1054
1054
  import { defineConfig } from "vite";
1055
1055
  import react from "@vitejs/plugin-react-swc";
1056
- import { intlayerPlugin, intlayerMiddlewarePlugin } from "vite-intlayer";
1056
+ import { intlayer, intlayerMiddlewarePlugin } from "vite-intlayer";
1057
1057
 
1058
1058
  // https://vitejs.dev/config/
1059
1059
  export default defineConfig({
1060
- plugins: [react(), intlayerPlugin(), intlayerMiddlewarePlugin()],
1060
+ plugins: [react(), intlayer(), intlayerMiddlewarePlugin()],
1061
1061
  });
1062
1062
  ```
1063
1063
 
1064
1064
  ```javascript {3,7} fileName="vite.config.cjs" codeFormat="commonjs"
1065
1065
  const { defineConfig } = require("vite");
1066
1066
  const react = require("@vitejs/plugin-react-swc");
1067
- const { intlayerPlugin, intlayerMiddlewarePlugin } = require("vite-intlayer");
1067
+ const { intlayer, intlayerMiddlewarePlugin } = require("vite-intlayer");
1068
1068
 
1069
1069
  // https://vitejs.dev/config/
1070
1070
  module.exports = defineConfig({
1071
- plugins: [react(), intlayerPlugin(), intlayerMiddlewarePlugin()],
1071
+ plugins: [react(), intlayer(), intlayerMiddlewarePlugin()],
1072
1072
  });
1073
1073
  ```
1074
1074
 
@@ -138,37 +138,37 @@ Add the intlayer plugin to your configuration.
138
138
  ```typescript fileName="vite.config.ts" codeFormat="typescript"
139
139
  import { defineConfig } from "vite";
140
140
  import react from "@vitejs/plugin-react-swc";
141
- import { intlayerPlugin } from "vite-intlayer";
141
+ import { intlayer } from "vite-intlayer";
142
142
 
143
143
  // https://vitejs.dev/config/
144
144
  export default defineConfig({
145
- plugins: [react(), intlayerPlugin()],
145
+ plugins: [react(), 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 react from "@vitejs/plugin-react-swc";
152
- import { intlayerPlugin } from "vite-intlayer";
152
+ import { intlayer } from "vite-intlayer";
153
153
 
154
154
  // https://vitejs.dev/config/
155
155
  export default defineConfig({
156
- plugins: [react(), intlayerPlugin()],
156
+ plugins: [react(), 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 react = require("@vitejs/plugin-react-swc");
163
- const { intlayerPlugin } = require("vite-intlayer");
163
+ const { intlayer } = require("vite-intlayer");
164
164
 
165
165
  // https://vitejs.dev/config/
166
166
  module.exports = defineConfig({
167
- plugins: [react(), intlayerPlugin()],
167
+ plugins: [react(), intlayer()],
168
168
  });
169
169
  ```
170
170
 
171
- > The `intlayerPlugin()` Vite plugin is used to integrate Intlayer with Vite. It ensures the building of content declaration files and monitors them in development mode. It defines Intlayer environment variables within the Vite application. Additionally, it provides aliases to optimise performance.
171
+ > The `intlayer()` Vite plugin is used to integrate Intlayer with Vite. It ensures the building of content declaration files and monitors them in development mode. It defines Intlayer environment variables within the Vite application. Additionally, it provides aliases to optimise performance.
172
172
 
173
173
  ### Step 4: Declare Your Content
174
174
 
@@ -136,37 +136,37 @@ Add the intlayer plugin into your configuration.
136
136
  ```typescript fileName="vite.config.ts" codeFormat="typescript"
137
137
  import { defineConfig } from "vite";
138
138
  import react from "@vitejs/plugin-react-swc";
139
- import { intlayerPlugin } from "vite-intlayer";
139
+ import { intlayer } from "vite-intlayer";
140
140
 
141
141
  // https://vitejs.dev/config/
142
142
  export default defineConfig({
143
- plugins: [react(), intlayerPlugin()],
143
+ plugins: [react(), 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 react from "@vitejs/plugin-react-swc";
150
- import { intlayerPlugin } from "vite-intlayer";
150
+ import { intlayer } from "vite-intlayer";
151
151
 
152
152
  // https://vitejs.dev/config/
153
153
  export default defineConfig({
154
- plugins: [react(), intlayerPlugin()],
154
+ plugins: [react(), 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 react = require("@vitejs/plugin-react-swc");
161
- const { intlayerPlugin } = require("vite-intlayer");
161
+ const { intlayer } = require("vite-intlayer");
162
162
 
163
163
  // https://vitejs.dev/config/
164
164
  module.exports = defineConfig({
165
- plugins: [react(), intlayerPlugin()],
165
+ plugins: [react(), intlayer()],
166
166
  });
167
167
  ```
168
168
 
169
- > The `intlayerPlugin()` Vite plugin is used to integrate Intlayer with Vite. It ensures the building of content declaration files and monitors them in development mode. It defines Intlayer environment variables within the Vite application. Additionally, it provides aliases to optimise performance.
169
+ > The `intlayer()` Vite plugin is used to integrate Intlayer with Vite. It ensures the building of content declaration files and monitors them in development mode. It defines Intlayer environment variables within the Vite application. Additionally, it provides aliases to optimise performance.
170
170
 
171
171
  ### Step 4: Declare Your Content
172
172
 
@@ -136,37 +136,37 @@ Add the intlayer plugin into your configuration.
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 { intlayerPlugin } from "vite-intlayer";
139
+ import { intlayer } from "vite-intlayer";
140
140
 
141
141
  // https://vitejs.dev/config/
142
142
  export default defineConfig({
143
- plugins: [vue(), intlayerPlugin()],
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 { intlayerPlugin } from "vite-intlayer";
150
+ import { intlayer } from "vite-intlayer";
151
151
 
152
152
  // https://vitejs.dev/config/
153
153
  export default defineConfig({
154
- plugins: [vue(), intlayerPlugin()],
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 { intlayerPlugin } = require("vite-intlayer");
161
+ const { intlayer } = require("vite-intlayer");
162
162
 
163
163
  // https://vitejs.dev/config/
164
164
  module.exports = defineConfig({
165
- plugins: [vue(), intlayerPlugin()],
165
+ plugins: [vue(), intlayer()],
166
166
  });
167
167
  ```
168
168
 
169
- > The `intlayerPlugin()` Vite plugin is used to integrate Intlayer with Vite. It ensures the building of content declaration files and monitors them in development mode. It defines Intlayer environment variables within the Vite application. Additionally, it provides aliases to optimise performance.
169
+ > The `intlayer()` Vite plugin is used to integrate Intlayer with Vite. It ensures the building of content declaration files and monitors them in development mode. It defines Intlayer environment variables within the Vite application. Additionally, it provides aliases to optimise performance.
170
170
 
171
171
  ### Step 4: Declare Your Content
172
172
 
@@ -677,33 +677,33 @@ In parallel, you can also use the `intlayerMiddlewarePlugin` to add server-side
677
677
  ```typescript {3,7} fileName="vite.config.ts" codeFormat="typescript"
678
678
  import { defineConfig } from "vite";
679
679
  import vue from "@vitejs/plugin-vue";
680
- import { intlayerPlugin, intlayerMiddlewarePlugin } from "vite-intlayer";
680
+ import { intlayer, intlayerMiddlewarePlugin } from "vite-intlayer";
681
681
 
682
682
  // https://vitejs.dev/config/
683
683
  export default defineConfig({
684
- plugins: [vue(), intlayerPlugin(), intlayerMiddlewarePlugin()],
684
+ plugins: [vue(), intlayer(), intlayerMiddlewarePlugin()],
685
685
  });
686
686
  ```
687
687
 
688
688
  ```javascript {3,7} fileName="vite.config.mjs" codeFormat="esm"
689
689
  import { defineConfig } from "vite";
690
690
  import vue from "@vitejs/plugin-vue";
691
- import { intlayerPlugin, intlayerMiddlewarePlugin } from "vite-intlayer";
691
+ import { intlayer, intlayerMiddlewarePlugin } from "vite-intlayer";
692
692
 
693
693
  // https://vitejs.dev/config/
694
694
  export default defineConfig({
695
- plugins: [vue(), intlayerPlugin(), intlayerMiddlewarePlugin()],
695
+ plugins: [vue(), intlayer(), intlayerMiddlewarePlugin()],
696
696
  });
697
697
  ```
698
698
 
699
699
  ```javascript {3,7} fileName="vite.config.cjs" codeFormat="commonjs"
700
700
  const { defineConfig } = require("vite");
701
701
  const vue = require("@vitejs/plugin-vue");
702
- const { intlayerPlugin, intlayerMiddlewarePlugin } = require("vite-intlayer");
702
+ const { intlayer, intlayerMiddlewarePlugin } = require("vite-intlayer");
703
703
 
704
704
  // https://vitejs.dev/config/
705
705
  module.exports = defineConfig({
706
- plugins: [vue(), intlayerPlugin(), intlayerMiddlewarePlugin()],
706
+ plugins: [vue(), intlayer(), intlayerMiddlewarePlugin()],
707
707
  });
708
708
  ```
709
709
 
@@ -721,10 +721,9 @@ To automatically update the URL when the user changes the language, you can modi
721
721
  </select>
722
722
  </div>
723
723
  const { defineConfig } = require("vite"); const vue =
724
- require("@vitejs/plugin-vue"); const { intlayerPlugin,
725
- intlayerMiddlewarePlugin } = require("vite-intlayer"); //
726
- https://vitejs.dev/config/ module.exports = defineConfig({ plugins: [vue(),
727
- intlayerPlugin(), intlayerMiddlewarePlugin()], });
724
+ require("@vitejs/plugin-vue"); const { intlayer, intlayerMiddlewarePlugin } =
725
+ require("vite-intlayer"); // https://vitejs.dev/config/ module.exports =
726
+ defineConfig({ plugins: [vue(), intlayer(), intlayerMiddlewarePlugin()], });
728
727
  </template>
729
728
  ```
730
729
 
@@ -53,15 +53,15 @@ See an example of how to include the plugins into your Vite configuration.
53
53
 
54
54
  ```typescript fileName="vite.config.ts"
55
55
  import { defineConfig } from "vite";
56
- import { intlayerPlugin, intlayerMiddlewarePlugin } from "vite-intlayer";
56
+ import { intlayer, intlayerMiddlewarePlugin } from "vite-intlayer";
57
57
 
58
58
  // https://vitejs.dev/config/
59
59
  export default defineConfig({
60
- plugins: [intlayerPlugin(), intlayerMiddlewarePlugin()],
60
+ plugins: [intlayer(), intlayerMiddlewarePlugin()],
61
61
  });
62
62
  ```
63
63
 
64
- > The `intlayerPlugin()` Vite plugin is used to integrate Intlayer with Vite. It ensures the building of content declaration files and monitors them in development mode. It defines Intlayer environment variables within the Vite application. Additionally, it provides aliases to optimise performance.
64
+ > The `intlayer()` Vite plugin is used to integrate Intlayer with Vite. It ensures the building of content declaration files and monitors them in development mode. It defines Intlayer environment variables within the Vite application. Additionally, it provides aliases to optimise performance.
65
65
 
66
66
  > The `intlayerMiddlewarePlugin()` adds server-side routing to your application. This plugin will automatically detect the current locale based on the URL and set the appropriate locale cookie. If no locale is specified, the plugin will determine the most appropriate locale based on the user's browser language preferences. If no locale is detected, it will redirect to the default locale.
67
67
 
@@ -166,7 +166,7 @@ import { prepareIntlayer, watch } from "@intlayer/chokidar";
166
166
  import { getConfiguration, logger } from "@intlayer/config";
167
167
  import type { Plugin } from "esbuild";
168
168
 
169
- const intlayerPlugin: Plugin = {
169
+ const intlayer: Plugin = {
170
170
  name: "intlayer-esbuild-plugin",
171
171
  setup(build) {
172
172
  const configuration = getConfiguration();
@@ -196,10 +196,10 @@ const intlayerPlugin: Plugin = {
196
196
  },
197
197
  };
198
198
 
199
- export default intlayerPlugin;
199
+ export default intlayer;
200
200
  ```
201
201
 
202
- > El `intlayerPlugin` para esbuild asegura que Intlayer esté preparado antes de que comience la compilación y observa los cambios en modo desarrollo.
202
+ > El `intlayer` para esbuild asegura que Intlayer esté preparado antes de que comience la compilación y observa los cambios en modo desarrollo.
203
203
 
204
204
  #### Opción 2: Usando Webpack
205
205
 
@@ -146,20 +146,20 @@ Agrega el plugin intlayer en tu configuración:
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, intlayerPlugin } from "vite-intlayer";
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
- intlayerPlugin(),
156
+ intlayer(),
157
157
  intlayerMiddlewarePlugin(),
158
158
  ],
159
159
  });
160
160
  ```
161
161
 
162
- > El plugin `intlayerPlugin()` 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.
162
+ > 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.
163
163
 
164
164
  ### Paso 5: Crear Componentes de Layout
165
165
 
@@ -142,20 +142,20 @@ Agrega el plugin intlayer en tu configuración:
142
142
  ```typescript fileName="vite.config.ts" codeFormat="typescript"
143
143
  import { reactRouter } from "@react-router/dev/vite";
144
144
  import { defineConfig } from "vite";
145
- import { intlayerMiddlewarePlugin, intlayerPlugin } from "vite-intlayer";
145
+ import { intlayerMiddlewarePlugin, intlayer } from "vite-intlayer";
146
146
  import tsconfigPaths from "vite-tsconfig-paths";
147
147
 
148
148
  export default defineConfig({
149
149
  plugins: [
150
150
  reactRouter(),
151
151
  tsconfigPaths(),
152
- intlayerPlugin(),
152
+ intlayer(),
153
153
  intlayerMiddlewarePlugin(),
154
154
  ],
155
155
  });
156
156
  ```
157
157
 
158
- > El plugin `intlayerPlugin()` de Vite se utiliza para integrar Intlayer con Vite. Asegura la construcción de los archivos de declaración de contenido y los supervisa en modo desarrollo. Define las variables de entorno de Intlayer dentro de la aplicación Vite. Además, proporciona alias para optimizar el rendimiento.
158
+ > El plugin `intlayer()` de Vite se utiliza para integrar Intlayer con Vite. Asegura la construcción de los archivos de declaración de contenido y los supervisa en modo desarrollo. Define las variables de entorno de Intlayer dentro de la aplicación Vite. Además, proporciona alias para optimizar el rendimiento.
159
159
 
160
160
  ### Paso 5: Crear Componentes de Layout
161
161