@intlayer/docs 9.3.0 → 9.3.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (162) hide show
  1. package/README.md +24 -24
  2. package/blog/ar/rag_powered_documentation_assistant.md +1 -1
  3. package/blog/pl/rag_powered_documentation_assistant.md +1 -1
  4. package/dist/cjs/_virtual/_rolldown/runtime.cjs +1 -2
  5. package/dist/cjs/authors2.cjs +0 -1
  6. package/dist/cjs/common.cjs.map +1 -1
  7. package/dist/cjs/generated/blog.entry.cjs +4 -2
  8. package/dist/cjs/generated/blog.entry.cjs.map +1 -1
  9. package/dist/cjs/generated/docs.entry.cjs +4 -2
  10. package/dist/cjs/generated/docs.entry.cjs.map +1 -1
  11. package/dist/cjs/generated/frequentQuestions.entry.cjs +4 -2
  12. package/dist/cjs/generated/frequentQuestions.entry.cjs.map +1 -1
  13. package/dist/cjs/generated/legal.entry.cjs +4 -2
  14. package/dist/cjs/generated/legal.entry.cjs.map +1 -1
  15. package/dist/esm/generated/blog.entry.mjs +4 -2
  16. package/dist/esm/generated/blog.entry.mjs.map +1 -1
  17. package/dist/esm/generated/docs.entry.mjs +4 -2
  18. package/dist/esm/generated/docs.entry.mjs.map +1 -1
  19. package/dist/esm/generated/frequentQuestions.entry.mjs +4 -2
  20. package/dist/esm/generated/frequentQuestions.entry.mjs.map +1 -1
  21. package/dist/esm/generated/legal.entry.mjs +4 -2
  22. package/dist/esm/generated/legal.entry.mjs.map +1 -1
  23. package/docs/ar/configuration.md +10 -10
  24. package/docs/ar/interest_of_intlayer.md +24 -22
  25. package/docs/ar/intlayer_with_express.md +1 -1
  26. package/docs/ar/intlayer_with_svelte_kit.md +1 -1
  27. package/docs/ar/intlayer_with_tanstack+solid.md +5 -3
  28. package/docs/ar/intlayer_with_tanstack.md +5 -3
  29. package/docs/ar/lsp.md +114 -175
  30. package/docs/ar/readme.md +25 -25
  31. package/docs/bn/configuration.md +10 -10
  32. package/docs/bn/interest_of_intlayer.md +24 -22
  33. package/docs/cs/configuration.md +10 -10
  34. package/docs/cs/interest_of_intlayer.md +24 -22
  35. package/docs/de/configuration.md +10 -10
  36. package/docs/de/interest_of_intlayer.md +24 -22
  37. package/docs/de/intlayer_with_svelte_kit.md +1 -1
  38. package/docs/de/intlayer_with_tanstack+solid.md +5 -3
  39. package/docs/de/intlayer_with_tanstack.md +5 -3
  40. package/docs/de/lsp.md +111 -172
  41. package/docs/de/readme.md +24 -24
  42. package/docs/en/configuration.md +10 -10
  43. package/docs/en/interest_of_intlayer.md +24 -22
  44. package/docs/en/intlayer_with_svelte_kit.md +1 -1
  45. package/docs/en/intlayer_with_tanstack+solid.md +5 -3
  46. package/docs/en/intlayer_with_tanstack.md +5 -3
  47. package/docs/en/lsp.md +109 -170
  48. package/docs/en/readme.md +24 -24
  49. package/docs/en-GB/configuration.md +10 -10
  50. package/docs/en-GB/interest_of_intlayer.md +24 -22
  51. package/docs/en-GB/intlayer_with_svelte_kit.md +1 -1
  52. package/docs/en-GB/intlayer_with_tanstack+solid.md +5 -3
  53. package/docs/en-GB/intlayer_with_tanstack.md +5 -3
  54. package/docs/en-GB/lsp.md +109 -170
  55. package/docs/en-GB/readme.md +24 -24
  56. package/docs/es/configuration.md +10 -10
  57. package/docs/es/interest_of_intlayer.md +24 -22
  58. package/docs/es/intlayer_with_svelte_kit.md +1 -1
  59. package/docs/es/intlayer_with_tanstack+solid.md +5 -3
  60. package/docs/es/intlayer_with_tanstack.md +5 -3
  61. package/docs/es/lsp.md +114 -175
  62. package/docs/es/readme.md +24 -24
  63. package/docs/fr/configuration.md +10 -10
  64. package/docs/fr/interest_of_intlayer.md +24 -22
  65. package/docs/fr/intlayer_with_svelte_kit.md +1 -1
  66. package/docs/fr/intlayer_with_tanstack+solid.md +5 -3
  67. package/docs/fr/intlayer_with_tanstack.md +5 -3
  68. package/docs/fr/lsp.md +110 -171
  69. package/docs/fr/readme.md +24 -24
  70. package/docs/hi/configuration.md +10 -10
  71. package/docs/hi/interest_of_intlayer.md +24 -22
  72. package/docs/hi/intlayer_with_express.md +1 -1
  73. package/docs/hi/intlayer_with_svelte_kit.md +1 -1
  74. package/docs/hi/intlayer_with_tanstack+solid.md +5 -3
  75. package/docs/hi/intlayer_with_tanstack.md +5 -3
  76. package/docs/hi/lsp.md +113 -174
  77. package/docs/hi/readme.md +24 -24
  78. package/docs/id/configuration.md +10 -10
  79. package/docs/id/interest_of_intlayer.md +24 -22
  80. package/docs/id/intlayer_with_svelte_kit.md +1 -1
  81. package/docs/id/intlayer_with_tanstack+solid.md +5 -3
  82. package/docs/id/intlayer_with_tanstack.md +5 -3
  83. package/docs/id/lsp.md +113 -174
  84. package/docs/id/readme.md +24 -24
  85. package/docs/it/configuration.md +10 -10
  86. package/docs/it/interest_of_intlayer.md +24 -22
  87. package/docs/it/intlayer_with_svelte_kit.md +1 -1
  88. package/docs/it/intlayer_with_tanstack+solid.md +5 -3
  89. package/docs/it/intlayer_with_tanstack.md +5 -3
  90. package/docs/it/lsp.md +115 -176
  91. package/docs/it/readme.md +24 -24
  92. package/docs/ja/configuration.md +10 -10
  93. package/docs/ja/interest_of_intlayer.md +24 -22
  94. package/docs/ja/intlayer_with_tanstack+solid.md +5 -3
  95. package/docs/ja/intlayer_with_tanstack.md +5 -3
  96. package/docs/ja/lsp.md +113 -174
  97. package/docs/ja/readme.md +24 -24
  98. package/docs/ko/configuration.md +10 -10
  99. package/docs/ko/interest_of_intlayer.md +24 -22
  100. package/docs/ko/intlayer_with_svelte_kit.md +1 -1
  101. package/docs/ko/intlayer_with_tanstack+solid.md +5 -3
  102. package/docs/ko/intlayer_with_tanstack.md +5 -3
  103. package/docs/ko/lsp.md +112 -173
  104. package/docs/ko/readme.md +24 -24
  105. package/docs/nl/configuration.md +10 -10
  106. package/docs/nl/interest_of_intlayer.md +24 -22
  107. package/docs/pl/configuration.md +10 -10
  108. package/docs/pl/interest_of_intlayer.md +4 -2
  109. package/docs/pl/intlayer_with_svelte_kit.md +1 -1
  110. package/docs/pl/intlayer_with_tanstack+solid.md +5 -3
  111. package/docs/pl/intlayer_with_tanstack.md +5 -3
  112. package/docs/pl/lsp.md +115 -176
  113. package/docs/pl/readme.md +24 -24
  114. package/docs/pt/configuration.md +10 -10
  115. package/docs/pt/interest_of_intlayer.md +24 -22
  116. package/docs/pt/intlayer_with_svelte_kit.md +1 -1
  117. package/docs/pt/intlayer_with_tanstack+solid.md +5 -3
  118. package/docs/pt/intlayer_with_tanstack.md +5 -3
  119. package/docs/pt/lsp.md +113 -174
  120. package/docs/pt/readme.md +24 -24
  121. package/docs/ru/configuration.md +10 -10
  122. package/docs/ru/interest_of_intlayer.md +24 -22
  123. package/docs/ru/intlayer_with_nextjs_14.md +1 -1
  124. package/docs/ru/intlayer_with_nextjs_15.md +1 -1
  125. package/docs/ru/intlayer_with_svelte_kit.md +1 -1
  126. package/docs/ru/intlayer_with_tanstack+solid.md +5 -3
  127. package/docs/ru/intlayer_with_tanstack.md +5 -3
  128. package/docs/ru/lsp.md +112 -173
  129. package/docs/ru/readme.md +24 -24
  130. package/docs/tr/configuration.md +10 -10
  131. package/docs/tr/interest_of_intlayer.md +24 -22
  132. package/docs/tr/intlayer_with_svelte_kit.md +1 -1
  133. package/docs/tr/intlayer_with_tanstack+solid.md +5 -3
  134. package/docs/tr/intlayer_with_tanstack.md +5 -3
  135. package/docs/tr/lsp.md +113 -174
  136. package/docs/tr/readme.md +24 -24
  137. package/docs/uk/configuration.md +10 -10
  138. package/docs/uk/interest_of_intlayer.md +4 -2
  139. package/docs/uk/intlayer_with_svelte_kit.md +1 -1
  140. package/docs/uk/intlayer_with_tanstack+solid.md +5 -3
  141. package/docs/uk/intlayer_with_tanstack.md +5 -3
  142. package/docs/uk/lsp.md +113 -174
  143. package/docs/uk/per_locale_file.md +1 -1
  144. package/docs/uk/readme.md +24 -24
  145. package/docs/ur/configuration.md +10 -10
  146. package/docs/ur/interest_of_intlayer.md +24 -22
  147. package/docs/vi/configuration.md +10 -10
  148. package/docs/vi/interest_of_intlayer.md +24 -22
  149. package/docs/vi/intlayer_with_svelte_kit.md +1 -1
  150. package/docs/vi/intlayer_with_tanstack+solid.md +5 -3
  151. package/docs/vi/intlayer_with_tanstack.md +5 -3
  152. package/docs/vi/lsp.md +115 -176
  153. package/docs/vi/readme.md +24 -24
  154. package/docs/zh/configuration.md +10 -10
  155. package/docs/zh/interest_of_intlayer.md +24 -22
  156. package/docs/zh/intlayer_with_svelte_kit.md +1 -1
  157. package/docs/zh/intlayer_with_tanstack+solid.md +5 -3
  158. package/docs/zh/intlayer_with_tanstack.md +5 -3
  159. package/docs/zh/lsp.md +113 -174
  160. package/docs/zh/readme.md +21 -21
  161. package/docs/zh-TW/interest_of_intlayer.md +24 -22
  162. package/package.json +6 -6
