@intlayer/docs 7.5.9 → 7.5.11

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 (196) hide show
  1. package/README.md +9 -2
  2. package/dist/cjs/generated/docs.entry.cjs +57 -0
  3. package/dist/cjs/generated/docs.entry.cjs.map +1 -1
  4. package/dist/esm/generated/docs.entry.mjs +57 -0
  5. package/dist/esm/generated/docs.entry.mjs.map +1 -1
  6. package/dist/types/generated/docs.entry.d.ts +3 -0
  7. package/dist/types/generated/docs.entry.d.ts.map +1 -1
  8. package/docs/ar/cli/ci.md +137 -0
  9. package/docs/ar/cli/index.md +7 -1
  10. package/docs/ar/cli/list.md +39 -2
  11. package/docs/ar/cli/list_projects.md +131 -0
  12. package/docs/ar/cli/push.md +1 -1
  13. package/docs/ar/configuration.md +3 -3
  14. package/docs/ar/interest_of_intlayer.md +1 -1
  15. package/docs/ar/intlayer_CMS.md +25 -5
  16. package/docs/ar/intlayer_with_express.md +1 -0
  17. package/docs/ar/intlayer_with_fastify.md +516 -0
  18. package/docs/ar/readme.md +1 -1
  19. package/docs/de/cli/ci.md +137 -0
  20. package/docs/de/cli/index.md +7 -1
  21. package/docs/de/cli/list.md +39 -2
  22. package/docs/de/cli/list_projects.md +130 -0
  23. package/docs/de/cli/push.md +1 -1
  24. package/docs/de/configuration.md +3 -3
  25. package/docs/de/interest_of_intlayer.md +1 -1
  26. package/docs/de/intlayer_CMS.md +25 -5
  27. package/docs/de/intlayer_with_express.md +1 -0
  28. package/docs/de/intlayer_with_fastify.md +449 -0
  29. package/docs/de/readme.md +1 -1
  30. package/docs/en/cli/ci.md +137 -0
  31. package/docs/en/cli/index.md +14 -1
  32. package/docs/en/cli/list.md +39 -2
  33. package/docs/en/cli/list_projects.md +128 -0
  34. package/docs/en/cli/push.md +1 -1
  35. package/docs/en/configuration.md +3 -3
  36. package/docs/en/interest_of_intlayer.md +2 -2
  37. package/docs/en/intlayer_CMS.md +25 -5
  38. package/docs/en/intlayer_with_express.md +1 -0
  39. package/docs/en/intlayer_with_fastify.md +439 -0
  40. package/docs/en/readme.md +3 -1
  41. package/docs/en-GB/cli/ci.md +137 -0
  42. package/docs/en-GB/cli/index.md +7 -1
  43. package/docs/en-GB/cli/list.md +39 -2
  44. package/docs/en-GB/cli/list_projects.md +130 -0
  45. package/docs/en-GB/cli/push.md +1 -1
  46. package/docs/en-GB/configuration.md +3 -3
  47. package/docs/en-GB/interest_of_intlayer.md +1 -1
  48. package/docs/en-GB/intlayer_CMS.md +25 -5
  49. package/docs/en-GB/intlayer_with_express.md +1 -0
  50. package/docs/en-GB/intlayer_with_fastify.md +445 -0
  51. package/docs/en-GB/readme.md +3 -1
  52. package/docs/es/cli/ci.md +137 -0
  53. package/docs/es/cli/index.md +7 -1
  54. package/docs/es/cli/list.md +39 -2
  55. package/docs/es/cli/list_projects.md +130 -0
  56. package/docs/es/cli/push.md +1 -1
  57. package/docs/es/configuration.md +3 -3
  58. package/docs/es/interest_of_intlayer.md +1 -1
  59. package/docs/es/intlayer_CMS.md +25 -5
  60. package/docs/es/intlayer_with_express.md +1 -0
  61. package/docs/es/intlayer_with_fastify.md +480 -0
  62. package/docs/es/readme.md +1 -1
  63. package/docs/fr/cli/ci.md +137 -0
  64. package/docs/fr/cli/index.md +7 -1
  65. package/docs/fr/cli/list.md +39 -2
  66. package/docs/fr/cli/list_projects.md +131 -0
  67. package/docs/fr/cli/push.md +1 -1
  68. package/docs/fr/configuration.md +3 -3
  69. package/docs/fr/interest_of_intlayer.md +1 -1
  70. package/docs/fr/intlayer_CMS.md +25 -5
  71. package/docs/fr/intlayer_with_express.md +1 -0
  72. package/docs/fr/intlayer_with_fastify.md +439 -0
  73. package/docs/fr/readme.md +1 -1
  74. package/docs/hi/cli/ci.md +137 -0
  75. package/docs/hi/cli/index.md +7 -1
  76. package/docs/hi/cli/list.md +38 -1
  77. package/docs/hi/cli/list_projects.md +130 -0
  78. package/docs/hi/cli/push.md +1 -1
  79. package/docs/hi/configuration.md +3 -3
  80. package/docs/hi/interest_of_intlayer.md +1 -1
  81. package/docs/hi/intlayer_CMS.md +25 -5
  82. package/docs/hi/intlayer_with_express.md +1 -0
  83. package/docs/hi/intlayer_with_fastify.md +540 -0
  84. package/docs/hi/readme.md +1 -1
  85. package/docs/id/cli/ci.md +137 -0
  86. package/docs/id/cli/index.md +7 -1
  87. package/docs/id/cli/list.md +38 -1
  88. package/docs/id/cli/list_projects.md +128 -0
  89. package/docs/id/cli/push.md +1 -1
  90. package/docs/id/configuration.md +3 -3
  91. package/docs/id/interest_of_intlayer.md +1 -1
  92. package/docs/id/intlayer_CMS.md +25 -5
  93. package/docs/id/intlayer_with_express.md +1 -0
  94. package/docs/id/intlayer_with_fastify.md +470 -0
  95. package/docs/id/readme.md +1 -1
  96. package/docs/it/cli/ci.md +137 -0
  97. package/docs/it/cli/index.md +7 -1
  98. package/docs/it/cli/list.md +39 -2
  99. package/docs/it/cli/list_projects.md +130 -0
  100. package/docs/it/cli/push.md +1 -1
  101. package/docs/it/configuration.md +3 -3
  102. package/docs/it/interest_of_intlayer.md +1 -1
  103. package/docs/it/intlayer_CMS.md +25 -5
  104. package/docs/it/intlayer_with_express.md +1 -0
  105. package/docs/it/intlayer_with_fastify.md +445 -0
  106. package/docs/it/readme.md +1 -1
  107. package/docs/ja/cli/ci.md +137 -0
  108. package/docs/ja/cli/index.md +7 -1
  109. package/docs/ja/cli/list.md +38 -1
  110. package/docs/ja/cli/list_projects.md +136 -0
  111. package/docs/ja/cli/push.md +1 -1
  112. package/docs/ja/configuration.md +3 -3
  113. package/docs/ja/interest_of_intlayer.md +1 -1
  114. package/docs/ja/intlayer_CMS.md +25 -5
  115. package/docs/ja/intlayer_with_express.md +1 -0
  116. package/docs/ja/intlayer_with_fastify.md +516 -0
  117. package/docs/ja/readme.md +1 -1
  118. package/docs/ko/cli/ci.md +137 -0
  119. package/docs/ko/cli/index.md +7 -1
  120. package/docs/ko/cli/list.md +38 -1
  121. package/docs/ko/cli/list_projects.md +128 -0
  122. package/docs/ko/cli/push.md +1 -1
  123. package/docs/ko/configuration.md +3 -3
  124. package/docs/ko/interest_of_intlayer.md +1 -1
  125. package/docs/ko/intlayer_CMS.md +25 -5
  126. package/docs/ko/intlayer_with_express.md +1 -0
  127. package/docs/ko/intlayer_with_fastify.md +463 -0
  128. package/docs/ko/readme.md +1 -1
  129. package/docs/pl/cli/ci.md +137 -0
  130. package/docs/pl/cli/index.md +7 -1
  131. package/docs/pl/cli/list.md +39 -2
  132. package/docs/pl/cli/list_projects.md +130 -0
  133. package/docs/pl/cli/push.md +1 -1
  134. package/docs/pl/configuration.md +3 -3
  135. package/docs/pl/interest_of_intlayer.md +1 -1
  136. package/docs/pl/intlayer_CMS.md +25 -5
  137. package/docs/pl/intlayer_with_express.md +1 -0
  138. package/docs/pl/intlayer_with_fastify.md +457 -0
  139. package/docs/pl/readme.md +1 -1
  140. package/docs/pt/cli/ci.md +137 -0
  141. package/docs/pt/cli/index.md +7 -1
  142. package/docs/pt/cli/list.md +39 -2
  143. package/docs/pt/cli/list_projects.md +134 -0
  144. package/docs/pt/cli/push.md +1 -1
  145. package/docs/pt/configuration.md +3 -3
  146. package/docs/pt/interest_of_intlayer.md +1 -1
  147. package/docs/pt/intlayer_CMS.md +25 -5
  148. package/docs/pt/intlayer_with_express.md +1 -0
  149. package/docs/pt/intlayer_with_fastify.md +502 -0
  150. package/docs/pt/readme.md +1 -1
  151. package/docs/ru/cli/ci.md +137 -0
  152. package/docs/ru/cli/index.md +7 -1
  153. package/docs/ru/cli/list.md +39 -2
  154. package/docs/ru/cli/list_projects.md +130 -0
  155. package/docs/ru/cli/push.md +1 -1
  156. package/docs/ru/configuration.md +3 -3
  157. package/docs/ru/interest_of_intlayer.md +1 -1
  158. package/docs/ru/intlayer_CMS.md +25 -5
  159. package/docs/ru/intlayer_with_express.md +1 -0
  160. package/docs/ru/intlayer_with_fastify.md +468 -0
  161. package/docs/ru/readme.md +1 -1
  162. package/docs/tr/cli/ci.md +137 -0
  163. package/docs/tr/cli/index.md +7 -1
  164. package/docs/tr/cli/list.md +39 -2
  165. package/docs/tr/cli/list_projects.md +134 -0
  166. package/docs/tr/cli/push.md +1 -1
  167. package/docs/tr/configuration.md +3 -3
  168. package/docs/tr/interest_of_intlayer.md +1 -1
  169. package/docs/tr/intlayer_CMS.md +25 -5
  170. package/docs/tr/intlayer_with_express.md +1 -0
  171. package/docs/tr/intlayer_with_fastify.md +471 -0
  172. package/docs/tr/readme.md +1 -1
  173. package/docs/vi/cli/ci.md +137 -0
  174. package/docs/vi/cli/index.md +7 -1
  175. package/docs/vi/cli/list.md +38 -1
  176. package/docs/vi/cli/list_projects.md +130 -0
  177. package/docs/vi/cli/push.md +1 -1
  178. package/docs/vi/configuration.md +3 -3
  179. package/docs/vi/interest_of_intlayer.md +1 -1
  180. package/docs/vi/intlayer_CMS.md +25 -5
  181. package/docs/vi/intlayer_with_express.md +1 -0
  182. package/docs/vi/intlayer_with_fastify.md +490 -0
  183. package/docs/vi/readme.md +1 -1
  184. package/docs/zh/cli/ci.md +137 -0
  185. package/docs/zh/cli/index.md +7 -1
  186. package/docs/zh/cli/list.md +38 -1
  187. package/docs/zh/cli/list_projects.md +130 -0
  188. package/docs/zh/cli/push.md +1 -1
  189. package/docs/zh/configuration.md +3 -3
  190. package/docs/zh/interest_of_intlayer.md +1 -1
  191. package/docs/zh/intlayer_CMS.md +25 -5
  192. package/docs/zh/intlayer_with_express.md +1 -0
  193. package/docs/zh/intlayer_with_fastify.md +451 -0
  194. package/docs/zh/readme.md +1 -1
  195. package/package.json +6 -6
  196. package/src/generated/docs.entry.ts +57 -0
