@intlayer/docs 5.5.12 → 5.7.0
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/dist/cjs/common.cjs.map +1 -1
- package/dist/esm/common.mjs.map +1 -1
- package/dist/types/common.d.ts +2 -0
- package/dist/types/common.d.ts.map +1 -1
- package/docs/ar/configuration.md +23 -18
- package/docs/ar/how_works_intlayer.md +1 -1
- package/docs/ar/intlayer_CMS.md +1 -0
- package/docs/ar/intlayer_cli.md +292 -177
- package/docs/ar/intlayer_visual_editor.md +1 -0
- package/docs/ar/intlayer_with_angular.md +1 -0
- package/docs/ar/intlayer_with_create_react_app.md +1 -0
- package/docs/ar/intlayer_with_lynx+react.md +1 -0
- package/docs/ar/intlayer_with_nextjs_14.md +1 -0
- package/docs/ar/intlayer_with_nextjs_15.md +3 -1
- package/docs/ar/intlayer_with_nuxt.md +1 -0
- package/docs/ar/intlayer_with_react_native+expo.md +1 -0
- package/docs/ar/intlayer_with_vite+preact.md +4 -3
- package/docs/ar/intlayer_with_vite+react.md +8 -4
- package/docs/ar/intlayer_with_vite+solid.md +4 -3
- package/docs/ar/intlayer_with_vite+svelte.md +4 -3
- package/docs/ar/intlayer_with_vite+vue.md +5 -4
- package/docs/ar/mcp_server.md +126 -92
- package/docs/de/configuration.md +23 -18
- package/docs/de/how_works_intlayer.md +1 -1
- package/docs/de/intlayer_CMS.md +1 -0
- package/docs/de/intlayer_cli.md +291 -171
- package/docs/de/intlayer_visual_editor.md +1 -0
- package/docs/de/intlayer_with_angular.md +1 -0
- package/docs/de/intlayer_with_create_react_app.md +1 -0
- package/docs/de/intlayer_with_lynx+react.md +1 -0
- package/docs/de/intlayer_with_nextjs_14.md +1 -0
- package/docs/de/intlayer_with_nextjs_15.md +3 -1
- package/docs/de/intlayer_with_nuxt.md +1 -0
- package/docs/de/intlayer_with_react_native+expo.md +1 -0
- package/docs/de/intlayer_with_vite+preact.md +4 -3
- package/docs/de/intlayer_with_vite+react.md +7 -4
- package/docs/de/intlayer_with_vite+solid.md +4 -3
- package/docs/de/intlayer_with_vite+svelte.md +4 -3
- package/docs/de/intlayer_with_vite+vue.md +5 -4
- package/docs/de/mcp_server.md +116 -112
- package/docs/en/configuration.md +41 -25
- package/docs/en/how_works_intlayer.md +1 -1
- package/docs/en/intlayer_CMS.md +1 -0
- package/docs/en/intlayer_cli.md +246 -138
- package/docs/en/intlayer_visual_editor.md +1 -0
- package/docs/en/intlayer_with_angular.md +1 -0
- package/docs/en/intlayer_with_create_react_app.md +1 -0
- package/docs/en/intlayer_with_lynx+react.md +1 -0
- package/docs/en/intlayer_with_nextjs_14.md +1 -0
- package/docs/en/intlayer_with_nextjs_15.md +3 -1
- package/docs/en/intlayer_with_nuxt.md +1 -0
- package/docs/en/intlayer_with_react_native+expo.md +1 -0
- package/docs/en/intlayer_with_vite+preact.md +6 -3
- package/docs/en/intlayer_with_vite+react.md +9 -3
- package/docs/en/intlayer_with_vite+solid.md +4 -3
- package/docs/en/intlayer_with_vite+svelte.md +4 -3
- package/docs/en/intlayer_with_vite+vue.md +7 -4
- package/docs/en/mcp_server.md +100 -107
- package/docs/en-GB/configuration.md +23 -18
- package/docs/en-GB/how_works_intlayer.md +1 -1
- package/docs/en-GB/intlayer_CMS.md +1 -0
- package/docs/en-GB/intlayer_cli.md +257 -138
- package/docs/en-GB/intlayer_visual_editor.md +1 -0
- package/docs/en-GB/intlayer_with_angular.md +1 -0
- package/docs/en-GB/intlayer_with_create_react_app.md +1 -0
- package/docs/en-GB/intlayer_with_lynx+react.md +1 -0
- package/docs/en-GB/intlayer_with_nextjs_14.md +1 -0
- package/docs/en-GB/intlayer_with_nextjs_15.md +3 -1
- package/docs/en-GB/intlayer_with_nuxt.md +1 -0
- package/docs/en-GB/intlayer_with_react_native+expo.md +1 -0
- package/docs/en-GB/intlayer_with_vite+preact.md +4 -3
- package/docs/en-GB/intlayer_with_vite+react.md +7 -4
- package/docs/en-GB/intlayer_with_vite+solid.md +4 -3
- package/docs/en-GB/intlayer_with_vite+svelte.md +4 -3
- package/docs/en-GB/intlayer_with_vite+vue.md +5 -4
- package/docs/en-GB/mcp_server.md +116 -82
- package/docs/es/configuration.md +28 -19
- package/docs/es/how_works_intlayer.md +1 -1
- package/docs/es/intlayer_CMS.md +1 -0
- package/docs/es/intlayer_cli.md +283 -164
- package/docs/es/intlayer_visual_editor.md +1 -0
- package/docs/es/intlayer_with_angular.md +1 -0
- package/docs/es/intlayer_with_create_react_app.md +1 -0
- package/docs/es/intlayer_with_lynx+react.md +1 -0
- package/docs/es/intlayer_with_nextjs_14.md +1 -0
- package/docs/es/intlayer_with_nextjs_15.md +3 -1
- package/docs/es/intlayer_with_nuxt.md +1 -0
- package/docs/es/intlayer_with_react_native+expo.md +1 -0
- package/docs/es/intlayer_with_vite+preact.md +4 -3
- package/docs/es/intlayer_with_vite+react.md +7 -4
- package/docs/es/intlayer_with_vite+solid.md +4 -3
- package/docs/es/intlayer_with_vite+svelte.md +4 -3
- package/docs/es/intlayer_with_vite+vue.md +5 -4
- package/docs/es/mcp_server.md +120 -86
- package/docs/es/vs_code_extension.md +1 -0
- package/docs/fr/configuration.md +23 -13
- package/docs/fr/how_works_intlayer.md +1 -1
- package/docs/fr/intlayer_CMS.md +1 -0
- package/docs/fr/intlayer_cli.md +280 -184
- package/docs/fr/intlayer_visual_editor.md +1 -0
- package/docs/fr/intlayer_with_angular.md +1 -0
- package/docs/fr/intlayer_with_create_react_app.md +1 -0
- package/docs/fr/intlayer_with_lynx+react.md +1 -0
- package/docs/fr/intlayer_with_nextjs_14.md +1 -0
- package/docs/fr/intlayer_with_nextjs_15.md +3 -1
- package/docs/fr/intlayer_with_nuxt.md +1 -0
- package/docs/fr/intlayer_with_react_native+expo.md +1 -0
- package/docs/fr/intlayer_with_vite+preact.md +5 -4
- package/docs/fr/intlayer_with_vite+react.md +7 -4
- package/docs/fr/intlayer_with_vite+solid.md +4 -3
- package/docs/fr/intlayer_with_vite+svelte.md +4 -3
- package/docs/fr/intlayer_with_vite+vue.md +5 -4
- package/docs/fr/mcp_server.md +121 -87
- package/docs/hi/configuration.md +23 -18
- package/docs/hi/how_works_intlayer.md +1 -1
- package/docs/hi/intlayer_CMS.md +1 -0
- package/docs/hi/intlayer_cli.md +295 -174
- package/docs/hi/intlayer_visual_editor.md +1 -0
- package/docs/hi/intlayer_with_angular.md +1 -0
- package/docs/hi/intlayer_with_create_react_app.md +1 -0
- package/docs/hi/intlayer_with_lynx+react.md +1 -0
- package/docs/hi/intlayer_with_nextjs_14.md +1 -0
- package/docs/hi/intlayer_with_nextjs_15.md +3 -1
- package/docs/hi/intlayer_with_nuxt.md +1 -0
- package/docs/hi/intlayer_with_react_native+expo.md +1 -0
- package/docs/hi/intlayer_with_vite+preact.md +4 -3
- package/docs/hi/intlayer_with_vite+react.md +7 -4
- package/docs/hi/intlayer_with_vite+solid.md +4 -3
- package/docs/hi/intlayer_with_vite+svelte.md +4 -3
- package/docs/hi/intlayer_with_vite+vue.md +5 -4
- package/docs/hi/mcp_server.md +118 -84
- package/docs/it/configuration.md +23 -18
- package/docs/it/how_works_intlayer.md +1 -1
- package/docs/it/intlayer_CMS.md +1 -0
- package/docs/it/intlayer_cli.md +282 -167
- package/docs/it/intlayer_visual_editor.md +1 -0
- package/docs/it/intlayer_with_angular.md +1 -0
- package/docs/it/intlayer_with_create_react_app.md +1 -0
- package/docs/it/intlayer_with_lynx+react.md +1 -0
- package/docs/it/intlayer_with_nextjs_14.md +1 -0
- package/docs/it/intlayer_with_nextjs_15.md +3 -1
- package/docs/it/intlayer_with_nuxt.md +1 -0
- package/docs/it/intlayer_with_react_native+expo.md +1 -0
- package/docs/it/intlayer_with_vite+preact.md +4 -3
- package/docs/it/intlayer_with_vite+react.md +7 -4
- package/docs/it/intlayer_with_vite+solid.md +4 -3
- package/docs/it/intlayer_with_vite+svelte.md +4 -3
- package/docs/it/intlayer_with_vite+vue.md +4 -4
- package/docs/it/mcp_server.md +120 -86
- package/docs/ja/configuration.md +23 -18
- package/docs/ja/how_works_intlayer.md +1 -1
- package/docs/ja/intlayer_CMS.md +1 -0
- package/docs/ja/intlayer_cli.md +285 -168
- package/docs/ja/intlayer_visual_editor.md +1 -0
- package/docs/ja/intlayer_with_angular.md +1 -0
- package/docs/ja/intlayer_with_create_react_app.md +1 -0
- package/docs/ja/intlayer_with_lynx+react.md +1 -0
- package/docs/ja/intlayer_with_nextjs_14.md +1 -0
- package/docs/ja/intlayer_with_nextjs_15.md +3 -1
- package/docs/ja/intlayer_with_nuxt.md +1 -0
- package/docs/ja/intlayer_with_react_native+expo.md +1 -0
- package/docs/ja/intlayer_with_vite+preact.md +4 -3
- package/docs/ja/intlayer_with_vite+react.md +7 -4
- package/docs/ja/intlayer_with_vite+solid.md +4 -3
- package/docs/ja/intlayer_with_vite+svelte.md +4 -3
- package/docs/ja/intlayer_with_vite+vue.md +5 -4
- package/docs/ja/mcp_server.md +121 -85
- package/docs/ko/configuration.md +23 -18
- package/docs/ko/how_works_intlayer.md +1 -1
- package/docs/ko/intlayer_CMS.md +1 -0
- package/docs/ko/intlayer_cli.md +291 -175
- package/docs/ko/intlayer_visual_editor.md +1 -0
- package/docs/ko/intlayer_with_angular.md +1 -0
- package/docs/ko/intlayer_with_create_react_app.md +1 -0
- package/docs/ko/intlayer_with_lynx+react.md +1 -0
- package/docs/ko/intlayer_with_nextjs_14.md +1 -0
- package/docs/ko/intlayer_with_nextjs_15.md +3 -1
- package/docs/ko/intlayer_with_nuxt.md +1 -0
- package/docs/ko/intlayer_with_react_native+expo.md +1 -0
- package/docs/ko/intlayer_with_vite+preact.md +4 -3
- package/docs/ko/intlayer_with_vite+react.md +7 -4
- package/docs/ko/intlayer_with_vite+solid.md +4 -3
- package/docs/ko/intlayer_with_vite+svelte.md +4 -3
- package/docs/ko/intlayer_with_vite+vue.md +5 -4
- package/docs/ko/mcp_server.md +117 -83
- package/docs/pt/configuration.md +23 -18
- package/docs/pt/how_works_intlayer.md +1 -1
- package/docs/pt/intlayer_CMS.md +1 -0
- package/docs/pt/intlayer_cli.md +274 -154
- package/docs/pt/intlayer_visual_editor.md +1 -0
- package/docs/pt/intlayer_with_angular.md +1 -0
- package/docs/pt/intlayer_with_create_react_app.md +1 -0
- package/docs/pt/intlayer_with_lynx+react.md +1 -0
- package/docs/pt/intlayer_with_nextjs_14.md +1 -0
- package/docs/pt/intlayer_with_nextjs_15.md +3 -1
- package/docs/pt/intlayer_with_nuxt.md +1 -0
- package/docs/pt/intlayer_with_react_native+expo.md +1 -0
- package/docs/pt/intlayer_with_vite+preact.md +4 -3
- package/docs/pt/intlayer_with_vite+react.md +7 -4
- package/docs/pt/intlayer_with_vite+solid.md +4 -3
- package/docs/pt/intlayer_with_vite+svelte.md +4 -3
- package/docs/pt/intlayer_with_vite+vue.md +4 -4
- package/docs/pt/mcp_server.md +121 -87
- package/docs/ru/configuration.md +23 -18
- package/docs/ru/how_works_intlayer.md +1 -1
- package/docs/ru/intlayer_CMS.md +1 -0
- package/docs/ru/intlayer_cli.md +287 -170
- package/docs/ru/intlayer_visual_editor.md +1 -0
- package/docs/ru/intlayer_with_angular.md +1 -0
- package/docs/ru/intlayer_with_create_react_app.md +1 -0
- package/docs/ru/intlayer_with_lynx+react.md +1 -0
- package/docs/ru/intlayer_with_nextjs_14.md +1 -0
- package/docs/ru/intlayer_with_nextjs_15.md +3 -1
- package/docs/ru/intlayer_with_nuxt.md +1 -0
- package/docs/ru/intlayer_with_react_native+expo.md +1 -0
- package/docs/ru/intlayer_with_vite+preact.md +4 -3
- package/docs/ru/intlayer_with_vite+react.md +7 -4
- package/docs/ru/intlayer_with_vite+solid.md +4 -3
- package/docs/ru/intlayer_with_vite+svelte.md +4 -3
- package/docs/ru/intlayer_with_vite+vue.md +5 -4
- package/docs/ru/mcp_server.md +119 -85
- package/docs/zh/configuration.md +23 -18
- package/docs/zh/how_works_intlayer.md +1 -1
- package/docs/zh/intlayer_CMS.md +1 -0
- package/docs/zh/intlayer_cli.md +275 -155
- package/docs/zh/intlayer_visual_editor.md +1 -0
- package/docs/zh/intlayer_with_angular.md +1 -0
- package/docs/zh/intlayer_with_create_react_app.md +1 -0
- package/docs/zh/intlayer_with_lynx+react.md +1 -0
- package/docs/zh/intlayer_with_nextjs_14.md +1 -0
- package/docs/zh/intlayer_with_nextjs_15.md +3 -1
- package/docs/zh/intlayer_with_nuxt.md +1 -0
- package/docs/zh/intlayer_with_react_native+expo.md +1 -0
- package/docs/zh/intlayer_with_vite+preact.md +4 -3
- package/docs/zh/intlayer_with_vite+react.md +7 -4
- package/docs/zh/intlayer_with_vite+solid.md +4 -3
- package/docs/zh/intlayer_with_vite+svelte.md +4 -3
- package/docs/zh/intlayer_with_vite+vue.md +5 -4
- package/docs/zh/mcp_server.md +119 -86
- package/package.json +10 -10
- package/src/common.ts +2 -0
|
@@ -14,6 +14,8 @@ slugs:
|
|
|
14
14
|
- doc
|
|
15
15
|
- environment
|
|
16
16
|
- nextjs
|
|
17
|
+
applicationTemplate: https://github.com/aymericzip/intlayer-next-15-template
|
|
18
|
+
youtubeVideo: https://www.youtube.com/watch?v=e_PPG7PTqGU
|
|
17
19
|
---
|
|
18
20
|
|
|
19
21
|
# Getting Started internationalizing (i18n) with Intlayer and Next.js 15 App Router
|
|
@@ -130,7 +132,7 @@ module.exports = config;
|
|
|
130
132
|
|
|
131
133
|
Configure your Next.js setup to use Intlayer:
|
|
132
134
|
|
|
133
|
-
```typescript
|
|
135
|
+
```typescript fileName="next.config.ts" codeFormat="typescript"
|
|
134
136
|
import type { NextConfig } from "next";
|
|
135
137
|
import { withIntlayer } from "next-intlayer/server";
|
|
136
138
|
|
|
@@ -14,6 +14,7 @@ slugs:
|
|
|
14
14
|
- doc
|
|
15
15
|
- environment
|
|
16
16
|
- vite-and-preact
|
|
17
|
+
applicationTemplate: https://github.com/aymericzip/intlayer-vite-preact-template
|
|
17
18
|
---
|
|
18
19
|
|
|
19
20
|
# Getting Started Internationalizing (i18n) with Intlayer and Vite and Preact
|
|
@@ -43,17 +44,17 @@ Install the necessary packages using npm:
|
|
|
43
44
|
|
|
44
45
|
```bash packageManager="npm"
|
|
45
46
|
npm install intlayer preact-intlayer
|
|
46
|
-
npm install --save-dev
|
|
47
|
+
npm install vite-intlayer --save-dev
|
|
47
48
|
```
|
|
48
49
|
|
|
49
50
|
```bash packageManager="pnpm"
|
|
50
51
|
pnpm add intlayer preact-intlayer
|
|
51
|
-
pnpm add --save-dev
|
|
52
|
+
pnpm add vite-intlayer --save-dev
|
|
52
53
|
```
|
|
53
54
|
|
|
54
55
|
```bash packageManager="yarn"
|
|
55
56
|
yarn add intlayer preact-intlayer
|
|
56
|
-
yarn add --save-dev
|
|
57
|
+
yarn add vite-intlayer --save-dev
|
|
57
58
|
```
|
|
58
59
|
|
|
59
60
|
- **intlayer**
|
|
@@ -1037,6 +1038,8 @@ module.exports = App;
|
|
|
1037
1038
|
|
|
1038
1039
|
In parallel, you can also use the `intLayerMiddlewarePlugin` to 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.
|
|
1039
1040
|
|
|
1041
|
+
> Note that to use the `intLayerMiddlewarePlugin` in production, you need to switch the `vite-intlayer` package from `devDependencies` to `dependencies`.
|
|
1042
|
+
|
|
1040
1043
|
```typescript {3,7} fileName="vite.config.ts" codeFormat="typescript"
|
|
1041
1044
|
import { defineConfig } from "vite";
|
|
1042
1045
|
import preact from "@preact/preset-vite";
|
|
@@ -15,10 +15,14 @@ slugs:
|
|
|
15
15
|
- doc
|
|
16
16
|
- environment
|
|
17
17
|
- vite-and-react
|
|
18
|
+
applicationTemplate: https://github.com/aymericzip/intlayer-vite-react-template
|
|
19
|
+
youtubeVideo: https://www.youtube.com/watch?v=dS9L7uJeak4
|
|
18
20
|
---
|
|
19
21
|
|
|
20
22
|
# Getting Started Internationalizing (i18n) with Intlayer and Vite and React
|
|
21
23
|
|
|
24
|
+
<iframe title="The best i18n solution for Vite and React? Discover 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/dS9L7uJeak4?si=VaKmrYMmXjo3xpk2"/>
|
|
25
|
+
|
|
22
26
|
See [Application Template](https://github.com/aymericzip/intlayer-vite-react-template) on GitHub.
|
|
23
27
|
|
|
24
28
|
## What is Intlayer?
|
|
@@ -42,17 +46,17 @@ Install the necessary packages using npm:
|
|
|
42
46
|
|
|
43
47
|
```bash packageManager="npm"
|
|
44
48
|
npm install intlayer react-intlayer
|
|
45
|
-
npm install --save-dev
|
|
49
|
+
npm install vite-intlayer --save-dev
|
|
46
50
|
```
|
|
47
51
|
|
|
48
52
|
```bash packageManager="pnpm"
|
|
49
53
|
pnpm add intlayer react-intlayer
|
|
50
|
-
pnpm add --save-dev
|
|
54
|
+
pnpm add vite-intlayer --save-dev
|
|
51
55
|
```
|
|
52
56
|
|
|
53
57
|
```bash packageManager="yarn"
|
|
54
58
|
yarn add intlayer react-intlayer
|
|
55
|
-
yarn add --save-dev
|
|
59
|
+
yarn add vite-intlayer --save-dev
|
|
56
60
|
```
|
|
57
61
|
|
|
58
62
|
- **intlayer**
|
|
@@ -1002,6 +1006,8 @@ const App = () => (
|
|
|
1002
1006
|
|
|
1003
1007
|
In parallel, you can also use the `intLayerMiddlewarePlugin` to 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.
|
|
1004
1008
|
|
|
1009
|
+
> Note that to use the `intLayerMiddlewarePlugin` in production, you need to switch the `vite-intlayer` package from `devDependencies` to `dependencies`.
|
|
1010
|
+
|
|
1005
1011
|
```typescript {3,7} fileName="vite.config.ts" codeFormat="typescript"
|
|
1006
1012
|
import { defineConfig } from "vite";
|
|
1007
1013
|
import react from "@vitejs/plugin-react-swc";
|
|
@@ -14,6 +14,7 @@ slugs:
|
|
|
14
14
|
- doc
|
|
15
15
|
- environment
|
|
16
16
|
- vite-and-solid
|
|
17
|
+
# applicationTemplate: https://github.com/aymericzip/intlayer-vite-solid-template
|
|
17
18
|
---
|
|
18
19
|
|
|
19
20
|
# Getting Started Internationalizing (i18n) with Intlayer and Vite and Solid
|
|
@@ -43,17 +44,17 @@ Install the necessary packages using npm:
|
|
|
43
44
|
|
|
44
45
|
```bash packageManager="npm"
|
|
45
46
|
npm install intlayer solid-intlayer
|
|
46
|
-
npm install --save-dev
|
|
47
|
+
npm install vite-intlayer --save-dev
|
|
47
48
|
```
|
|
48
49
|
|
|
49
50
|
```bash packageManager="pnpm"
|
|
50
51
|
pnpm add intlayer solid-intlayer
|
|
51
|
-
pnpm add --save-dev
|
|
52
|
+
pnpm add vite-intlayer --save-dev
|
|
52
53
|
```
|
|
53
54
|
|
|
54
55
|
```bash packageManager="yarn"
|
|
55
56
|
yarn add intlayer solid-intlayer
|
|
56
|
-
yarn add --save-dev
|
|
57
|
+
yarn add vite-intlayer --save-dev
|
|
57
58
|
```
|
|
58
59
|
|
|
59
60
|
- **intlayer**
|
|
@@ -14,6 +14,7 @@ slugs:
|
|
|
14
14
|
- doc
|
|
15
15
|
- environment
|
|
16
16
|
- vite-and-svelte
|
|
17
|
+
# applicationTemplate: https://github.com/aymericzip/intlayer-vite-svelte-template
|
|
17
18
|
---
|
|
18
19
|
|
|
19
20
|
# Getting Started Internationalizing (i18n) with Intlayer and Vite and Svelte
|
|
@@ -43,17 +44,17 @@ Install the necessary packages using npm:
|
|
|
43
44
|
|
|
44
45
|
```bash packageManager="npm"
|
|
45
46
|
npm install intlayer svelte-intlayer
|
|
46
|
-
npm install --save-dev
|
|
47
|
+
npm install vite-intlayer --save-dev
|
|
47
48
|
```
|
|
48
49
|
|
|
49
50
|
```bash packageManager="pnpm"
|
|
50
51
|
pnpm add intlayer svelte-intlayer
|
|
51
|
-
pnpm add --save-dev
|
|
52
|
+
pnpm add vite-intlayer --save-dev
|
|
52
53
|
```
|
|
53
54
|
|
|
54
55
|
```bash packageManager="yarn"
|
|
55
56
|
yarn add intlayer svelte-intlayer
|
|
56
|
-
yarn add --save-dev
|
|
57
|
+
yarn add vite-intlayer --save-dev
|
|
57
58
|
```
|
|
58
59
|
|
|
59
60
|
- **intlayer**
|
|
@@ -14,6 +14,7 @@ slugs:
|
|
|
14
14
|
- doc
|
|
15
15
|
- environment
|
|
16
16
|
- vite-and-vue
|
|
17
|
+
applicationTemplate: https://github.com/aymericzip/intlayer-vite-vue-template
|
|
17
18
|
---
|
|
18
19
|
|
|
19
20
|
# Getting Started Internationalizing (i18n) with Intlayer and Vite and Vue
|
|
@@ -41,17 +42,17 @@ Install the necessary packages using npm:
|
|
|
41
42
|
|
|
42
43
|
```bash packageManager="npm"
|
|
43
44
|
npm install intlayer vue-intlayer
|
|
44
|
-
npm install --save-dev
|
|
45
|
+
npm install vite-intlayer --save-dev
|
|
45
46
|
```
|
|
46
47
|
|
|
47
48
|
```bash packageManager="pnpm"
|
|
48
49
|
pnpm add intlayer vue-intlayer
|
|
49
|
-
pnpm add --save-dev
|
|
50
|
+
pnpm add vite-intlayer --save-dev
|
|
50
51
|
```
|
|
51
52
|
|
|
52
53
|
```bash packageManager="yarn"
|
|
53
54
|
yarn add intlayer vue-intlayer
|
|
54
|
-
yarn add --save-dev
|
|
55
|
+
yarn add vite-intlayer --save-dev
|
|
55
56
|
```
|
|
56
57
|
|
|
57
58
|
- **intlayer**
|
|
@@ -646,6 +647,8 @@ import LocaleSwitcher from "@components/LocaleSwitcher.vue";
|
|
|
646
647
|
|
|
647
648
|
In parallel, you can also use the `intLayerMiddlewarePlugin` to 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.
|
|
648
649
|
|
|
650
|
+
> Note that to use the `intLayerMiddlewarePlugin` in production, you need to switch the `vite-intlayer` package from `devDependencies` to `dependencies`.
|
|
651
|
+
|
|
649
652
|
```typescript {3,7} fileName="vite.config.ts" codeFormat="typescript"
|
|
650
653
|
import { defineConfig } from "vite";
|
|
651
654
|
import vue from "@vitejs/plugin-vue";
|
|
@@ -938,7 +941,7 @@ By default Intlayer render markdown as string. But Intlayer also provides a way
|
|
|
938
941
|
|
|
939
942
|
> To see how to declare markdown content using the `intlayer` package, see the [markdown doc](https://github.com/aymericzip/intlayer/tree/main/docs/en/dictionary/markdown.md).
|
|
940
943
|
|
|
941
|
-
```ts
|
|
944
|
+
```ts fileName="main.ts"
|
|
942
945
|
import MarkdownIt from "markdown-it";
|
|
943
946
|
import { createApp, h } from "vue";
|
|
944
947
|
import { installIntlayer, installIntlayerMarkdown } from "vue-intlayer";
|
package/docs/en/mcp_server.md
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
---
|
|
2
2
|
createdAt: 2025-06-07
|
|
3
|
-
updatedAt: 2025-
|
|
3
|
+
updatedAt: 2025-07-11
|
|
4
4
|
title: MCP Server Documentation
|
|
5
5
|
description: Explore the features and setup of the MCP Server to optimize your server management and operations.
|
|
6
6
|
keywords:
|
|
@@ -18,31 +18,58 @@ slugs:
|
|
|
18
18
|
|
|
19
19
|
# Intlayer MCP Server
|
|
20
20
|
|
|
21
|
-
The **Intlayer MCP (Model Context Protocol) Server** provides AI-powered IDE assistance tailored for the Intlayer ecosystem.
|
|
21
|
+
The **Intlayer MCP (Model Context Protocol) Server** provides AI-powered IDE assistance tailored for the Intlayer ecosystem.
|
|
22
|
+
|
|
23
|
+
## Where can I use it?
|
|
24
|
+
|
|
25
|
+
- On modern developer environments like **Cursor**, **VS Code**, and any IDE supporting the MCP protocol.
|
|
26
|
+
- On your favorite AI assistant like **Claude Desktop**, **Gemini**, **ChatGPT**, etc.
|
|
22
27
|
|
|
23
28
|
## Why Use the Intlayer MCP Server?
|
|
24
29
|
|
|
25
30
|
By enabling the Intlayer MCP Server in your IDE, you unlock:
|
|
26
31
|
|
|
32
|
+
- **Context-Aware Documentation**
|
|
33
|
+
The MCP server loads and exposes the documentation of Intlayer. To speed up your set up, your migrations, etc.
|
|
34
|
+
This ensures that code suggestions, command options, and explanations are always up to date and relevant.
|
|
35
|
+
|
|
27
36
|
- **Smart CLI Integration**
|
|
28
|
-
Access and run Intlayer CLI commands directly from your IDE interface.
|
|
37
|
+
Access and run Intlayer CLI commands directly from your IDE interface. Using the MCP server, you can let your AI assistant run commands like `intlayer dictionaries build` to update your dictionaries, or `intlayer dictionaries fill` to fill your missing translations.
|
|
29
38
|
|
|
30
|
-
|
|
31
|
-
|
|
39
|
+
> View the full list of commands and options in the [Intlayer CLI documentation](https://github.com/aymericzip/intlayer/blob/main/docs/docs/en/intlayer_cli.md).
|
|
40
|
+
|
|
41
|
+
## Local server (stdio) vs Remote server (SSE)
|
|
42
|
+
|
|
43
|
+
The MCP server can be used in two ways:
|
|
44
|
+
|
|
45
|
+
- Local server (stdio)
|
|
46
|
+
- Remote server (SSE)
|
|
47
|
+
|
|
48
|
+
### Local server (stdio) (recommended)
|
|
49
|
+
|
|
50
|
+
Intlayer provides a NPM package that can be installed locally on your machine. It can be installed in your favorite IDE, as VS Code, Cursor, as well as your locale assistant application, as ChatGPT, Claude Desktop, etc.
|
|
32
51
|
|
|
33
|
-
|
|
34
|
-
With project-aware suggestions and autocomplete, the AI assistant can explain your code, recommend CLI usage, or suggest how to use specific features of Intlayer based on your current files.
|
|
52
|
+
This server is the recommended way to use the MCP server. As it integrates all the features of the MCP server, including the CLI tools.
|
|
35
53
|
|
|
36
|
-
|
|
37
|
-
|
|
54
|
+
### Remote server (SSE)
|
|
55
|
+
|
|
56
|
+
The MCP server can also be used remotely, using the SSE transport method. This server is hosted by Intlayer, and is available at https://mcp.intlayer.org. This server can be accessed publicly, without any authentication, and is free to use.
|
|
57
|
+
|
|
58
|
+
Note that the remote server does not integrate CLI tools, AI autocompletion, etc. The distant server is only for interaction with the documentation to help your AI assistant with the Intlayer ecosystem.
|
|
59
|
+
|
|
60
|
+
> Due to server hosting costs, the availability of the remote server cannot be guaranteed. We limit the number of simultaneous connections. We recommend using the local server (stdio) transport method for the most reliable experience.
|
|
38
61
|
|
|
39
62
|
---
|
|
40
63
|
|
|
41
|
-
## Setup Cursor
|
|
64
|
+
## Setup in Cursor
|
|
65
|
+
|
|
66
|
+
Follow the [official documentation](https://docs.cursor.com/context/mcp) to configure the MCP server in Cursor.
|
|
42
67
|
|
|
43
68
|
In your project root, add the following `.cursor/mcp.json` configuration file:
|
|
44
69
|
|
|
45
|
-
|
|
70
|
+
### Local server (stdio) (recommended)
|
|
71
|
+
|
|
72
|
+
```json fileName=".cursor/mcp.json"
|
|
46
73
|
{
|
|
47
74
|
"mcpServers": {
|
|
48
75
|
"intlayer": {
|
|
@@ -53,19 +80,36 @@ In your project root, add the following `.cursor/mcp.json` configuration file:
|
|
|
53
80
|
}
|
|
54
81
|
```
|
|
55
82
|
|
|
83
|
+
### Remote server (SSE)
|
|
84
|
+
|
|
85
|
+
For connecting to a remote Intlayer MCP server using Server-Sent Events (SSE), you can configure your MCP client to connect to the hosted service.
|
|
86
|
+
|
|
87
|
+
```json fileName=".cursor/mcp.json"
|
|
88
|
+
{
|
|
89
|
+
"mcpServers": {
|
|
90
|
+
"intlayer": {
|
|
91
|
+
"url": "https://mcp.intlayer.org",
|
|
92
|
+
"transport": "sse"
|
|
93
|
+
}
|
|
94
|
+
}
|
|
95
|
+
}
|
|
96
|
+
```
|
|
97
|
+
|
|
56
98
|
This tells your IDE to launch the Intlayer MCP server using `npx`, ensuring it always uses the latest available version unless you pin it.
|
|
57
99
|
|
|
58
100
|
---
|
|
59
101
|
|
|
60
|
-
## Setup VS Code
|
|
102
|
+
## Setup in VS Code
|
|
103
|
+
|
|
104
|
+
Follow the [official documentation](https://code.visualstudio.com/docs/copilot/chat/mcp-servers) to configure the MCP server in VS Code.
|
|
61
105
|
|
|
62
106
|
To use the Intlayer MCP Server with VS Code, you need to configure it in your workspace or user settings.
|
|
63
107
|
|
|
64
|
-
###
|
|
108
|
+
### Local server (stdio) (recommended)
|
|
65
109
|
|
|
66
110
|
Create a `.vscode/mcp.json` file in your project root:
|
|
67
111
|
|
|
68
|
-
```json
|
|
112
|
+
```json fileName=".vscode/mcp.json"
|
|
69
113
|
{
|
|
70
114
|
"servers": {
|
|
71
115
|
"intlayer": {
|
|
@@ -77,72 +121,73 @@ Create a `.vscode/mcp.json` file in your project root:
|
|
|
77
121
|
}
|
|
78
122
|
```
|
|
79
123
|
|
|
80
|
-
###
|
|
124
|
+
### Remote server (SSE)
|
|
81
125
|
|
|
82
|
-
|
|
126
|
+
For connecting to a remote Intlayer MCP server using Server-Sent Events (SSE), you can configure your MCP client to connect to the hosted service.
|
|
83
127
|
|
|
84
|
-
|
|
128
|
+
```json fileName=".vscode/mcp.json"
|
|
129
|
+
{
|
|
130
|
+
"servers": {
|
|
131
|
+
"intlayer": {
|
|
132
|
+
"url": "https://mcp.intlayer.org",
|
|
133
|
+
"type": "sse"
|
|
134
|
+
}
|
|
135
|
+
}
|
|
136
|
+
}
|
|
137
|
+
```
|
|
85
138
|
|
|
86
|
-
|
|
139
|
+
---
|
|
87
140
|
|
|
88
|
-
|
|
141
|
+
## Set Up in ChatGPT
|
|
89
142
|
|
|
90
|
-
###
|
|
143
|
+
### Remote server (SSE)
|
|
91
144
|
|
|
92
|
-
|
|
93
|
-
- Start, stop, or restart the Intlayer MCP server as needed
|
|
94
|
-
- View server logs for troubleshooting by selecting the server and choosing **Show Output**
|
|
145
|
+
Follow the [official documentation](https://platform.openai.com/docs/mcp#test-and-connect-your-mcp-server) to configure the MCP server in ChatGPT.
|
|
95
146
|
|
|
96
|
-
|
|
147
|
+
1. Go to the [promt dashboard](https://platform.openai.com/prompts)
|
|
148
|
+
2. Click on `+ Create`
|
|
149
|
+
3. Click on `Tools (Create or +)`
|
|
150
|
+
4. Select `MCP Server`
|
|
151
|
+
5. Click on `Add new`
|
|
152
|
+
6. Fill the following fields:
|
|
97
153
|
|
|
98
|
-
|
|
154
|
+
- URL: `https://mcp.intlayer.org`
|
|
155
|
+
- Label: `Intlayer MCP Server`
|
|
156
|
+
- Name: `intlayer-mcp-server`
|
|
157
|
+
- Authentication: `None`
|
|
99
158
|
|
|
100
|
-
|
|
159
|
+
7. Click on `Save`
|
|
101
160
|
|
|
102
|
-
|
|
161
|
+
---
|
|
103
162
|
|
|
104
|
-
|
|
163
|
+
## Set Up in Claude Desktop
|
|
105
164
|
|
|
106
|
-
|
|
165
|
+
Follow the [official documentation](https://modelcontextprotocol.io/quickstart/user#2-add-the-filesystem-mcp-server) to configure the MCP server in Claude Desktop.
|
|
107
166
|
|
|
108
|
-
|
|
109
|
-
{
|
|
110
|
-
"mcpServers": {
|
|
111
|
-
"intlayer-sse": {
|
|
112
|
-
"url": "http://mcp.intlayer.com",
|
|
113
|
-
"transport": "sse"
|
|
114
|
-
}
|
|
115
|
-
}
|
|
116
|
-
}
|
|
117
|
-
```
|
|
167
|
+
Path of the config file:
|
|
118
168
|
|
|
119
|
-
|
|
169
|
+
- macOS: `~/Library/Application\ Support/Claude/claude_desktop_config.json`
|
|
170
|
+
- Windows: `%APPDATA%\Claude\claude_desktop_config.json`
|
|
120
171
|
|
|
121
|
-
|
|
172
|
+
### Local server (stdio) (recommended)
|
|
122
173
|
|
|
123
|
-
```json
|
|
174
|
+
```json fileName="claude_desktop_config.json"
|
|
124
175
|
{
|
|
125
|
-
"
|
|
126
|
-
"intlayer
|
|
127
|
-
"
|
|
128
|
-
"
|
|
176
|
+
"mcpServers": {
|
|
177
|
+
"intlayer": {
|
|
178
|
+
"command": "npx",
|
|
179
|
+
"args": ["-y", "@intlayer/mcp"]
|
|
129
180
|
}
|
|
130
181
|
}
|
|
131
182
|
}
|
|
132
183
|
```
|
|
133
184
|
|
|
134
|
-
This configuration allows you to connect to a remote Intlayer MCP server without needing to run the server locally. The remote server provides the same functionality as the local version but is hosted and maintained externally.
|
|
135
|
-
|
|
136
185
|
---
|
|
137
186
|
|
|
138
187
|
## Using the MCP Server via CLI
|
|
139
188
|
|
|
140
189
|
You can also run the Intlayer MCP server directly from the command line for testing, debugging, or integration with other tools.
|
|
141
190
|
|
|
142
|
-
### Install the MCP Server
|
|
143
|
-
|
|
144
|
-
First, install the MCP server package globally or use it via npx:
|
|
145
|
-
|
|
146
191
|
```bash
|
|
147
192
|
# Install globally
|
|
148
193
|
npm install -g @intlayer/mcp
|
|
@@ -151,65 +196,13 @@ npm install -g @intlayer/mcp
|
|
|
151
196
|
npx @intlayer/mcp
|
|
152
197
|
```
|
|
153
198
|
|
|
154
|
-
### Start the Server
|
|
155
|
-
|
|
156
|
-
To start the MCP server with the inspector for debugging and testing:
|
|
157
|
-
|
|
158
|
-
```bash
|
|
159
|
-
# Using the built-in start command
|
|
160
|
-
npm run start
|
|
161
|
-
|
|
162
|
-
# Or directly with npx
|
|
163
|
-
npx @modelcontextprotocol/inspector npx @intlayer/mcp
|
|
164
|
-
```
|
|
165
|
-
|
|
166
|
-
This will launch the MCP server with an inspector interface that allows you to:
|
|
167
|
-
|
|
168
|
-
- Test MCP protocol communications
|
|
169
|
-
- Debug server responses
|
|
170
|
-
- Validate tool and resource implementations
|
|
171
|
-
- Monitor server performance
|
|
172
|
-
|
|
173
|
-
### Development Usage
|
|
174
|
-
|
|
175
|
-
For development and testing purposes, you can run the server in various modes:
|
|
176
|
-
|
|
177
|
-
```bash
|
|
178
|
-
# Build and start in development mode
|
|
179
|
-
npm run dev
|
|
180
|
-
|
|
181
|
-
# Run with custom configuration
|
|
182
|
-
node dist/cjs/index.cjs
|
|
183
|
-
|
|
184
|
-
# Test the server functionality
|
|
185
|
-
npm test
|
|
186
|
-
```
|
|
187
|
-
|
|
188
|
-
The server will expose Intlayer-specific tools and resources that can be consumed by any MCP-compatible client, not just Cursor or other IDEs.
|
|
189
|
-
|
|
190
|
-
---
|
|
191
|
-
|
|
192
|
-
## Features Overview
|
|
193
|
-
|
|
194
|
-
| Feature | Description |
|
|
195
|
-
| -------------- | ---------------------------------------------------------------------------- |
|
|
196
|
-
| CLI Support | Run `intlayer` commands, get usage hints and arguments inline |
|
|
197
|
-
| Versioned Docs | Auto-detect and load documentation matching your current version of Intlayer |
|
|
198
|
-
| Autocompletion | Intelligent command and config suggestions as you type |
|
|
199
|
-
| Plugin-Ready | Compatible with IDEs and tools that support the MCP standard |
|
|
200
|
-
|
|
201
|
-
---
|
|
202
|
-
|
|
203
|
-
##Useful Links
|
|
204
|
-
|
|
205
|
-
- [Intlayer CLI Documentation](https://github.com/aymericzip/intlayer/blob/main/docs/docs/en/intlayer_cli.md)
|
|
206
|
-
- [Intlayer GitHub Repository](https://github.com/aymericzip/intlayer)
|
|
207
|
-
|
|
208
199
|
---
|
|
209
200
|
|
|
210
201
|
## Doc History
|
|
211
202
|
|
|
212
203
|
| Version | Date | Changes |
|
|
213
204
|
| ------- | ---------- | ------------------------------------ |
|
|
214
|
-
| 5.5.
|
|
205
|
+
| 5.5.12 | 2025-07-11 | Add set up of ChatGPT |
|
|
206
|
+
| 5.5.12 | 2025-07-10 | Add set up of Claude Desktop |
|
|
207
|
+
| 5.5.12 | 2025-07-10 | Add SSE transport and distant server |
|
|
215
208
|
| 5.5.10 | 2025-06-29 | Init history |
|
|
@@ -59,7 +59,7 @@ const config: IntlayerConfig = {
|
|
|
59
59
|
applicationContext: "This is a test application",
|
|
60
60
|
},
|
|
61
61
|
build: {
|
|
62
|
-
|
|
62
|
+
importMode: "dynamic",
|
|
63
63
|
},
|
|
64
64
|
};
|
|
65
65
|
|
|
@@ -88,7 +88,7 @@ const config = {
|
|
|
88
88
|
applicationContext: "This is a test application",
|
|
89
89
|
},
|
|
90
90
|
build: {
|
|
91
|
-
|
|
91
|
+
importMode: "dynamic",
|
|
92
92
|
},
|
|
93
93
|
};
|
|
94
94
|
|
|
@@ -481,11 +481,9 @@ Settings that control how Intlayer optimises and builds your application's inter
|
|
|
481
481
|
|
|
482
482
|
Build options apply to the `@intlayer/babel` and `@intlayer/swc` plugins.
|
|
483
483
|
|
|
484
|
-
> In development mode, Intlayer uses
|
|
484
|
+
> In development mode, Intlayer uses static imports for dictionaries to simplify the development experience.
|
|
485
485
|
|
|
486
|
-
>
|
|
487
|
-
|
|
488
|
-
- **Note**: `@intlayer/babel` is available by default on `vite-intlayer` package, but `@intlayer/swc` is not installed by default on `next-intlayer` package as SWC plugins are still experimental on Next.js.
|
|
486
|
+
> When optimised, Intlayer will replace dictionary calls to optimise chunking, so the final bundle only imports dictionaries that are actually used.
|
|
489
487
|
|
|
490
488
|
#### Properties
|
|
491
489
|
|
|
@@ -495,21 +493,28 @@ Build options apply to the `@intlayer/babel` and `@intlayer/swc` plugins.
|
|
|
495
493
|
- _Default_: `process.env.NODE_ENV === 'production'`
|
|
496
494
|
- _Description_: Controls whether the build should be optimised.
|
|
497
495
|
- _Example_: `true`
|
|
498
|
-
- _Note_:
|
|
499
|
-
- _Note_:
|
|
496
|
+
- _Note_: When enabled, Intlayer will replace all calls of dictionaries to optimise chunking. That way the final bundle will import only the dictionaries that are used. All imports will stay as static import to avoid async processing when loading the dictionaries.
|
|
497
|
+
- _Note_: Intlayer will replace all calls of `useIntlayer` with the defined mode by the `importMode` option and `getIntlayer` with `getDictionary`.
|
|
498
|
+
- _Note_: This option relies on the `@intlayer/babel` and `@intlayer/swc` plugins.
|
|
500
499
|
- _Note_: Ensure all keys are declared statically in the `useIntlayer` calls. e.g. `useIntlayer('navbar')`.
|
|
501
500
|
|
|
502
|
-
- **
|
|
503
|
-
|
|
504
|
-
- _Type_: `
|
|
505
|
-
- _Default_: `
|
|
506
|
-
- _Description_: Controls
|
|
507
|
-
- _Example_: `
|
|
508
|
-
- _Note_:
|
|
509
|
-
|
|
510
|
-
|
|
511
|
-
|
|
501
|
+
- **importMode**:
|
|
502
|
+
|
|
503
|
+
- _Type_: `'static' | 'dynamic' | 'async'`
|
|
504
|
+
- _Default_: `'static'`
|
|
505
|
+
- _Description_: Controls how dictionaries are imported.
|
|
506
|
+
- _Example_: `'dynamic'`
|
|
507
|
+
- _Note_: Available modes:
|
|
508
|
+
- "static": Dictionaries are imported statically. Replaces `useIntlayer` with `useDictionary`.
|
|
509
|
+
- "dynamic": Dictionaries are imported dynamically using Suspense. Replaces `useIntlayer` with `useDictionaryDynamic`.
|
|
510
|
+
- "async": Dictionaries are imported dynamically asynchronously. Replaces `useIntlayer` with `await useDictionaryAsync`.
|
|
511
|
+
- _Note_: Dynamic imports rely on Suspense and may slightly impact rendering performance.
|
|
512
|
+
- _Note_: If disabled all locales will be loaded at once, even if they are not used.
|
|
513
|
+
- _Note_: This option relies on the `@intlayer/babel` and `@intlayer/swc` plugins.
|
|
512
514
|
- _Note_: Ensure all keys are declared statically in the `useIntlayer` calls. e.g. `useIntlayer('navbar')`.
|
|
515
|
+
- _Note_: This option will be ignored if `optimize` is disabled.
|
|
516
|
+
- _Note_: In most cases, `"dynamic"` will be used for React applications, `"async"` for Vue.js applications.
|
|
517
|
+
- _Note_: This option will not impact the `getIntlayer`, `getDictionary`, `useDictionary`, `useDictionaryAsync` and `useDictionaryDynamic` functions.
|
|
513
518
|
|
|
514
519
|
- **traversePattern**:
|
|
515
520
|
- _Type_: `string[]`
|
|
@@ -103,7 +103,7 @@ The Babel and SWC plugins work by analysing your application's Abstract Syntax T
|
|
|
103
103
|
|
|
104
104
|
In development mode, Intlayer uses a centralised static import for dictionaries to simplify the development experience.
|
|
105
105
|
|
|
106
|
-
By activating the option `
|
|
106
|
+
By activating the option `importMode = "dynamic"` in the [configuration](https://github.com/aymericzip/intlayer/blob/main/docs/docs/en-GB/configuration.md), Intlayer will use the dynamic import to load the dictionaries. This option is disabled by default to avoid async processing when rendering the application.
|
|
107
107
|
|
|
108
108
|
> `@intlayer/babel` is available by default on the `vite-intlayer` package,
|
|
109
109
|
|