package/docs/en/lsp.md CHANGED
@@ -1,12 +1,14 @@
1
1
  ---
2
2
  createdAt: 2025-06-07
3
- updatedAt: 2026-05-31
3
+ updatedAt: 2026-08-10
4
4
  title: Intlayer LSP Server
5
- description: Learn how the Intlayer Language Server provides Go-to-Definition and other IDE features for useIntlayer, getIntlayer, and related calls across all supported editors.
5
+ description: Learn how the Intlayer Language Server brings Go-to-Definition, Find References, hover previews, key autocompletion, and diagnostics to your IDE and AI agent.
6
6
  keywords:
7
7
  - LSP
8
8
  - Language Server
9
9
  - Go to Definition
10
+ - Autocompletion
11
+ - Diagnostics
10
12
  - IDE
11
13
  - Intlayer
12
14
  - VS Code
@@ -16,6 +18,9 @@ slugs:
16
18
  - doc
17
19
  - lsp
18
20
  history:
21
+ - version: 9.1.3
22
+ date: 2026-08-10
23
+ changes: "Add Find References, hover, autocompletion and diagnostics"
19
24
  - version: 8.12.0
20
25
  date: 2026-06-01
21
26
  changes: "Release LSP"
@@ -24,48 +29,47 @@ author: aymericzip
24
29
 
25
30
  # Intlayer LSP Server
26
31
 