@@ -0,0 +1,449 @@
1
+ ---
2
+ createdAt: 2025-12-30
3
+ updatedAt: 2025-12-30
4
+ title: So übersetzen Sie Ihr Fastify-Backend – i18n-Leitfaden 2026
5
+ description: Erfahren Sie, wie Sie Ihr Fastify-Backend mehrsprachig machen. Folgen Sie der Dokumentation, um es zu internationalisieren (i18n) und zu übersetzen.
6
+ keywords:
7
+ - Internationalisierung
8
+ - Dokumentation
9
+ - Intlayer
10
+ - Fastify
11
+ - JavaScript
12
+ - Backend
13
+ slugs:
14
+ - doc
15
+ - environment
16
+ - fastify
17
+ applicationTemplate: https://github.com/aymericzip/intlayer-fastify-template
18
+ history:
19
+ - version: 7.6.0
20
+ date: 2025-12-31
21
+ changes: Init-Befehl hinzugefügt
22
+ - version: 7.6.0
23
+ date: 2025-12-31
24
+ changes: History initialisiert
25
+ ---
26
+
27
+ # Übersetzen Sie Ihre Fastify-Backend-Website mit Intlayer | Internationalisierung (i18n)
28
+
29
+ `fastify-intlayer` ist ein leistungsfähiges Internationalisierungs-Plugin (i18n) für Fastify-Anwendungen, das entwickelt wurde, um Ihre Backend-Services global zugänglich zu machen, indem es lokalisierte Antworten basierend auf den Präferenzen des Clients bereitstellt.
30
+
31
+ ### Praktische Anwendungsfälle
32
+
33
+ - **Anzeige von Backend-Fehlern in der Sprache des Nutzers**: Wenn ein Fehler auftritt, verbessert die Anzeige von Meldungen in der Muttersprache des Nutzers das Verständnis und reduziert Frustration. Dies ist besonders nützlich für dynamische Fehlermeldungen, die in Frontend-Komponenten wie Toasts oder Modals angezeigt werden können.
34
+ - **Abrufen mehrsprachiger Inhalte**: Für Anwendungen, die Inhalte aus einer Datenbank abrufen, stellt Internationalisierung sicher, dass Sie diese Inhalte in mehreren Sprachen bereitstellen können. Dies ist entscheidend für Plattformen wie E‑Commerce-Websites oder Content-Management-Systeme, die Produktbeschreibungen, Artikel und andere Inhalte in der vom Nutzer bevorzugten Sprache anzeigen müssen.
35
+ - **Versenden mehrsprachiger E-Mails**: Ob Transaktions-E-Mails, Marketingkampagnen oder Benachrichtigungen – das Versenden von E-Mails in der Sprache des Empfängers kann das Engagement und die Effektivität deutlich steigern.
36
+ - **Mehrsprachige Push-Benachrichtigungen**: Für mobile Anwendungen können Push-Benachrichtigungen in der bevorzugten Sprache des Nutzers die Interaktion und Bindung verbessern. Diese persönliche Note kann Benachrichtigungen relevanter erscheinen lassen und eher zu konkreten Aktionen anregen.
37
+ - **Andere Kommunikation**: Jede Form der Kommunikation vom Backend, wie SMS-Nachrichten, Systemwarnungen oder Benutzeroberflächen-Aktualisierungen, profitiert davon, in der Sprache des Nutzers verfügbar zu sein. Dies sorgt für Klarheit und verbessert das gesamte Benutzererlebnis.
38
+
39
+ Durch die Internationalisierung des Backends respektiert Ihre Anwendung nicht nur kulturelle Unterschiede, sondern passt sich auch besser den Anforderungen des globalen Marktes an und wird so zu einem wichtigen Schritt beim weltweiten Skalieren Ihrer Dienste.
40
+
41
+ ## Erste Schritte
42
+
43
+ ### Installation
44
+
45
+ Um `fastify-intlayer` zu verwenden, installieren Sie das Paket mit npm:
46
+
47
+ ```bash packageManager="npm"
48
+ npm install intlayer fastify-intlayer
49
+ npx intlayer init
50
+
51
+ ```
52
+
53
+ ```bash packageManager="pnpm"
54
+ pnpm add intlayer fastify-intlayer
55
+ pnpm intlayer init
56
+
57
+ ```
58
+
59
+ ```bash packageManager="yarn"
60
+ yarn add intlayer fastify-intlayer
61
+ yarn intlayer init
62
+
63
+ ```
64
+
65
+ ```bash packageManager="bun"
66
+ bun add intlayer fastify-intlayer
67
+ bunx intlayer init
68
+
69
+ ```
70
+
71
+ ### Einrichtung
72
+
73
+ Konfigurieren Sie die Internationalisierungseinstellungen, indem Sie eine `intlayer.config.ts` im Stammverzeichnis Ihres Projekts erstellen:
74
+
75
+ ```typescript fileName="intlayer.config.ts" codeFormat="typescript"
76
+ import { Locales, type IntlayerConfig } from "intlayer";
77
+
78
+ const config: IntlayerConfig = {
79
+ internationalization: {
80
+ locales: [
81
+ Locales.ENGLISH,
82
+ Locales.FRENCH,
83
+ Locales.SPANISH_MEXICO,
84
+ Locales.SPANISH_SPAIN,
85
+ ],
86
+ defaultLocale: Locales.ENGLISH,
87
+ },
88
+ };
89
+
90
+ export default config;
91
+ ```
92
+
93
+ ```javascript fileName="intlayer.config.mjs" codeFormat="esm"
94
+ import { Locales } from "intlayer";
95
+
96
+ /** @type {import('intlayer').IntlayerConfig} */
97
+ const config = {
98
+ internationalization: {
99
+ locales: [
100
+ Locales.ENGLISH,
101
+ Locales.FRENCH,
102
+ Locales.SPANISH_MEXICO,
103
+ Locales.SPANISH_SPAIN,
104
+ ],
105
+ defaultLocale: Locales.ENGLISH,
106
+ },
107
+ };
108
+
109
+ export default config;
110
+ ```
111
+
112
+ ```javascript fileName="intlayer.config.cjs" codeFormat="commonjs"
113
+ const { Locales } = require("intlayer");
114
+
115
+ /** @type {import('intlayer').IntlayerConfig} */
116
+ const config = {
117
+ internationalization: {
118
+ locales: [
119
+ Locales.ENGLISH,
120
+ Locales.FRENCH,
121
+ Locales.SPANISH_MEXICO,
122
+ Locales.SPANISH_SPAIN,
123
+ ],
124
+ defaultLocale: Locales.ENGLISH,
125
+ },
126
+ };
127
+
128
+ module.exports = config;
129
+ ```
130
+
131
+ ### Deklarieren Sie Ihre Inhalte
132
+
133
+ Erstellen und verwalten Sie Ihre Content-Deklarationen, um Übersetzungen zu speichern:
134
+
135
+ ```typescript fileName="src/index.content.ts" contentDeclarationFormat="typescript"
136
+ import { t, type Dictionary } from "intlayer";
137
+
138
+ const indexContent = {
139
+ key: "index",
140
+ content: {
141
+ exampleOfContent: t({
142
+ de: "Beispiel eines zurückgegebenen Inhalts auf Englisch",
143
+ en: "Example of returned content in English",
144
+ fr: "Exemple de contenu renvoyé en français",
145
+ "es-ES": "Ejemplo de contenido devuelto en español (España)",
146
+ "es-MX": "Ejemplo de contenido devuelto en español (México)",
147
+ }),
148
+ },
149
+ } satisfies Dictionary;
150
+
151
+ export default indexContent;
152
+ ```
153
+
154
+ ```javascript fileName="src/index.content.mjs" contentDeclarationFormat="esm"
155
+ import { t } from "intlayer";
156
+
157
+ /** @type {import('intlayer').Dictionary} */
158
+ const indexContent = {
159
+ key: "index",
160
+ content: {
161
+ exampleOfContent: t({
162
+ de: "Beispiel für zurückgegebenen Inhalt auf Englisch",
163
+ en: "Example of returned content in English",
164
+ fr: "Exemple de contenu renvoyé en français",
165
+ "es-ES": "Ejemplo de contenido devuelto en español (España)",
166
+ "es-MX": "Ejemplo de contenido devuelto en español (México)",
167
+ }),
168
+ },
169
+ };
170
+
171
+ export default indexContent;
172
+ ```
173
+
174
+ ```javascript fileName="src/index.content.cjs" contentDeclarationFormat="commonjs"
175
+ const { t } = require("intlayer");
176
+
177
+ /** @type {import('intlayer').Dictionary} */
178
+ const indexContent = {
179
+ key: "index",
180
+ content: {
181
+ exampleOfContent: t({
182
+ de: "Beispiel für zurückgegebenen Inhalt auf Englisch",
183
+ en: "Example of returned content in English",
184
+ fr: "Exemple de contenu renvoyé en français",
185
+ "es-ES": "Ejemplo de contenido devuelto en español (España)",
186
+ "es-MX": "Ejemplo de contenido devuelto en español (México)",
187
+ }),
188
+ },
189
+ };
190
+
191
+ module.exports = indexContent;
192
+ ```
193
+
194
+ ```json fileName="src/index.content.json" contentDeclarationFormat="json"
195
+ {
196
+ "$schema": "https://intlayer.org/schema.json",
197
+ "key": "index",
198
+ "content": {
199
+ "exampleOfContent": {
200
+ "nodeType": "translation",
201
+ "translation": {
202
+ "de": "Beispiel für zurückgegebenen Inhalt auf Englisch",
203
+ "en": "Example of returned content in English",
204
+ "fr": "Exemple de contenu renvoyé en français",
205
+ "es-ES": "Ejemplo de contenido devuelto en español (España)",
206
+ "es-MX": "Ejemplo de contenido devuelto en español (México)"
207
+ }
208
+ }
209
+ }
210
+ }
211
+ ```
212
+
213
+ > Ihre Content-Deklarationen können überall in Ihrer Anwendung definiert werden, solange sie im Verzeichnis `contentDir` (standardmäßig `./src`) enthalten sind. Und die Dateiendung der Content-Deklaration muss übereinstimmen (standardmäßig `.content.{json,ts,tsx,js,jsx,mjs,mjx,cjs,cjx}`).
214
+
215
+ > Für weitere Details siehe die [Dokumentation zur Content-Deklaration](https://github.com/aymericzip/intlayer/blob/main/docs/docs/de/dictionary/content_file.md).
216
+
217
+ ### Fastify-Anwendung einrichten
218
+
219
+ Konfigurieren Sie Ihre Fastify-Anwendung, um `fastify-intlayer` zu verwenden:
220
+
221
+ ```typescript fileName="src/index.ts" codeFormat="typescript"
222
+ import Fastify from "fastify";
223
+ import { intlayer, t, getDictionary, getIntlayer } from "fastify-intlayer";
224
+ import dictionaryExample from "./index.content";
225
+
226
+ const fastify = Fastify({ logger: true });
227
+
228
+ typescript fileName="src/index.ts" codeFormat="typescript"
229
+ // Internationalisierungs-Plugin laden
230
+ await fastify.register(intlayer);
231
+
232
+ // Routen
233
+ fastify.get("/t_example", async (_req, reply) => {
234
+ return t({
235
+ de: "Beispiel für zurückgegebenen Inhalt auf Deutsch",
236
+ en: "Example of returned content in English",
237
+ fr: "Exemple de contenu renvoyé en français",
238
+ "es-ES": "Ejemplo de contenido devuelto en español (España)",
239
+ "es-MX": "Ejemplo de contenido devuelto en español (México)",
240
+ });
241
+ });
242
+
243
+ fastify.get("/getIntlayer_example", async (_req, reply) => {
244
+ return getIntlayer("index").exampleOfContent;
245
+ });
246
+
247
+ fastify.get("/getDictionary_example", async (_req, reply) => {
248
+ return getDictionary(dictionaryExample).exampleOfContent;
249
+ });
250
+
251
+ // Server starten
252
+ const start = async () => {
253
+ try {
254
+ await fastify.listen({ port: 3000 });
255
+ } catch (err) {
256
+ fastify.log.error(err);
257
+ process.exit(1);
258
+ }
259
+ };
260
+
261
+ start();
262
+ ```
263
+
264
+ ```javascript fileName="src/index.mjs" codeFormat="esm"
265
+ import Fastify from "fastify";
266
+ import { intlayer, t, getDictionary, getIntlayer } from "fastify-intlayer";
267
+ import dictionaryExample from "./index.content";
268
+
269
+ const fastify = Fastify({ logger: true });
270
+
271
+ // Internationalisierungs-Plugin laden
272
+ await fastify.register(intlayer);
273
+
274
+ // Routen
275
+ fastify.get("/t_example", async (_req, reply) => {
276
+ return t({
277
+ de: "Beispiel für zurückgegebenen Inhalt auf Deutsch",
278
+ en: "Example of returned content in English",
279
+ fr: "Exemple de contenu renvoyé en français",
280
+ "es-ES": "Ejemplo de contenido devuelto en español (España)",
281
+ "es-MX": "Ejemplo de contenido devuelto en español (México)",
282
+ });
283
+ });
284
+
285
+ fastify.get("/getIntlayer_example", async (_req, reply) => {
286
+ return getIntlayer("index").exampleOfContent;
287
+ });
288
+
289
+ fastify.get("/getDictionary_example", async (_req, reply) => {
290
+ return getDictionary(dictionaryExample).exampleOfContent;
291
+ });
292
+
293
+ // Server starten
294
+ const start = async () => {
295
+ try {
296
+ await fastify.listen({ port: 3000 });
297
+ } catch (err) {
298
+ fastify.log.error(err);
299
+ process.exit(1);
300
+ }
301
+ };
302
+
303
+ start();
304
+ ```
305
+
306
+ ```javascript fileName="src/index.cjs" codeFormat="commonjs"
307
+ const Fastify = require("fastify");
308
+ const { intlayer, t, getDictionary, getIntlayer } = require("fastify-intlayer");
309
+ const dictionaryExample = require("./index.content");
310
+
311
+ const fastify = Fastify({ logger: true });
312
+
313
+ // Wrapper zum Starten des Servers für async/await
314
+ const start = async () => {
315
+ try {
316
+ // Internationalisierungs-Plugin laden
317
+ await fastify.register(intlayer);
318
+
319
+ // Routen
320
+ fastify.get("/t_example", async (_req, reply) => {
321
+ return t({
322
+ de: "Beispiel für zurückgegebenen Inhalt auf Englisch",
323
+ en: "Example of returned content in English",
324
+ fr: "Exemple de contenu renvoyé en français",
325
+ "es-ES": "Ejemplo de contenido devuelto en español (España)",
326
+ "es-MX": "Ejemplo de contenido devuelto en español (México)",
327
+ });
328
+ });
329
+
330
+ fastify.get("/getIntlayer_example", async (_req, reply) => {
331
+ return getIntlayer("index").exampleOfContent;
332
+ });
333
+
334
+ fastify.get("/getDictionary_example", async (_req, reply) => {
335
+ return getDictionary(dictionaryExample).exampleOfContent;
336
+ });
337
+
338
+ await fastify.listen({ port: 3000 });
339
+ } catch (err) {
340
+ fastify.log.error(err);
341
+ process.exit(1);
342
+ }
343
+ };
344
+
345
+ start();
346
+ ```
347
+
348
+ ### Kompatibilität
349
+
350
+ `fastify-intlayer` ist vollständig kompatibel mit:
351
+
352
+ - [`react-intlayer`](<https://www.google.com/search?q=%5Bhttps://github.com/aymericzip/intlayer/blob/main/docs/docs/de/packages/react-intlayer/index.md%5D(https://github.com/aymericzip/intlayer/blob/main/docs/docs/de/packages/react-intlayer/index.md)>) für React-Anwendungen
353
+ - [`next-intlayer`](<https://www.google.com/search?q=%5Bhttps://github.com/aymericzip/intlayer/blob/main/docs/docs/de/packages/next-intlayer/index.md%5D(https://github.com/aymericzip/intlayer/blob/main/docs/docs/de/packages/next-intlayer/index.md)>) für Next.js-Anwendungen
354
+
355
+ - [`react-intlayer`](<https://www.google.com/search?q=%5Bhttps://github.com/aymericzip/intlayer/blob/main/docs/docs/de/packages/react-intlayer/index.md%5D(https://github.com/aymericzip/intlayer/blob/main/docs/docs/de/packages/react-intlayer/index.md)>) für React-Anwendungen
356
+ - [`next-intlayer`](<https://www.google.com/search?q=%5Bhttps://github.com/aymericzip/intlayer/blob/main/docs/docs/de/packages/next-intlayer/index.md%5D(https://github.com/aymericzip/intlayer/blob/main/docs/docs/de/packages/next-intlayer/index.md)>) für Next.js-Anwendungen
357
+ - [`vite-intlayer`](<https://www.google.com/search?q=%5Bhttps://github.com/aymericzip/intlayer/blob/main/docs/docs/de/packages/vite-intlayer/index.md%5D(https://github.com/aymericzip/intlayer/blob/main/docs/docs/de/packages/vite-intlayer/index.md)>) für Vite-Anwendungen
358
+
359
+ Es funktioniert auch nahtlos mit jeder Internationalisierungslösung in verschiedenen Umgebungen, einschließlich Browsern und API-Anfragen. Sie können die Middleware anpassen, um die Locale über Header oder Cookies zu erkennen:
360
+
361
+ ```typescript fileName="intlayer.config.ts" codeFormat="typescript"
362
+ import { Locales, type IntlayerConfig } from "intlayer";
363
+
364
+ const config: IntlayerConfig = {
365
+ // ... Weitere Konfigurationsoptionen
366
+ middleware: {
367
+ headerName: "my-locale-header",
368
+ cookieName: "my-locale-cookie",
369
+ },
370
+ };
371
+
372
+ export default config;
373
+ ```
374
+
375
+ ```javascript fileName="intlayer.config.mjs" codeFormat="esm"
376
+ import { Locales } from "intlayer";
377
+
378
+ /** @type {import('intlayer').IntlayerConfig} */
379
+ const config = {
380
+ // ... Weitere Konfigurationsoptionen
381
+ middleware: {
382
+ headerName: "my-locale-header",
383
+ cookieName: "my-locale-cookie",
384
+ },
385
+ };
386
+
387
+ export default config;
388
+ ```
389
+
390
+ ```javascript fileName="intlayer.config.cjs" codeFormat="commonjs"
391
+ const { Locales } = require("intlayer");
392
+
393
+ /** @type {import('intlayer').IntlayerConfig} */
394
+ const config = {
395
+ // ... Weitere Konfigurationsoptionen
396
+ middleware: {
397
+ headerName: "my-locale-header",
398
+ cookieName: "my-locale-cookie",
399
+ },
400
+ };
401
+
402
+ module.exports = config;
403
+ ```
404
+
405
+ Standardmäßig interpretiert `fastify-intlayer` den `Accept-Language`-Header, um die bevorzugte Sprache des Clients zu bestimmen.
406
+
407
+ > Für weitere Informationen zur Konfiguration und zu erweiterten Themen, besuchen Sie unsere [Dokumentation](https://github.com/aymericzip/intlayer/blob/main/docs/docs/de/configuration.md).
408
+
409
+ ### TypeScript konfigurieren
410
+
411
+ `fastify-intlayer` nutzt die leistungsstarken Möglichkeiten von TypeScript, um den Internationalisierungsprozess zu verbessern. Die statische Typisierung von TypeScript stellt sicher, dass jeder Übersetzungsschlüssel berücksichtigt wird, reduziert das Risiko fehlender Übersetzungen und verbessert die Wartbarkeit.
412
+
413
+ Stellen Sie sicher, dass die automatisch generierten Typen (standardmäßig unter ./types/intlayer.d.ts) in Ihrer tsconfig.json-Datei enthalten sind.
414
+
415
+ ```json5 fileName="tsconfig.json"
416
+ {
417
+ // ... Ihre bestehenden TypeScript-Konfigurationen
418
+ "include": [
419
+ // ... Ihre bestehenden TypeScript-Konfigurationen
420
+ ".intlayer/**/*.ts", // Automatisch generierte Typen einbeziehen
421
+ ],
422
+ }
423
+ ```
424
+
425
+ ### VS Code-Erweiterung
426
+
427
+ Um Ihre Entwicklungserfahrung mit Intlayer zu verbessern, können Sie die offizielle **Intlayer VS Code-Erweiterung** installieren.
428
+
429
+ [Installieren im VS Code Marketplace](https://marketplace.visualstudio.com/items?itemName=intlayer.intlayer-vs-code-extension)
430
+
431
+ Diese Erweiterung bietet:
432
+
433
+ - **Autovervollständigung** für Übersetzungsschlüssel.
434
+ - **Echtzeit-Fehlererkennung** für fehlende Übersetzungen.
435
+ - **Inline-Vorschauen** des übersetzten Inhalts.
436
+ - **Schnellaktionen**, um Übersetzungen einfach zu erstellen und zu aktualisieren.
437
+
438
+ Weitere Details zur Verwendung der Erweiterung finden Sie in der [Dokumentation der Intlayer VS Code-Erweiterung](https://intlayer.org/doc/vs-code-extension).
439
+
440
+ ### Git-Konfiguration
441
+
442
+ Es wird empfohlen, die von Intlayer generierten Dateien zu ignorieren. So vermeiden Sie, diese in Ihr Git-Repository zu committen.
443
+
444
+ Dazu können Sie die folgenden Einträge in Ihre `.gitignore`-Datei aufnehmen:
445
+
446
+ ```plaintext fileName=".gitignore"
447
+ # Ignoriere die von Intlayer generierten Dateien
448
+ .intlayer
449
+ ```
package/docs/de/readme.md CHANGED
@@ -50,7 +50,7 @@ Mit **pro-Locale Inhaltsdateien**, **TypeScript-Autovervollständigung**, **baum
50
50
  | Funktion | Beschreibung |
51
51
  | --------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
52
52
  | <img src="https://github.com/aymericzip/intlayer/blob/main/docs/assets/frameworks.png?raw=true" alt="Feature" width="700"> | **Unterstützung für mehrere Frameworks**<br><br>Intlayer ist kompatibel mit allen wichtigen Frameworks und Bibliotheken, einschließlich Next.js, React, Vite, Vue.js, Nuxt, Preact, Express und mehr. |
53
- | <img src="https://github.com/aymericzip/intlayer/blob/main/docs/assets/javascript_content_management.png?raw=true" alt="Feature" width="700"> | **JavaScript-gesteuertes Content-Management**<br><br>Nutzen Sie die Flexibilität von JavaScript, um Ihre Inhalte effizient zu definieren und zu verwalten. <br><br> - [Inhaltsdeklaration](https://intlayer.org/doc/concept/content) |
53
+ | <img src="https://github.com/aymericzip/intlayer/blob/main/docs/assets/javascript_content_management.jpg?raw=true" alt="Feature" width="700"> | **JavaScript-gesteuertes Content-Management**<br><br>Nutzen Sie die Flexibilität von JavaScript, um Ihre Inhalte effizient zu definieren und zu verwalten. <br><br> - [Inhaltsdeklaration](https://intlayer.org/doc/concept/content) |
54
54
  | <img src="https://github.com/aymericzip/intlayer/blob/main/docs/assets/per_locale_content_declaration_file.png?raw=true" alt="Feature" width="700"> | **Pro-Lokale Inhaltsdeklarationsdatei**<br><br>Beschleunigen Sie Ihre Entwicklung, indem Sie Ihre Inhalte einmalig deklarieren, bevor die automatische Generierung erfolgt.<br><br> - [Pro-Lokale Inhaltsdeklarationsdatei](https://intlayer.org/doc/concept/per-locale-file) |
55
55
  | <img src="https://github.com/aymericzip/intlayer/blob/main/docs/assets/autocompletion.png?raw=true" alt="Feature" width="700"> | **Typsicheres Umfeld**<br><br>Nutzen Sie TypeScript, um sicherzustellen, dass Ihre Inhaltsdefinitionen und Ihr Code fehlerfrei sind, und profitieren Sie gleichzeitig von der Autovervollständigung in Ihrer IDE.<br><br> - [TypeScript-Konfiguration](https://intlayer.org/doc/environment/vite-and-react#configure-typescript) |
56
56
  | <img src="https://github.com/aymericzip/intlayer/blob/main/docs/assets/config_file.png?raw=true" alt="Feature" width="700"> | **Vereinfachte Einrichtung**<br><br>Starten Sie schnell mit minimaler Konfiguration. Passen Sie mühelos Einstellungen für Internationalisierung, Routing, KI, Build und Inhaltsverwaltung an. <br><br> - [Next.js-Integration erkunden](https://intlayer.org/doc/environment/nextjs) |
@@ -0,0 +1,137 @@
1
+ ---
2
+ createdAt: 2026-01-06
3
+ updatedAt: 2026-01-06
4
+ title: CI Command
5
+ description: Learn how to use the Intlayer CI command to run Intlayer commands with auto-injected credentials in CI/CD pipelines and monorepos.
6
+ keywords:
7
+ - CI
8
+ - CI/CD
9
+ - Automation
10
+ - Monorepo
11
+ - Credentials
12
+ - CLI
13
+ - Intlayer
14
+ slugs:
15
+ - doc
16
+ - concept
17
+ - cli
18
+ - ci
19
+ history:
20
+ - version: 7.5.11
21
+ date: 2026-01-06
22
+ changes: Add CI command
23
+ ---
24
+
25
+ # CI Command
26
+
27
+ ```bash
28
+ npx intlayer ci <command...>
29
+ ```
30
+
31
+ The CI command is designed for automation and CI/CD pipelines. It automatically injects credentials from the `INTLAYER_PROJECT_CREDENTIALS` environment variable and can run Intlayer commands across multiple projects in a monorepo.
32
+
33
+ ## How it works
34
+
35
+ The CI command operates in two modes:
36
+
37
+ 1. **Single Project Mode**: If the current working directory matches one of the project paths in `INTLAYER_PROJECT_CREDENTIALS`, it runs the command for that specific project only.
38
+
39
+ 2. **Iteration Mode**: If no specific project context is detected, it iterates over all configured projects and runs the command for each one.
40
+
41
+ ## Environment Variable
42
+
43
+ The command requires the `INTLAYER_PROJECT_CREDENTIALS` environment variable to be set. This variable should contain a JSON object mapping project paths to their credentials:
44
+
45
+ ```json
46
+ {
47
+ "packages/app": {
48
+ "clientId": "your-client-id-1",
49
+ "clientSecret": "your-client-secret-1"
50
+ },
51
+ "packages/admin": {
52
+ "clientId": "your-client-id-2",
53
+ "clientSecret": "your-client-secret-2"
54
+ }
55
+ }
56
+ ```
57
+
58
+ ## Package Manager Detection
59
+
60
+ The CI command automatically detects which package manager is being used (npm, yarn, pnpm, or bun) based on the `npm_config_user_agent` environment variable and uses the appropriate command to execute Intlayer.
61
+
62
+ ## Arguments
63
+
64
+ - **`<command...>`**: The Intlayer command to execute (e.g., `fill`, `push`, `build`). You can pass any Intlayer command and its arguments.
65
+
66
+ > Example: `npx intlayer ci fill --verbose`
67
+ >
68
+ > Example: `npx intlayer ci push`
69
+ >
70
+ > Example: `npx intlayer ci build`
71
+
72
+ ## Examples
73
+
74
+ ### Run a command in single project mode
75
+
76
+ If you're in a project directory that matches one of the paths in `INTLAYER_PROJECT_CREDENTIALS`:
77
+
78
+ ```bash
79
+ cd packages/app
80
+ npx intlayer ci fill
81
+ ```
82
+
83
+ This will run the `fill` command with credentials automatically injected for the `packages/app` project.
84
+
85
+ ### Run a command across all projects
86
+
87
+ If you're in a directory that doesn't match any project path, the command will iterate over all configured projects:
88
+
89
+ ```bash
90
+ cd /path/to/monorepo
91
+ npx intlayer ci push
92
+ ```
93
+
94
+ This will run the `push` command for each project configured in `INTLAYER_PROJECT_CREDENTIALS`.
95
+
96
+ ### Pass additional flags
97
+
98
+ You can pass any flags to the underlying Intlayer command:
99
+
100
+ ```bash
101
+ npx intlayer ci fill --verbose --mode complete
102
+ ```
103
+
104
+ ### Use in CI/CD pipelines
105
+
106
+ In your CI/CD configuration (e.g., GitHub Actions, GitLab CI), set the `INTLAYER_PROJECT_CREDENTIALS` as a secret:
107
+
108
+ ```yaml
109
+ # GitHub Actions example
110
+ env:
111
+ INTLAYER_PROJECT_CREDENTIALS: ${{ secrets.INTLAYER_PROJECT_CREDENTIALS }}
112
+
113
+ steps:
114
+ - name: Fill dictionaries
115
+ run: npx intlayer ci fill
116
+ ```
117
+
118
+ ## Error Handling
119
+
120
+ - If `INTLAYER_PROJECT_CREDENTIALS` is not set, the command will exit with an error.
121
+ - If `INTLAYER_PROJECT_CREDENTIALS` is not valid JSON, the command will exit with an error.
122
+ - If a project path doesn't exist, it will be skipped with a warning.
123
+ - If any project fails, the command will exit with a non-zero status code.
124
+
125
+ ## Use Cases
126
+
127
+ - **Monorepo automation**: Run Intlayer commands across multiple projects in a monorepo
128
+ - **CI/CD pipelines**: Automate dictionary management in continuous integration workflows
129
+ - **Bulk operations**: Perform the same operation on multiple Intlayer projects at once
130
+ - **Secret management**: Securely manage credentials for multiple projects using environment variables
131
+
132
+ ## Security Best Practices
133
+
134
+ - Store `INTLAYER_PROJECT_CREDENTIALS` as encrypted secrets in your CI/CD platform
135
+ - Never commit credentials to version control
136
+ - Use environment-specific credentials for different deployment environments
137
+ - Rotate credentials regularly
@@ -1,6 +1,6 @@
1
1
  ---
2
2
  createdAt: 2024-08-11
3
- updatedAt: 2025-12-30
3
+ updatedAt: 2026-01-06
4
4
  title: CLI - All Intlayer CLI commands for your multilingual website
5
5
  description: Discover how to use the Intlayer CLI to manage your multilingual website. Follow the steps in this online documentation to set up your project in a few minutes.
6
6
  keywords:
@@ -17,6 +17,12 @@ slugs:
17
17
  - concept
18
18
  - cli
19
19
  history:
20
+ - version: 7.5.11
21
+ date: 2026-01-06
22
+ changes: Add CI command
23
+ - version: 7.5.11
24
+ date: 2026-01-06
25
+ changes: Add projects list command
20
26
  - version: 7.5.9
21
27
  date: 2025-12-30
22
28
  changes: Add init command
@@ -119,6 +125,7 @@ To see how to configure available locales, or other parameters, refer to the [co
119
125
  - **[Build Dictionaries](https://github.com/aymericzip/intlayer/blob/main/docs/docs/en/cli/build.md)** - Build your dictionaries from content declaration files
120
126
  - **[Watch Dictionaries](https://github.com/aymericzip/intlayer/blob/main/docs/docs/en/cli/watch.md)** - Watch for changes and automatically build dictionaries
121
127
  - **[Check CLI Version](https://github.com/aymericzip/intlayer/blob/main/docs/docs/en/cli/version.md)** - Check the installed Intlayer CLI version
128
+ - **[List Projects](https://github.com/aymericzip/intlayer/blob/main/docs/docs/en/cli/list_projects.md)** - List all Intlayer projects in a directory or git repository
122
129
 
123
130
  ### Dictionary Management
124
131
 
@@ -147,6 +154,10 @@ To see how to configure available locales, or other parameters, refer to the [co
147
154
  - **[Editor Commands](https://github.com/aymericzip/intlayer/blob/main/docs/docs/en/cli/editor.md)** - Use the Intlayer editor commands
148
155
  - **[Live Sync Commands](https://github.com/aymericzip/intlayer/blob/main/docs/docs/en/cli/live.md)** - Use Live Sync to reflect CMS content changes at runtime
149
156
 
157
+ ### CI/CD & Automation
158
+
159
+ - **[CI Command](https://github.com/aymericzip/intlayer/blob/main/docs/docs/en/cli/ci.md)** - Run Intlayer commands with auto-injected credentials for CI/CD pipelines
160
+
150
161
  ### Development Tools
151
162
 
152
163
  - **[CLI SDK](https://github.com/aymericzip/intlayer/blob/main/docs/docs/en/cli/sdk.md)** - Use the Intlayer CLI SDK in your own code
@@ -166,6 +177,7 @@ To see how to configure available locales, or other parameters, refer to the [co
166
177
  "intlayer:list": "npx intlayer content list",
167
178
  "intlayer:test": "npx intlayer content test",
168
179
  "intlayer:transform": "npx intlayer transform",
180
+ "intlayer:projects": "npx intlayer projects list",
169
181
  "intlayer:doc:translate": "npx intlayer doc translate",
170
182
  "intlayer:doc:review": "npx intlayer doc review"
171
183
  }
@@ -175,3 +187,4 @@ To see how to configure available locales, or other parameters, refer to the [co
175
187
  >
176
188
  > - `npx intlayer list` instead of `npx intlayer content list`
177
189
  > - `npx intlayer test` instead of `npx intlayer content test`
190
+ > - `npx intlayer projects-list` or `npx intlayer pl` instead of `npx intlayer projects list`