27
- The **Intlayer Language Server** is a [Language Server Protocol (LSP)](https://microsoft.github.io/language-server-protocol/) implementation that enhances your IDE with Intlayer-aware intelligence. It currently provides **Go to Definition** for dictionary key calls, letting you jump straight from `useIntlayer("my-key")` in your component to the `.content.ts` file that declares it.
32
+ The **Intlayer Language Server** is a [Language Server Protocol (LSP)](https://microsoft.github.io/language-server-protocol/) implementation that makes your IDE and your AI agent — Intlayer-aware. It connects a call like `useIntlayer("home")` to the `.content.ts` file that declares it, in both directions.
28
33
 
29
34
  ---
30
35
 
31
- ## Why Use the LSP?
36
+ ## Features
32
37
 
33
- When you use Intlayer, the connection between a call like `useIntlayer("homepage")` and its declaration in `src/homepage.content.ts` is implicit. Without tooling, you must search for the file manually. The LSP makes that link explicit:
38
+ | Feature | Shortcut | What it does |
39
+ | ----------------------- | ------------------- | -------------------------------------------------------------------------------------------------- |
40
+ | **Go to Definition** | `F12` / `Cmd+Click` | Jump from a dictionary key or a field usage to its declaration in the content file |
41
+ | **Find All References** | `Shift+F12` | From a content file, list every call site that uses that key or field |
42
+ | **Hover** | hover the cursor | Preview a dictionary's fields, or a field's translated value, without leaving the file |
43
+ | **Autocompletion** | `"` `'` `` ` `` `.` | Suggest declared dictionary keys inside a getter, and content fields after `.` or in destructuring |
44
+ | **Diagnostics** | automatic | Warn when a key is not declared in any content file |
34
45
 
35
- **AI agent awareness**
46
+ Two extra behaviours are worth knowing:
36
47
 
37
- AI coding agents (Cursor, Windsurf, GitHub Copilot, Claude Code, Codex) rely on the language server to resolve symbols and understand cross-file relationships. With the Intlayer LSP running, agents can follow `useIntlayer("key")` back to its declaration, giving them accurate context about available content keys, the shape of each dictionary, and which files to read or edit.
48
+ - **Merged dictionaries** a key split across several content files returns one result per file, so you can navigate to every declaration.
49
+ - **Monorepo-aware** — the server resolves the _closest_ `intlayer.config.*` to each file, so several projects in one workspace each get their own dictionaries.
38
50
 
39
- **Jump to Definition**
51
+ ### Supported calls
40
52
 
41
- Place your cursor on any dictionary key string inside a supported getter call and press `F12` (or `Cmd/Ctrl+Click`). The editor opens the content declaration file and positions the cursor on the `key:` line.
53
+ The key is read either from a positional string argument or from an options object (`{ namespace }`, `{ id }`).
42
54
 
43
- **Merged dictionary support**
55
+ | Library | Callers |
56
+ | --------------------------- | -------------------------------------------------------- |
57
+ | **Intlayer** | `useIntlayer`, `getIntlayer` |
58
+ | **i18next / react-i18next** | `useTranslation`, `getFixedT`, `t`, `Trans` |
59
+ | **next-intl / use-intl** | `useTranslations`, `getTranslations`, `createTranslator` |
60
+ | **react-intl** | `formatMessage`, `FormattedMessage` |
61
+ | **Lingui** | `useLingui`, `t`, `Trans`, `_` |
62
+ | **vue-i18n** | `useI18n` |
44
63
 
45
- A key can be split across multiple content files (Intlayer merges them). The server returns one `Location` per source file so you can navigate to every declaration.
64
+ This works for every `*-intlayer` package (`next-intlayer`, `react-intlayer`, `vue-intlayer`, `svelte-intlayer`, `solid-intlayer`, `preact-intlayer`, `angular-intlayer`, `lit-intlayer`, `express-intlayer`, `hono-intlayer`, `fastify-intlayer`, `intlayer`), and for the compat adapter packages that let you keep your existing i18n syntax.
46
65
 
47
- **Works everywhere**
48
-
49
- Supports all `*-intlayer` packages (`next-intlayer`, `react-intlayer`, `vue-intlayer`, `svelte-intlayer`, `solid-intlayer`, `preact-intlayer`, `angular-intlayer`, `lit-intlayer`, `express-intlayer`, `hono-intlayer`, `fastify-intlayer`, `adonis-intlayer`, `intlayer`).
50
-
51
- ### Supported getter calls
52
-
53
- The server detects the following function calls and extracts the first string-literal argument as the dictionary key:
54
-
55
- | Function | Example |
56
- | --------------- | ------------------------------- |
57
- | `useIntlayer` | `useIntlayer("hero")` |
58
- | `getIntlayer` | `getIntlayer("hero", locale)` |
59
- | `useDictionary` | `useDictionary("hero")` |
60
- | `getDictionary` | `getDictionary("hero", locale)` |
61
-
62
- TypeScript generics and extra arguments are ignored — only the first string-literal argument is used as the dictionary key.
66
+ > Dictionaries are read from the build output, so run `npx intlayer build` — or keep your dev server running — to give the server something to resolve.
63
67
 
64
68
  ---
65
69
 
66
70
  ## Installation
67
71
 
68
- The LSP server is distributed as part of `@intlayer/lsp`:
72
+ The server ships as the `intlayer-lsp` binary in `@intlayer/lsp`:
69
73
 
70
74
  ```bash packageManager="npm"
71
75
  npm install --save-dev @intlayer/lsp
@@ -83,43 +87,43 @@ pnpm add --save-dev @intlayer/lsp
83
87
  bun add --dev @intlayer/lsp
84
88
  ```
85
89
 
86
- The package exposes the `intlayer-lsp` binary, which editors use as the server executable.
90
+ Install it globally instead (`npm install -g @intlayer/lsp`) if your editor needs `intlayer-lsp` on the `PATH` this is the case for the Claude Code plugin and for any configuration below that calls the binary directly.
87
91
 
88
92
  ---
89
93
 
90
- ## Setup as a Claude Code Plugin
94
+ ## Setup
91
95
 
92
- The Intlayer LSP is available as a **Claude Code plugin** hosted directly in the Intlayer GitHub repository. Installing it gives Claude Code native Go-to-Definition awareness for all your `useIntlayer` / `getIntlayer` calls.
96
+ <Tabs defaultTab="vscode">
97
+ <Tab label="VS Code" value="vscode">
93
98
 
94
- ### 1. Install the language server binary
99
+ Install the [Intlayer VS Code extension](https://marketplace.visualstudio.com/items?itemName=Intlayer.intlayer-vs-code-extension). The language server is bundled since v8.12.0 and starts automatically — **no configuration required**.
95
100
 
96
- ```bash packageManager="npm"
97
- npm install -g @intlayer/lsp
98
- ```
101
+ See the [VS Code extension documentation](https://intlayer.org/doc/vs-code-extension) for its other features.
99
102
 
100
- ```bash packageManager="yarn"
101
- yarn global add @intlayer/lsp
102
- ```
103
+ </Tab>
104
+ <Tab label="Cursor / Windsurf" value="cursor">
103
105
 
104
- ```bash packageManager="pnpm"
105
- pnpm add -g @intlayer/lsp
106
- ```
106
+ [Cursor](https://www.cursor.com/) and [Windsurf](https://windsurf.com/) are VS Code forks and use the same extension ecosystem. Install the [Intlayer VS Code extension](https://marketplace.visualstudio.com/items?itemName=Intlayer.intlayer-vs-code-extension) once and the server activates automatically — **no configuration required**.
107
107
 
108
- This puts the `intlayer-lsp` binary on your PATH, which is what the plugin's `lspServers` entry invokes.
108
+ </Tab>
109
+ <Tab label="Claude Code" value="claude-code">
109
110
 
110
- ### 2. Register the Intlayer marketplace and install the plugin
111
+ Intlayer ships a **Claude Code plugin** hosted in the Intlayer repository. It gives Claude Code real symbol resolution for your dictionary keys instead of falling back to `grep`.
112
+
113
+ Put the binary on your `PATH`, then register the marketplace and install the plugin:
111
114
 
112
115
  ```bash
116
+ npm install -g @intlayer/lsp
117
+
113
118
  claude plugin marketplace add intlayer@github:aymericzip/intlayer
114
119
  claude plugin install intlayer-lsp@intlayer
115
- claude plugin enable intlayer-lsp@intlayer
116
120
  ```
117
121
 
118
- Claude Code will add `"intlayer-lsp@intlayer": true` to your `enabledPlugins` and automatically start the language server on the supported file types (`.ts`, `.tsx`, `.js`, `.jsx`, `.vue`, `.svelte`).
122
+ `install` also enables the plugin. **Restart Claude Code** language servers are loaded at startup, so the plugin has no effect until then.
119
123
 
120
- ### 3. Enable the LSP tool (if not already active)
124
+ Claude Code then starts the server on `.ts`, `.tsx`, `.js`, `.jsx`, `.vue`, `.astro` and `.svelte` files, and uses `goToDefinition`, `findReferences` and `hover` when navigating your code.
121
125
 
122
- Some Claude Code versions require the LSP feature flag to be set. Add the following to your `~/.claude/settings.json` if Go-to-Definition isn't working after installation:
126
+ If Go-to-Definition still does nothing, your Claude Code version may gate the LSP tool behind a flag:
123
127
 
124
128
  ```json fileName="~/.claude/settings.json"
125
129
  {
@@ -129,61 +133,10 @@ Some Claude Code versions require the LSP feature flag to be set. Add the follow
129
133
  }
130
134
  ```
131
135
 
132
- Restart Claude Code — it will now use `goToDefinition`, `findReferences`, and other LSP operations when navigating your Intlayer codebase instead of falling back to `grep`.
133
-
134
- ---
135
-
136
- ## Setup in VS Code (via extension — recommended)
137
-
138
- If you have the [Intlayer VS Code extension](https://marketplace.visualstudio.com/items?itemName=Intlayer.intlayer-vs-code-extension) installed, the language server starts automatically. No additional configuration is required. The LSP is directly integrated into the VSCode extension since v8.12.0.
139
-
140
- > See the [VS Code extension documentation](https://intlayer.org/doc/vs-code-extension) for installation and other features.
141
-
142
- ---
143
-
144
- ## Manual Setup in VS Code
136
+ </Tab>
137
+ <Tab label="Zed" value="zed">
145
138
 
146
- If you are not using the Intlayer extension, you can wire up the language server manually using a generic LSP client extension such as [**vscode-glspc**](https://marketplace.visualstudio.com/items?itemName=sibiraj-s.vscode-scss-formatter) or by writing your own small extension. The recommended approach is to use the Intlayer extension.
147
-
148
- For reference, the server launches via the `intlayer-lsp` binary over stdio:
149
-
150
- ```json fileName=".vscode/settings.json"
151
- {
152
- "intlayer.languageServer.command": "npx",
153
- "intlayer.languageServer.args": ["@intlayer/lsp"]
154
- }
155
- ```
156
-
157
- The Intlayer extension reads these settings to launch the server. If you rely solely on the extension, no manual settings are needed.
158
-
159
- ---
160
-
161
- ## Setup in Cursor
162
-
163
- [Cursor](https://www.cursor.com/) is a VS Code fork with built-in AI features. It uses the same extension ecosystem, so the **Intlayer VS Code extension** works without any extra configuration — install it once and Cursor picks it up automatically.
164
-
165
- If you prefer a manual configuration, Cursor also reads `.vscode/settings.json` from the workspace root, so the VS Code snippet above applies directly.
166
-
167
- ---
168
-
169
- ## Setup in Windsurf
170
-
171
- [Windsurf](https://windsurf.com/) (by Codeium) is another VS Code-based editor. Install the Intlayer extension from the VS Code Marketplace and the language server activates automatically, exactly as it does in VS Code and Cursor.
172
-
173
- For manual configuration, create `.vscode/settings.json` at the project root:
174
-
175
- ```json fileName=".vscode/settings.json"
176
- {
177
- "intlayer.languageServer.command": "npx",
178
- "intlayer.languageServer.args": ["@intlayer/lsp"]
179
- }
180
- ```
181
-
182
- ---
183
-
184
- ## Setup in Zed
185
-
186
- [Zed](https://zed.dev/) has native LSP support through its language settings. Add an entry in your Zed user settings (`~/.config/zed/settings.json`):
139
+ Zed has native LSP support. Add the server to your user settings:
187
140
 
188
141
  ```json fileName="~/.config/zed/settings.json"
189
142
  {
@@ -196,45 +149,19 @@ For manual configuration, create `.vscode/settings.json` at the project root:
196
149
  }
197
150
  },
198
151
  "languages": {
199
- "TypeScript": {
200
- "language_servers": ["intlayer-lsp", "..."]
201
- },
202
- "TSX": {
203
- "language_servers": ["intlayer-lsp", "..."]
204
- },
205
- "JavaScript": {
206
- "language_servers": ["intlayer-lsp", "..."]
207
- },
208
- "Vue.js": {
209
- "language_servers": ["intlayer-lsp", "..."]
210
- },
211
- "Svelte": {
212
- "language_servers": ["intlayer-lsp", "..."]
213
- }
152
+ "TypeScript": { "language_servers": ["intlayer-lsp", "..."] },
153
+ "TSX": { "language_servers": ["intlayer-lsp", "..."] },
154
+ "JavaScript": { "language_servers": ["intlayer-lsp", "..."] },
155
+ "Vue.js": { "language_servers": ["intlayer-lsp", "..."] },
156
+ "Svelte": { "language_servers": ["intlayer-lsp", "..."] }
214
157
  }
215
158
  }
216
159
  ```
217
160
 
218
- The `"..."` placeholder tells Zed to keep its default language servers alongside the Intlayer one.
219
-
220
- ---
221
-
222
- ## Setup for AI Agent CLIs (Claude Code, Codex, etc.)
223
-
224
- **Claude Code** has first-class LSP plugin support — follow the [Claude Code Plugin setup](#setup-as-a-claude-code-plugin) above to get the full Go-to-Definition experience directly in your terminal sessions.
225
-
226
- **OpenAI Codex** and other terminal-based tools do not yet act as LSP clients — they read and write files directly rather than maintaining a persistent language-server session. For those tools, the value of having the LSP running comes indirectly: when the server is active in a companion editor (VS Code, Cursor, Windsurf, …) the editor's live index is available to any AI agent that can query it through editor-provided context (e.g., Cursor Composer, Windsurf Cascade, GitHub Copilot Chat).
227
-
228
- If you are working purely in a terminal without an editor open, you can start the language server in the background so it's ready for any editor that later connects to the same workspace:
229
-
230
- ```bash
231
- # Keep the server alive in the background
232
- npx @intlayer/lsp &
233
- ```
234
-
235
- ---
161
+ The `"..."` placeholder keeps Zed's default language servers alongside the Intlayer one.
236
162
 
237
- ## Manual Setup in Neovim
163
+ </Tab>
164
+ <Tab label="Neovim" value="neovim">
238
165
 
239
166
  Using [nvim-lspconfig](https://github.com/neovim/nvim-lspconfig), register a custom server configuration:
240
167
 
@@ -267,21 +194,10 @@ end
267
194
  lspconfig.intlayer_lsp.setup({})
268
195
  ```
269
196
 
270
- After restarting Neovim, pressing `gd` over an Intlayer key will invoke Go to Definition.
271
-
272
- ---
273
-
274
- ## Manual Setup in Other Editors
275
-
276
- Any editor that supports the Language Server Protocol can use `@intlayer/lsp`. The server:
197
+ After restarting Neovim, `gd` over a dictionary key runs Go to Definition and `gr` runs Find References.
277
198
 
278
- - **Transport** – Node.js IPC / stdio (standard)
279
- - **Executable** – `npx @intlayer/lsp` (or the locally installed `intlayer-lsp` binary)
280
- - **Capabilities** – `definitionProvider: true`, `textDocumentSync: Incremental`
281
-
282
- Consult your editor's LSP documentation for the exact configuration format (e.g., `languageserver.json` for [coc.nvim](https://github.com/neoclide/coc.nvim), or the LSP client settings in [Helix](https://helix-editor.com)).
283
-
284
- ### Example: coc.nvim
199
+ </Tab>
200
+ <Tab label="coc.nvim" value="coc">
285
201
 
286
202
  ```json fileName="~/.config/nvim/coc-settings.json"
287
203
  {
@@ -307,9 +223,14 @@ Consult your editor's LSP documentation for the exact configuration format (e.g.
307
223
  }
308
224
  ```
309
225
 
310
- ### Example: Helix
226
+ </Tab>
227
+ <Tab label="Helix" value="helix">
311
228
 
312
229
  ```toml fileName="~/.config/helix/languages.toml"
230
+ [language-server.intlayer-lsp]
231
+ command = "npx"
232
+ args = ["@intlayer/lsp"]
233
+
313
234
  [[language]]
314
235
  name = "typescript"
315
236
  language-servers = ["intlayer-lsp", "typescript-language-server"]
@@ -317,36 +238,54 @@ language-servers = ["intlayer-lsp", "typescript-language-server"]
317
238
  [[language]]
318
239
  name = "tsx"
319
240
  language-servers = ["intlayer-lsp", "typescript-language-server"]
320
-
321
- [language-server.intlayer-lsp]
322
- command = "npx"
323
- args = ["@intlayer/lsp"]
324
241
  ```
325
242
 
243
+ </Tab>
244
+ <Tab label="Other editors" value="other">
245
+
246
+ Any LSP-capable editor can run `@intlayer/lsp`. Point it at:
247
+
248
+ - **Executable** — `npx @intlayer/lsp`, or the `intlayer-lsp` binary
249
+ - **Transport** — stdio (standard)
250
+ - **Capabilities** — `definitionProvider`, `referencesProvider`, `hoverProvider`, `completionProvider` (trigger characters `"` `'` `` ` `` `.`), push diagnostics, `textDocumentSync: Incremental`
251
+ - **Root patterns** — `intlayer.config.ts`, `intlayer.config.js`, `package.json`
252
+
253
+ Consult your editor's LSP documentation for the exact configuration format.
254
+
255
+ </Tab>
256
+ </Tabs>
257
+
326
258
  ---
327
259
 
328
- ## How It Works
260
+ ## Note on terminal AI agents
329
261
 
330
- When the server starts, it resolves the Intlayer configuration from the workspace root using `getConfiguration()`. This gives it the `build` and `system` paths needed to find compiled dictionaries.
262
+ **Claude Code** acts as a real LSP client see the tab above.
331
263
 
332
- On each **Go to Definition** request:
264
+ **OpenAI Codex** and most other terminal tools are not LSP clients: they read and write files directly. Running the server on its own does not help them; the value comes from having it active in a companion editor whose index the agent can query (Cursor Composer, Windsurf Cascade, Copilot Chat).
333
265
 
334
- 1. The server reads the full text of the open document.
335
- 2. It scans for getter calls (`useIntlayer`, `getIntlayer`, etc.) using a regular expression.
336
- 3. It checks whether the cursor position falls inside one of those calls.
337
- 4. If it does, it extracts the dictionary key (capture group 3 of the regex) and calls `getUnmergedDictionaries()` to locate every content file that declares that key.
338
- 5. It reads each matching file and finds the exact line containing `key: "<key>"` to position the cursor precisely.
339
- 6. It returns an array of `Location` objects — one per source file.
266
+ ---
340
267
 
341
- Configuration is lazily resolved and cached per session; it resets on each `initialize` request (e.g., when you open a new workspace folder).
268
+ ## How It Works
269
+
270
+ For each file, the server locates the closest `intlayer.config.*` and loads that project's configuration to find the compiled dictionaries. Configuration, dictionaries and the source-file list are cached with short TTLs, and invalidated whenever a watched content file changes.
271
+
272
+ On a request, the server parses the document (via [oxc](https://oxc.rs/)) and inspects the cursor position:
273
+
274
+ 1. **On a key string** (`useIntlayer("home")`) → returns every content file declaring that key, positioned on its `key:` line.
275
+ 2. **On a field usage** (`content.title`, a destructured property, `t('path.to.field')`, `<Trans>`, …) → resolves the variable back to its dictionary and returns the matching field inside the content files.
276
+ 3. **From a content file** → runs the reverse lookup, scanning project sources for call sites of that key or field.
342
277
 
343
278
  ---
344
279
 
345
280
  ## Troubleshooting
346
281
 
347
- | Symptom | Likely cause | Fix |
348
- | ------------------------------- | -------------------------- | ------------------------------------------------------------------------------- |
349
- | Go to Definition does nothing | Server not running | Check that `@intlayer/lsp` is installed and the editor is launching it |
350
- | Wrong workspace root detected | Multiple workspace folders | Ensure the folder containing `intlayer.config.ts` is the first workspace folder |
351
- | Definitions not found for a key | Config not resolved | Verify `intlayer.config.ts` (or `.js`) exists at the workspace root |
352
- | Server crashes on start | Node.js version too old | Requires Node.js 14.18 |
282
+ | Symptom | Likely cause | Fix |
283
+ | --------------------------------------- | ---------------------------- | ------------------------------------------------------------------------ |
284
+ | Nothing happens at all | Server not running | Check `@intlayer/lsp` is installed and your editor is launching it |
285
+ | Works in the editor, not in Claude Code | Plugin installed mid-session | Restart Claude Code language servers load at startup |
286
+ | No definitions found for a key | Dictionaries not built | Run `npx intlayer build`, or start your dev server |
287
+ | Every key reported as undeclared | Config not resolved | Verify an `intlayer.config.ts` (or `.js`) exists at your project root |
288
+ | Wrong project used in a monorepo | Missing per-package config | Add an `intlayer.config.*` to each package that declares its own content |
289
+ | Server crashes on start | Node.js version too old | Requires Node.js ≥ 14.18 |
290
+
291
+ In VS Code, the server logs to **View → Output → "Intlayer LSP"** — useful to confirm which config was resolved and how many dictionaries were found.
package/docs/en/readme.md CHANGED
@@ -46,27 +46,27 @@ With **per-locale content files**, **TypeScript autocompletion**, **tree-shakabl
46
46
 
47
47
  ## Keys benefits of Intlayer:
48
48
 
49
- | Feature | Description |
50
- | --------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
51
- | <img src="https://github.com/aymericzip/intlayer/blob/main/docs/assets/frameworks.png?raw=true" alt="Feature" width="700"> | **Cross-Frameworks Support**<br><br>Intlayer is compatible with all major frameworks and libraries, including Next.js, React, Vite, Vue.js, Nuxt, Preact, Express, and more. |
52
- | <img src="https://github.com/aymericzip/intlayer/blob/main/docs/assets/javascript_content_management.jpg?raw=true" alt="Feature" width="700"> | **JavaScript-Powered Content Management**<br><br>Harness the flexibility of JavaScript to define and manage your content efficiently. <br><br> - [Content declaration](https://intlayer.org/doc/concept/content) |
53
- | <img src="https://github.com/aymericzip/intlayer/blob/main/docs/assets/per_locale_content_declaration_file.png?raw=true" alt="Feature" width="700"> | **Per-Locale Content Declaration File**<br><br>Speed up your development by declaring your content once, before auto generation.<br><br> - [Per-Locale Content Declaration File](https://intlayer.org/doc/concept/per-locale-file) |
54
- | <img src="https://github.com/aymericzip/intlayer/blob/main/docs/assets/compiler.jpg?raw=true" alt="Feature" width="700"> | **Compiler**<br><br>The Intlayer Compiler extract automatically the content from the components and generate the dictionary files.<br><br> - [Compiler](https://intlayer.org/doc/compiler) |
55
- | <img src="https://github.com/aymericzip/intlayer/blob/main/docs/assets/autocompletion.png?raw=true" alt="Feature" width="700"> | **Type-Safe Environment**<br><br>Leverage TypeScript to ensure your content definitions and code are error-free, while also benefiting from IDE autocompletion.<br><br> - [TypeScript configuration](https://intlayer.org/doc/environment/vite-and-react#configure-typescript) |
56
- | <img src="https://github.com/aymericzip/intlayer/blob/main/docs/assets/config_file.png?raw=true" alt="Feature" width="700"> | **Simplified Setup**<br><br>Get up and running quickly with minimal configuration. Adjust settings for internationalization, routing, AI, build, and content handling with ease. <br><br> - [Explore Next.js integration](https://intlayer.org/doc/environment/nextjs) |
57
- | <img src="https://github.com/aymericzip/intlayer/blob/main/docs/assets/content_retrieval.png?raw=true" alt="Feature" width="700"> | **Simplified Content Retrieval**<br><br>No need to call your `t` function for each piece of content. Retrieve all your content directly using a single hook.<br><br> - [React integration](https://intlayer.org/doc/environment/create-react-app) |
58
- | <img src="https://github.com/aymericzip/intlayer/blob/main/docs/assets/server_component.png?raw=true" alt="Feature" width="700"> | **Consistent Server Component Implementation**<br><br>Perfectly suited for Next.js server components, use the same implementation for both client and server components, no need to pass your `t` function across each server component. <br><br> - [Server Components](https://intlayer.org/doc/environment/nextjs#step-7-utilize-content-in-your-code) |
59
- | <img src="https://github.com/aymericzip/intlayer/blob/main/docs/assets/file_tree.png?raw=true" alt="Feature" width="700"> | **Organized Codebase**<br><br>Keep your codebase more organized: 1 component = 1 dictionary in the same folder. Translations close to their respective components, enhance maintainability and clarity. <br><br> - [How Intlayer works](https://intlayer.org/doc/concept/how-works-intlayer) |
60
- | <img src="https://github.com/aymericzip/intlayer/blob/main/docs/assets/url_routing.png?raw=true" alt="Feature" width="700"> | **Enhanced Routing**<br><br>Full support of app routing, adapting seamlessly to complex application structures, for Next.js, React, Vite, Vue.js, etc.<br><br> - [Explore Next.js integration](https://intlayer.org/doc/environment/nextjs) |
61
- | <img src="https://github.com/aymericzip/intlayer/blob/main/docs/assets/markdown.png?raw=true" alt="Feature" width="700"> | **Markdown Support**<br><br>Import and interpret, locale files and remote Markdown for multilingual content like privacy policies, documentation, etc. Interpret and make Markdown metadata accessible in your code.<br><br> - [Content files](https://intlayer.org/doc/concept/content/file) |
62
- | <img src="https://github.com/aymericzip/intlayer/blob/main/docs/assets/visual_editor.png?raw=true" alt="Feature" width="700"> | **Free Visual Editor & CMS**<br><br>A free visual editor and CMS are available for content writers, removing the need for a localization platform. Keep your content synchronized using Git, or externalize it totally or partially with the CMS.<br><br> - [Intlayer Editor](https://intlayer.org/doc/concept/editor) <br> - [Intlayer CMS](https://intlayer.org/doc/concept/cms) |
63
- | <img src="https://github.com/aymericzip/intlayer/blob/main/docs/assets/bundle.png?raw=true" alt="Feature" width="700"> | **Tree-shakable Content**<br><br>Tree-shakable content, reducing the size of the final bundle. Loads content per component, excluding any unused content from your bundle. Supports lazy loading to enhance app loading efficiency. <br><br> - [App build optimization](https://intlayer.org/doc/concept/how-works-intlayer#app-build-optimization) |
64
- | <img src="https://github.com/aymericzip/intlayer/blob/main/docs/assets/static_rendering.png?raw=true" alt="Feature" width="700"> | **Static Rendering**<br><br>Doesn't block Static Rendering. <br><br> - [Next.js integration](https://intlayer.org/doc/environment/nextjs) |
65
- | <img src="https://github.com/aymericzip/intlayer/blob/main/docs/assets/AI_translation.png?raw=true" alt="Feature" width="700"> | **AI-Powered Translation**<br><br>Transform your website into 231 languages with just one click using Intlayer's advanced AI-powered translation tools using your own AI provider / API key. <br><br> - [CI/CD integration](https://intlayer.org/doc/concept/ci-cd) <br> - [Intlayer CLI](https://intlayer.org/doc/concept/cli) <br> - [Auto fill](https://intlayer.org/doc/concept/auto-fill) |
66
- | <img src="https://github.com/aymericzip/intlayer/blob/main/docs/assets/mcp.png?raw=true" alt="Feature" width="700"> | **MCP Server Integration**<br><br>Provides an MCP (Model Context Protocol) server for IDE automation, enabling seamless content management and i18n workflows directly within your development environment. <br><br> - [MCP Server](https://github.com/aymericzip/intlayer/blob/main/docs/docs/en/mcp_server.md) |
67
- | <img src="https://github.com/aymericzip/intlayer/blob/main/docs/assets/vscode_extension.png?raw=true" alt="Feature" width="700"> | **VSCode Extension**<br><br>Intlayer provides a VSCode extension to help you manage your content and translations, building your dictionaries, translating your content, and more. <br><br> - [VSCode Extension](https://intlayer.org/doc/vs-code-extension) |
68
- | <img src="https://github.com/aymericzip/intlayer/blob/main/docs/assets/interoperability.png?raw=true" alt="Feature" width="700"> | **Interoperability**<br><br>Allow interoperability with react-i18next, next-i18next, next-intl, react-intl, vue-i18n. <br><br> - [Intlayer and react-intl](https://intlayer.org/blog/intlayer-with-react-intl) <br> - [Intlayer and next-intl](https://intlayer.org/blog/intlayer-with-next-intl) <br> - [Intlayer and next-i18next](https://intlayer.org/blog/intlayer-with-next-i18next) <br> - [Intlayer and vue-i18n](https://intlayer.org/blog/intlayer-with-vue-i18n) |
69
- | <img src="https://github.com/aymericzip/intlayer/blob/main/docs/assets/benchmark.png?raw=true" alt="Feature" width="700"> | **Performances & Benchmark**<br><br>Uses advanced tree-shaking and dynamic loading to boost performances and keep the solution as light as possible. <br><br> - [Performances & Benchmark](https://intlayer.org/doc/benchmark) |
49
+ | Feature | Description |
50
+ | --------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
51
+ | <img src="https://github.com/aymericzip/intlayer/blob/main/docs/assets/frameworks.png?raw=true" alt="Feature" width="700"> | **Cross-Frameworks Support**<br><br>Intlayer is compatible with all major frameworks and libraries, including Next.js, React, Vite, Vue.js, Nuxt, Preact, Express, and more. |
52
+ | <img src="https://github.com/aymericzip/intlayer/blob/main/docs/assets/javascript_content_management.jpg?raw=true" alt="Feature" width="700"> | **JavaScript-Powered Content Management**<br><br>Harness the flexibility of JavaScript to define and manage your content efficiently. <br><br> - [Content declaration](https://intlayer.org/doc/concept/content) |
53
+ | <img src="https://github.com/aymericzip/intlayer/blob/main/docs/assets/per_locale_content_declaration_file.png?raw=true" alt="Feature" width="700"> | **Per-Locale Content Declaration File**<br><br>Speed up your development by declaring your content once, before auto generation.<br><br> - [Per-Locale Content Declaration File](https://intlayer.org/doc/concept/per-locale-file) |
54
+ | <img src="https://github.com/aymericzip/intlayer/blob/main/docs/assets/compiler.jpg?raw=true" alt="Feature" width="700"> | **Compiler**<br><br>The Intlayer Compiler extract automatically the content from the components and generate the dictionary files.<br><br> - [Compiler](https://intlayer.org/doc/compiler) |
55
+ | <img src="https://github.com/aymericzip/intlayer/blob/main/docs/assets/autocompletion.png?raw=true" alt="Feature" width="700"> | **Type-Safe Environment**<br><br>Leverage TypeScript to ensure your content definitions and code are error-free, while also benefiting from IDE autocompletion.<br><br> - [TypeScript configuration](https://intlayer.org/doc/environment/vite-and-react#configure-typescript) |
56
+ | <img src="https://github.com/aymericzip/intlayer/blob/main/docs/assets/config_file.png?raw=true" alt="Feature" width="700"> | **Simplified Setup**<br><br>Get up and running quickly with minimal configuration. Adjust settings for internationalization, routing, AI, build, and content handling with ease. <br><br> - [Explore Next.js integration](https://intlayer.org/doc/environment/nextjs) |
57
+ | <img src="https://github.com/aymericzip/intlayer/blob/main/docs/assets/content_retrieval.png?raw=true" alt="Feature" width="700"> | **Simplified Content Retrieval**<br><br>No need to call your `t` function for each piece of content. Retrieve all your content directly using a single hook.<br><br> - [React integration](https://intlayer.org/doc/environment/create-react-app) |
58
+ | <img src="https://github.com/aymericzip/intlayer/blob/main/docs/assets/server_component.png?raw=true" alt="Feature" width="700"> | **Consistent Server Component Implementation**<br><br>Perfectly suited for Next.js server components, use the same implementation for both client and server components, no need to pass your `t` function across each server component. <br><br> - [Server Components](https://intlayer.org/doc/environment/nextjs#step-7-utilize-content-in-your-code) |
59
+ | <img src="https://github.com/aymericzip/intlayer/blob/main/docs/assets/file_tree.png?raw=true" alt="Feature" width="700"> | **Organized Codebase**<br><br>Keep your codebase more organized: 1 component = 1 dictionary in the same folder. Translations close to their respective components, enhance maintainability and clarity. <br><br> - [How Intlayer works](https://intlayer.org/doc/concept/how-works-intlayer) |
60
+ | <img src="https://github.com/aymericzip/intlayer/blob/main/docs/assets/url_routing.png?raw=true" alt="Feature" width="700"> | **Enhanced Routing**<br><br>Full support of app routing, adapting seamlessly to complex application structures, for Next.js, React, Vite, Vue.js, etc.<br><br> - [Explore Next.js integration](https://intlayer.org/doc/environment/nextjs) |
61
+ | <img src="https://github.com/aymericzip/intlayer/blob/main/docs/assets/markdown.png?raw=true" alt="Feature" width="700"> | **Markdown Support**<br><br>Import and interpret, locale files and remote Markdown for multilingual content like privacy policies, documentation, etc. Interpret and make Markdown metadata accessible in your code.<br><br> - [Content files](https://intlayer.org/doc/concept/content/file) |
62
+ | <img src="https://github.com/aymericzip/intlayer/blob/main/docs/assets/visual_editor.png?raw=true" alt="Feature" width="700"> | **Free Visual Editor & CMS**<br><br>A free visual editor and CMS are available for content writers, removing the need for a localization platform. Keep your content synchronized using Git, or externalize it totally or partially with the CMS.<br><br> - [Intlayer Editor](https://intlayer.org/doc/concept/editor) <br> - [Intlayer CMS](https://intlayer.org/doc/concept/cms) |
63
+ | <img src="https://github.com/aymericzip/intlayer/blob/main/docs/assets/bundle.png?raw=true" alt="Feature" width="700"> | **Tree-shakable Content**<br><br>Tree-shakable content, reducing the size of the final bundle. Loads content per component, excluding any unused content from your bundle. Supports lazy loading to enhance app loading efficiency. <br><br> - [App build optimization](https://intlayer.org/doc/concept/how-works-intlayer#app-build-optimization) |
64
+ | <img src="https://github.com/aymericzip/intlayer/blob/main/docs/assets/static_rendering.png?raw=true" alt="Feature" width="700"> | **Static Rendering**<br><br>Doesn't block Static Rendering. <br><br> - [Next.js integration](https://intlayer.org/doc/environment/nextjs) |
65
+ | <img src="https://github.com/aymericzip/intlayer/blob/main/docs/assets/AI_translation.png?raw=true" alt="Feature" width="700"> | **AI-Powered Translation**<br><br>Transform your website into 231 languages with just one click using Intlayer's advanced AI-powered translation tools using your own AI provider / API key. <br><br> - [CI/CD integration](https://intlayer.org/doc/concept/ci-cd) <br> - [Intlayer CLI](https://intlayer.org/doc/concept/cli) <br> - [Auto fill](https://intlayer.org/doc/concept/auto-fill) |
66
+ | <img src="https://github.com/aymericzip/intlayer/blob/main/docs/assets/mcp.png?raw=true" alt="Feature" width="700"> | **MCP Server Integration**<br><br>Provides an MCP (Model Context Protocol) server for IDE automation, enabling seamless content management and i18n workflows directly within your development environment. <br><br> - [MCP Server](https://github.com/aymericzip/intlayer/blob/main/docs/docs/en/mcp_server.md) |
67
+ | <img src="https://github.com/aymericzip/intlayer/blob/main/docs/assets/vscode_extension.png?raw=true" alt="Feature" width="700"> | **VSCode Extension**<br><br>Intlayer provides a VSCode extension to help you manage your content and translations, building your dictionaries, translating your content, and more. <br><br> - [VSCode Extension](https://intlayer.org/doc/vs-code-extension) |
68
+ | <img src="https://github.com/aymericzip/intlayer/blob/main/docs/assets/interoperability.png?raw=true" alt="Feature" width="700"> | **Interoperability**<br><br>Allow interoperability with react-i18next, next-i18next, next-intl, react-intl, vue-i18n. <br><br> - [Intlayer and react-intl](https://intlayer.org/blog/intlayer-with-react-intl) <br> - [Intlayer and next-intl](https://intlayer.org/blog/intlayer-with-next-intl) <br> - [Intlayer and next-i18next](https://intlayer.org/blog/intlayer-with-next-i18next) <br> - [Intlayer and vue-i18n](https://intlayer.org/blog/intlayer-with-vue-i18n) <br> - [Intlayer compat adapters](https://intlayer.org/doc/compatibility) |
69
+ | <img src="https://github.com/aymericzip/intlayer/blob/main/docs/assets/benchmark.png?raw=true" alt="Feature" width="700"> | **Performances & Benchmark**<br><br>Uses advanced tree-shaking and dynamic loading to boost performances and keep the solution as light as possible. <br><br> - [Performances & Benchmark](https://intlayer.org/doc/benchmark) |
70
70
 
71
71
  ---
72
72
 
@@ -173,7 +173,7 @@ Explore our comprehensive documentation to get started with Intlayer and learn h
173
173
  <li><a href="https://intlayer.org/doc/concept/cms" rel=''>Intlayer CMS</a></li>
174
174
  <li><a href="https://intlayer.org/doc/concept/content" rel=''>Dictionary</a>
175
175
  <ul>
176
- <li><a href="https://intlayer.org/doc/concept/content/per-locale-file" rel=''>Per-Locale Content Declaration File</a></li>
176
+ <li><a href="https://intlayer.org/doc/concept/per-locale-file" rel=''>Per-Locale Content Declaration File</a></li>
177
177
  <li><a href="https://intlayer.org/doc/concept/content/translation" rel=''>Translation</a></li>
178
178
  <li><a href="https://intlayer.org/doc/concept/content/enumeration" rel=''>Enumeration</a></li>
179
179
  <li><a href="https://intlayer.org/doc/concept/content/condition" rel=''>Condition</a></li>
@@ -194,7 +194,7 @@ Explore our comprehensive documentation to get started with Intlayer and learn h
194
194
  <ul>
195
195
  <li><a href="https://intlayer.org/doc/environment/nextjs/15" rel=''>Next.js 15</a></li>
196
196
  <li><a href="https://intlayer.org/doc/environment/nextjs/14" rel=''>Next.js 14 (App Router)</a></li>
197
- <li><a href="https://intlayer.org/doc/environment/nextjs/next-with-Page-Router" rel=''>Next.js Page Router</a></li>
197
+ <li><a href="https://intlayer.org/doc/environment/nextjs/next-with-page-router" rel=''>Next.js Page Router</a></li>
198
198
  <li><a href="https://intlayer.org/doc/environment/nextjs/compiler" rel=''>Next.js using Compiler</a></li>
199
199
  </ul>
200
200
  </li>
@@ -223,7 +223,7 @@ Explore our comprehensive documentation to get started with Intlayer and learn h
223
223
  <li><a href="https://intlayer.org/doc/environment/sveltekit" rel=''>SvelteKit</a></li>
224
224
  <li><a href="https://intlayer.org/doc/environment/vite-and-preact" rel=''>Vite + Preact</a></li>
225
225
  <li><a href="https://intlayer.org/doc/environment/vite-and-vue" rel=''>Vite + Vue</a></li>
226
- <li><a href="https://intlayer.org/doc/environment/vite-and-nuxt" rel=''>Vite + Nuxt</a></li>
226
+ <li><a href="https://intlayer.org/doc/environment/nuxt-and-vue" rel=''>Vite + Nuxt</a></li>
227
227
  <li><a href="https://intlayer.org/doc/environment/vite-and-solid" rel=''>Vite + Solid</a></li>
228
228
  <li><a href="https://intlayer.org/doc/environment/vite-and-lit" rel=''>Vite + Lit</a></li>
229
229
  <li><a href="https://intlayer.org/doc/environment/angular" rel=''>Angular</a></li>
@@ -404,7 +404,7 @@ const config: IntlayerConfig = {
404
404
  ai: {
405
405
  /**
406
406
  * AI provider to use.
407
- * Options: 'openai', 'anthropic', 'mistral', 'deepseek', 'gemini', 'ollama', 'openrouter', 'alibaba', 'fireworks', 'groq', 'huggingface', 'bedrock', 'googlevertex', 'togetherai', 'lmstudio'
407
+ * Options: 'openai', 'anthropic', 'mistral', 'deepseek', 'gemini', 'ollama', 'openrouter', 'alibaba', 'fireworks', 'groq', 'huggingface', 'bedrock', 'googlevertex', 'togetherai', 'lmstudio', 'moonshotai'
408
408
  * Default: 'openai'
409
409
  */
410
410
  provider: "openai",
@@ -1040,15 +1040,15 @@ Intlayer supports multiple AI providers for enhanced flexibility and choice. Cur
1040
1040
  - **LM Studio**
1041
1041
  - **ollama**
1042
1042
 
1043
- | Field | Description | Type | Default | Example | Note |
1044
- | -------------------- | ----------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ----------- | ------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
1045
- | `provider` | The provider to use for the AI features of Intlayer. | `'openai'` &#124; <br/> `'anthropic'` &#124; <br/> `'mistral'` &#124; <br/> `'deepseek'` &#124; <br/> `'gemini'` &#124; <br/> `'ollama'` &#124; <br/> `'openrouter'` &#124; <br/> `'alibaba'` &#124; <br/> `'fireworks'` &#124; <br/> `'groq'` &#124; <br/> `'huggingface'` &#124; <br/> `'bedrock'` &#124; <br/> `'googleaistudio'` &#124; <br/> `'googlevertex'` &#124; <br/> `'togetherai'` &#124; <br/> `'lmstudio'` | `undefined` | `'anthropic'` | Different providers require different API keys and have different pricing. |
1046
- | `model` | The model to use for AI features. | `string` | None | `'gpt-4o-2024-11-20'` | Specific model varies by provider. |
1047
- | `temperature` | Controls the randomness of AI responses. | `number` | None | `0.1` | Higher temperature = more creative and less predictable. |
1048
- | `apiKey` | Your API key for the selected provider. | `string` | None | `process.env.OPENAI_API_KEY` | Keep secret; store in environment variables. |
1049
- | `applicationContext` | Additional context about your application to help the AI generate more accurate translations (domain, audience, tone, terminology). | `string` | None | `'My application context'` | Can be used to add rules (e.g. `"You should not transform urls"`). |
1050
- | `baseURL` | The base URL for the AI API. | `string` | None | `'https://api.openai.com/v1'` <br/> `'http://localhost:5000'` | Can point to a local or custom AI API endpoint. |
1051
- | `dataSerialization` | Data serialization format for AI features. | `'json'` &#124; <br/> `'toon'` | `undefined` | `'toon'` | • `'json'`: standard, reliable; uses more tokens.<br/>• `'toon'`: fewer tokens, less consistent.<br/>• Additional parameters are passed to the AI model as context (reasoning effort, verbosity, etc.). |
1043
+ | Field | Description | Type | Default | Example | Note |
1044
+ | -------------------- | ----------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------- | ------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
1045
+ | `provider` | The provider to use for the AI features of Intlayer. | `'openai'` &#124; <br/> `'anthropic'` &#124; <br/> `'mistral'` &#124; <br/> `'deepseek'` &#124; <br/> `'gemini'` &#124; <br/> `'ollama'` &#124; <br/> `'openrouter'` &#124; <br/> `'alibaba'` &#124; <br/> `'fireworks'` &#124; <br/> `'groq'` &#124; <br/> `'huggingface'` &#124; <br/> `'bedrock'` &#124; <br/> `'googleaistudio'` &#124; <br/> `'googlevertex'` &#124; <br/> `'togetherai'` &#124; <br/> `'lmstudio'` &#124; <br/> `'moonshotai'` | `undefined` | `'anthropic'` | Different providers require different API keys and have different pricing. |
1046
+ | `model` | The model to use for AI features. | `string` | None | `'gpt-4o-2024-11-20'` | Specific model varies by provider. |
1047
+ | `temperature` | Controls the randomness of AI responses. | `number` | None | `0.1` | Higher temperature = more creative and less predictable. |
1048
+ | `apiKey` | Your API key for the selected provider. | `string` | None | `process.env.OPENAI_API_KEY` | Keep secret; store in environment variables. |
1049
+ | `applicationContext` | Additional context about your application to help the AI generate more accurate translations (domain, audience, tone, terminology). | `string` | None | `'My application context'` | Can be used to add rules (e.g. `"You should not transform urls"`). |
1050
+ | `baseURL` | The base URL for the AI API. | `string` | None | `'https://api.openai.com/v1'` <br/> `'http://localhost:5000'` | Can point to a local or custom AI API endpoint. |
1051
+ | `dataSerialization` | Data serialization format for AI features. | `'json'` &#124; <br/> `'toon'` | `undefined` | `'toon'` | • `'json'`: standard, reliable; uses more tokens.<br/>• `'toon'`: fewer tokens, less consistent.<br/>• Additional parameters are passed to the AI model as context (reasoning effort, verbosity, etc.). |
1052
1052
 
1053
1053
  ### Build Configuration
1054
1054