@intlayer/docs 6.1.6-canary.0 → 6.1.6

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 (242) hide show
  1. package/blog/en/next-i18next_vs_next-intl_vs_intlayer.md +71 -80
  2. package/dist/cjs/generated/docs.entry.cjs +16 -0
  3. package/dist/cjs/generated/docs.entry.cjs.map +1 -1
  4. package/dist/esm/generated/docs.entry.mjs +16 -0
  5. package/dist/esm/generated/docs.entry.mjs.map +1 -1
  6. package/dist/types/generated/docs.entry.d.ts +1 -0
  7. package/dist/types/generated/docs.entry.d.ts.map +1 -1
  8. package/docs/ar/intlayer_with_angular.md +2 -2
  9. package/docs/ar/intlayer_with_astro.md +246 -0
  10. package/docs/ar/intlayer_with_create_react_app.md +3 -2
  11. package/docs/ar/intlayer_with_express.md +2 -2
  12. package/docs/ar/intlayer_with_nestjs.md +2 -2
  13. package/docs/ar/intlayer_with_nextjs_14.md +2 -2
  14. package/docs/ar/intlayer_with_nextjs_15.md +2 -2
  15. package/docs/ar/intlayer_with_nextjs_page_router.md +2 -2
  16. package/docs/ar/intlayer_with_nuxt.md +2 -2
  17. package/docs/ar/intlayer_with_react_native+expo.md +11 -20
  18. package/docs/ar/intlayer_with_react_router_v7.md +195 -241
  19. package/docs/ar/intlayer_with_tanstack.md +198 -272
  20. package/docs/ar/intlayer_with_vite+preact.md +9 -9
  21. package/docs/ar/intlayer_with_vite+react.md +7 -7
  22. package/docs/ar/intlayer_with_vite+vue.md +9 -9
  23. package/docs/de/intlayer_with_angular.md +2 -2
  24. package/docs/de/intlayer_with_astro.md +246 -0
  25. package/docs/de/intlayer_with_create_react_app.md +2 -2
  26. package/docs/de/intlayer_with_express.md +2 -2
  27. package/docs/de/intlayer_with_nestjs.md +2 -2
  28. package/docs/de/intlayer_with_nextjs_14.md +2 -2
  29. package/docs/de/intlayer_with_nextjs_15.md +2 -2
  30. package/docs/de/intlayer_with_nextjs_page_router.md +2 -2
  31. package/docs/de/intlayer_with_nuxt.md +2 -2
  32. package/docs/de/intlayer_with_react_native+expo.md +11 -20
  33. package/docs/de/intlayer_with_react_router_v7.md +193 -242
  34. package/docs/de/intlayer_with_tanstack.md +194 -266
  35. package/docs/de/intlayer_with_vite+preact.md +9 -9
  36. package/docs/de/intlayer_with_vite+react.md +9 -9
  37. package/docs/de/intlayer_with_vite+vue.md +11 -11
  38. package/docs/de/packages/vite-intlayer/index.md +3 -3
  39. package/docs/en/how_works_intlayer.md +1 -1
  40. package/docs/en/index.md +1 -1
  41. package/docs/en/intlayer_cli.md +1 -1
  42. package/docs/en/intlayer_with_angular.md +4 -4
  43. package/docs/en/intlayer_with_astro.md +246 -0
  44. package/docs/en/intlayer_with_create_react_app.md +4 -4
  45. package/docs/en/intlayer_with_express.md +3 -3
  46. package/docs/en/intlayer_with_lynx+react.md +1 -1
  47. package/docs/en/intlayer_with_nestjs.md +2 -2
  48. package/docs/en/intlayer_with_nextjs_14.md +13 -4
  49. package/docs/en/intlayer_with_nextjs_15.md +13 -4
  50. package/docs/en/intlayer_with_nextjs_page_router.md +5 -5
  51. package/docs/en/intlayer_with_nuxt.md +4 -4
  52. package/docs/en/intlayer_with_react_native+expo.md +46 -24
  53. package/docs/en/intlayer_with_react_router_v7.md +164 -211
  54. package/docs/en/intlayer_with_tanstack.md +166 -241
  55. package/docs/en/intlayer_with_vite+preact.md +12 -12
  56. package/docs/en/intlayer_with_vite+react.md +12 -12
  57. package/docs/en/intlayer_with_vite+solid.md +2 -2
  58. package/docs/en/intlayer_with_vite+svelte.md +2 -2
  59. package/docs/en/intlayer_with_vite+vue.md +12 -12
  60. package/docs/en/introduction.md +1 -1
  61. package/docs/en/packages/next-intlayer/useDictionary.md +1 -1
  62. package/docs/en/packages/next-intlayer/useIntlayer.md +1 -1
  63. package/docs/en/packages/react-intlayer/useDictionary.md +1 -1
  64. package/docs/en/packages/react-intlayer/useI18n.md +1 -1
  65. package/docs/en/packages/react-intlayer/useIntlayer.md +1 -1
  66. package/docs/en/releases/v6.md +1 -0
  67. package/docs/en/roadmap.md +1 -1
  68. package/docs/en-GB/intlayer_with_angular.md +3 -3
  69. package/docs/en-GB/intlayer_with_astro.md +246 -0
  70. package/docs/en-GB/intlayer_with_create_react_app.md +5 -4
  71. package/docs/en-GB/intlayer_with_express.md +2 -2
  72. package/docs/en-GB/intlayer_with_nestjs.md +2 -2
  73. package/docs/en-GB/intlayer_with_nextjs_14.md +4 -4
  74. package/docs/en-GB/intlayer_with_nextjs_15.md +2 -2
  75. package/docs/en-GB/intlayer_with_nextjs_page_router.md +2 -2
  76. package/docs/en-GB/intlayer_with_nuxt.md +2 -2
  77. package/docs/en-GB/intlayer_with_react_native+expo.md +11 -20
  78. package/docs/en-GB/intlayer_with_react_router_v7.md +171 -220
  79. package/docs/en-GB/intlayer_with_tanstack.md +174 -248
  80. package/docs/en-GB/intlayer_with_vite+preact.md +9 -9
  81. package/docs/en-GB/intlayer_with_vite+react.md +9 -9
  82. package/docs/en-GB/intlayer_with_vite+vue.md +11 -11
  83. package/docs/en-GB/packages/next-intlayer/useIntlayer.md +1 -1
  84. package/docs/en-GB/packages/react-intlayer/useIntlayer.md +1 -1
  85. package/docs/es/intlayer_with_angular.md +2 -2
  86. package/docs/es/intlayer_with_astro.md +246 -0
  87. package/docs/es/intlayer_with_create_react_app.md +3 -2
  88. package/docs/es/intlayer_with_express.md +2 -2
  89. package/docs/es/intlayer_with_nextjs_14.md +2 -2
  90. package/docs/es/intlayer_with_nextjs_15.md +2 -2
  91. package/docs/es/intlayer_with_react_native+expo.md +11 -20
  92. package/docs/es/intlayer_with_react_router_v7.md +188 -232
  93. package/docs/es/intlayer_with_tanstack.md +203 -273
  94. package/docs/es/intlayer_with_vite+preact.md +7 -7
  95. package/docs/es/intlayer_with_vite+react.md +7 -7
  96. package/docs/es/intlayer_with_vite+vue.md +9 -9
  97. package/docs/fr/intlayer_with_angular.md +2 -2
  98. package/docs/fr/intlayer_with_astro.md +246 -0
  99. package/docs/fr/intlayer_with_create_react_app.md +3 -2
  100. package/docs/fr/intlayer_with_express.md +2 -2
  101. package/docs/fr/intlayer_with_nestjs.md +2 -2
  102. package/docs/fr/intlayer_with_nextjs_14.md +2 -2
  103. package/docs/fr/intlayer_with_react_native+expo.md +11 -20
  104. package/docs/fr/intlayer_with_react_router_v7.md +188 -248
  105. package/docs/fr/intlayer_with_tanstack.md +192 -265
  106. package/docs/fr/intlayer_with_vite+preact.md +7 -7
  107. package/docs/fr/intlayer_with_vite+react.md +7 -7
  108. package/docs/fr/intlayer_with_vite+vue.md +9 -9
  109. package/docs/hi/intlayer_cli.md +1 -4
  110. package/docs/hi/intlayer_with_angular.md +2 -2
  111. package/docs/hi/intlayer_with_astro.md +246 -0
  112. package/docs/hi/intlayer_with_create_react_app.md +2 -2
  113. package/docs/hi/intlayer_with_express.md +2 -2
  114. package/docs/hi/intlayer_with_nestjs.md +2 -2
  115. package/docs/hi/intlayer_with_nextjs_14.md +2 -2
  116. package/docs/hi/intlayer_with_nextjs_15.md +2 -2
  117. package/docs/hi/intlayer_with_nextjs_page_router.md +2 -2
  118. package/docs/hi/intlayer_with_nuxt.md +2 -2
  119. package/docs/hi/intlayer_with_react_native+expo.md +11 -20
  120. package/docs/hi/intlayer_with_react_router_v7.md +199 -243
  121. package/docs/hi/intlayer_with_tanstack.md +210 -285
  122. package/docs/hi/intlayer_with_vite+preact.md +9 -9
  123. package/docs/hi/intlayer_with_vite+react.md +9 -9
  124. package/docs/hi/intlayer_with_vite+solid.md +1 -1
  125. package/docs/hi/intlayer_with_vite+vue.md +11 -11
  126. package/docs/it/intlayer_with_angular.md +2 -2
  127. package/docs/it/intlayer_with_astro.md +246 -0
  128. package/docs/it/intlayer_with_create_react_app.md +3 -2
  129. package/docs/it/intlayer_with_express.md +2 -2
  130. package/docs/it/intlayer_with_nestjs.md +2 -2
  131. package/docs/it/intlayer_with_nextjs_14.md +2 -2
  132. package/docs/it/intlayer_with_nextjs_15.md +2 -2
  133. package/docs/it/intlayer_with_nextjs_page_router.md +2 -2
  134. package/docs/it/intlayer_with_nuxt.md +2 -2
  135. package/docs/it/intlayer_with_react_native+expo.md +11 -21
  136. package/docs/it/intlayer_with_react_router_v7.md +195 -242
  137. package/docs/it/intlayer_with_tanstack.md +203 -267
  138. package/docs/it/intlayer_with_vite+preact.md +9 -9
  139. package/docs/it/intlayer_with_vite+react.md +13 -11
  140. package/docs/it/intlayer_with_vite+vue.md +11 -11
  141. package/docs/ja/intlayer_with_angular.md +2 -2
  142. package/docs/ja/intlayer_with_astro.md +246 -0
  143. package/docs/ja/intlayer_with_create_react_app.md +3 -2
  144. package/docs/ja/intlayer_with_express.md +2 -2
  145. package/docs/ja/intlayer_with_nestjs.md +2 -2
  146. package/docs/ja/intlayer_with_nextjs_14.md +2 -2
  147. package/docs/ja/intlayer_with_nextjs_15.md +2 -2
  148. package/docs/ja/intlayer_with_nextjs_page_router.md +2 -2
  149. package/docs/ja/intlayer_with_nuxt.md +2 -2
  150. package/docs/ja/intlayer_with_react_native+expo.md +18 -29
  151. package/docs/ja/intlayer_with_react_router_v7.md +204 -250
  152. package/docs/ja/intlayer_with_tanstack.md +218 -286
  153. package/docs/ja/intlayer_with_vite+preact.md +9 -9
  154. package/docs/ja/intlayer_with_vite+react.md +11 -11
  155. package/docs/ja/intlayer_with_vite+vue.md +11 -11
  156. package/docs/ko/intlayer_with_angular.md +2 -2
  157. package/docs/ko/intlayer_with_astro.md +246 -0
  158. package/docs/ko/intlayer_with_create_react_app.md +3 -2
  159. package/docs/ko/intlayer_with_express.md +2 -2
  160. package/docs/ko/intlayer_with_nestjs.md +2 -2
  161. package/docs/ko/intlayer_with_nextjs_14.md +2 -2
  162. package/docs/ko/intlayer_with_nextjs_15.md +2 -2
  163. package/docs/ko/intlayer_with_nextjs_page_router.md +2 -2
  164. package/docs/ko/intlayer_with_nuxt.md +2 -2
  165. package/docs/ko/intlayer_with_react_native+expo.md +19 -28
  166. package/docs/ko/intlayer_with_react_router_v7.md +190 -244
  167. package/docs/ko/intlayer_with_tanstack.md +200 -270
  168. package/docs/ko/intlayer_with_vite+preact.md +9 -9
  169. package/docs/ko/intlayer_with_vite+react.md +9 -9
  170. package/docs/ko/intlayer_with_vite+vue.md +11 -11
  171. package/docs/pt/intlayer_with_angular.md +2 -2
  172. package/docs/pt/intlayer_with_astro.md +246 -0
  173. package/docs/pt/intlayer_with_create_react_app.md +3 -2
  174. package/docs/pt/intlayer_with_express.md +2 -2
  175. package/docs/pt/intlayer_with_nestjs.md +2 -2
  176. package/docs/pt/intlayer_with_nextjs_14.md +2 -2
  177. package/docs/pt/intlayer_with_nextjs_15.md +2 -2
  178. package/docs/pt/intlayer_with_nextjs_page_router.md +2 -2
  179. package/docs/pt/intlayer_with_nuxt.md +2 -2
  180. package/docs/pt/intlayer_with_react_native+expo.md +11 -20
  181. package/docs/pt/intlayer_with_react_router_v7.md +7 -13
  182. package/docs/pt/intlayer_with_tanstack.md +183 -258
  183. package/docs/pt/intlayer_with_vite+preact.md +9 -9
  184. package/docs/pt/intlayer_with_vite+react.md +9 -9
  185. package/docs/pt/intlayer_with_vite+vue.md +9 -9
  186. package/docs/ru/intlayer_with_angular.md +2 -2
  187. package/docs/ru/intlayer_with_astro.md +246 -0
  188. package/docs/ru/intlayer_with_create_react_app.md +3 -2
  189. package/docs/ru/intlayer_with_express.md +2 -2
  190. package/docs/ru/intlayer_with_nestjs.md +2 -2
  191. package/docs/ru/intlayer_with_nextjs_14.md +2 -2
  192. package/docs/ru/intlayer_with_nextjs_15.md +2 -2
  193. package/docs/ru/intlayer_with_nextjs_page_router.md +2 -2
  194. package/docs/ru/intlayer_with_nuxt.md +2 -2
  195. package/docs/ru/intlayer_with_react_native+expo.md +11 -20
  196. package/docs/ru/intlayer_with_react_router_v7.md +192 -238
  197. package/docs/ru/intlayer_with_tanstack.md +197 -269
  198. package/docs/ru/intlayer_with_vite+preact.md +9 -9
  199. package/docs/ru/intlayer_with_vite+react.md +9 -9
  200. package/docs/ru/intlayer_with_vite+vue.md +11 -11
  201. package/docs/tr/how_works_intlayer.md +1 -1
  202. package/docs/tr/index.md +1 -1
  203. package/docs/tr/intlayer_cli.md +1 -1
  204. package/docs/tr/intlayer_with_angular.md +4 -4
  205. package/docs/tr/intlayer_with_astro.md +246 -0
  206. package/docs/tr/intlayer_with_create_react_app.md +4 -4
  207. package/docs/tr/intlayer_with_express.md +3 -3
  208. package/docs/tr/intlayer_with_lynx+react.md +1 -1
  209. package/docs/tr/intlayer_with_nestjs.md +2 -2
  210. package/docs/tr/intlayer_with_nextjs_14.md +2 -2
  211. package/docs/tr/intlayer_with_nextjs_15.md +4 -4
  212. package/docs/tr/intlayer_with_nextjs_page_router.md +5 -5
  213. package/docs/tr/intlayer_with_nuxt.md +4 -4
  214. package/docs/tr/intlayer_with_react_native+expo.md +12 -21
  215. package/docs/tr/intlayer_with_react_router_v7.md +222 -267
  216. package/docs/tr/intlayer_with_tanstack.md +400 -303
  217. package/docs/tr/intlayer_with_vite+preact.md +12 -12
  218. package/docs/tr/intlayer_with_vite+react.md +12 -12
  219. package/docs/tr/intlayer_with_vite+solid.md +2 -2
  220. package/docs/tr/intlayer_with_vite+svelte.md +2 -2
  221. package/docs/tr/intlayer_with_vite+vue.md +12 -12
  222. package/docs/tr/introduction.md +1 -1
  223. package/docs/tr/packages/react-intlayer/useDictionary.md +1 -1
  224. package/docs/tr/packages/react-intlayer/useI18n.md +1 -1
  225. package/docs/tr/roadmap.md +1 -1
  226. package/docs/zh/intlayer_with_angular.md +2 -2
  227. package/docs/zh/intlayer_with_astro.md +246 -0
  228. package/docs/zh/intlayer_with_create_react_app.md +3 -2
  229. package/docs/zh/intlayer_with_express.md +2 -2
  230. package/docs/zh/intlayer_with_nestjs.md +2 -2
  231. package/docs/zh/intlayer_with_nextjs_14.md +2 -2
  232. package/docs/zh/intlayer_with_nextjs_15.md +2 -2
  233. package/docs/zh/intlayer_with_nextjs_page_router.md +2 -2
  234. package/docs/zh/intlayer_with_nuxt.md +2 -2
  235. package/docs/zh/intlayer_with_react_native+expo.md +19 -28
  236. package/docs/zh/intlayer_with_react_router_v7.md +200 -248
  237. package/docs/zh/intlayer_with_tanstack.md +208 -283
  238. package/docs/zh/intlayer_with_vite+preact.md +9 -9
  239. package/docs/zh/intlayer_with_vite+react.md +9 -9
  240. package/docs/zh/intlayer_with_vite+vue.md +9 -9
  241. package/package.json +11 -11
  242. package/src/generated/docs.entry.ts +16 -0
@@ -1,8 +1,8 @@
1
1
  ---
2
2
  createdAt: 2025-09-04
3
- updatedAt: 2025-09-04
3
+ updatedAt: 2025-10-03
4
4
  title: Erste Schritte mit Intlayer in React Router v7
5
- description: Erfahren Sie, wie Sie Internationalisierung (i18n) zu Ihrer React Router v7-Anwendung mit Intlayer hinzufügen. Folgen Sie dieser umfassenden Anleitung, um Ihre App mehrsprachig mit lokalisierungsbewusstem Routing zu gestalten.
5
+ description: Erfahren Sie, wie Sie Internationalisierung (i18n) zu Ihrer React Router v7-Anwendung mit Intlayer hinzufügen. Folgen Sie dieser umfassenden Anleitung, um Ihre App mehrsprachig mit lokalisierungsbewusstem Routing zu machen.
6
6
  keywords:
7
7
  - Internationalisierung
8
8
  - Dokumentation
@@ -11,19 +11,18 @@ keywords:
11
11
  - React
12
12
  - i18n
13
13
  - TypeScript
14
- - Lokalisierungsrouting
14
+ - Lokalisierungs-Routing
15
15
  slugs:
16
16
  - doc
17
17
  - environment
18
18
  - vite-and-react
19
19
  - react-router-v7
20
- applicationTemplate: https://github.com/AydinTheFirst/react-router-intlayer
21
- author: AydinTheFirst
20
+ applicationTemplate: https://github.com/aymericzip/intlayer-react-router-v7-template
22
21
  ---
23
22
 
24
- # Erste Schritte zur Internationalisierung (i18n) mit Intlayer und React Router v7
23
+ # Erste Schritte mit der Internationalisierung (i18n) mit Intlayer und React Router v7
25
24
 
26
- Diese Anleitung zeigt, wie Sie **Intlayer** nahtlos in React Router v7-Projekte mit lokalisierungsbewusstem Routing, TypeScript-Unterstützung und modernen Entwicklungsmethoden integrieren.
25
+ Diese Anleitung zeigt, wie Sie **Intlayer** für nahtlose Internationalisierung in React Router v7-Projekten mit lokalisierungsbewusstem Routing, TypeScript-Unterstützung und modernen Entwicklungsmethoden integrieren.
27
26
 
28
27
  ## Was ist Intlayer?
29
28
 
@@ -33,9 +32,9 @@ Mit Intlayer können Sie:
33
32
 
34
33
  - **Übersetzungen einfach verwalten** durch deklarative Wörterbücher auf Komponentenebene.
35
34
  - **Metadaten, Routen und Inhalte dynamisch lokalisieren**.
36
- - **TypeScript-Unterstützung sicherstellen** mit automatisch generierten Typen, die die Autovervollständigung und Fehlererkennung verbessern.
37
- - **Von erweiterten Funktionen profitieren**, wie dynamischer Lokalerkennung und Umschaltung.
38
- - **Lokalisierungsbewusstes Routing aktivieren** mit dem konfigurationsbasierten Routing-System von React Router v7.
35
+ - **TypeScript-Unterstützung sicherstellen** mit automatisch generierten Typen, die Autovervollständigung und Fehlererkennung verbessern.
36
+ - **Von erweiterten Funktionen profitieren**, wie dynamische Lokalerkennung und -umschaltung.
37
+ - **Aktivieren Sie lokalisierungsbewusstes Routing** mit dem konfigurationsbasierten Routing-System von React Router v7.
39
38
 
40
39
  ---
41
40
 
@@ -43,7 +42,7 @@ Mit Intlayer können Sie:
43
42
 
44
43
  ### Schritt 1: Abhängigkeiten installieren
45
44
 
46
- Installieren Sie die erforderlichen Pakete mit Ihrem bevorzugten Paketmanager:
45
+ Installieren Sie die notwendigen Pakete mit Ihrem bevorzugten Paketmanager:
47
46
 
48
47
  ```bash packageManager="npm"
49
48
  npm install intlayer react-intlayer
@@ -59,14 +58,12 @@ pnpm add vite-intlayer --save-dev
59
58
 
60
59
  - **intlayer**
61
60
 
62
- Das Kernpaket, das Internationalisierungswerkzeuge für Konfigurationsmanagement, Übersetzung, [Inhaltsdeklaration](https://github.com/aymericzip/intlayer/blob/main/docs/docs/de/dictionary/get_started.md), Transpilation und [CLI-Befehle](https://github.com/aymericzip/intlayer/blob/main/docs/docs/de/intlayer_cli.md) bereitstellt.
61
+ Das Kernpaket, das Internationalisierungswerkzeuge für Konfigurationsmanagement, Übersetzung, [Inhaltsdeklaration](https://github.com/aymericzip/intlayer/blob/main/docs/docs/de/dictionary/get_started.md), Transpilierung und [CLI-Befehle](https://github.com/aymericzip/intlayer/blob/main/docs/docs/de/intlayer_cli.md) bereitstellt.
63
62
 
64
63
  - **react-intlayer**
65
-
66
64
  Das Paket, das Intlayer in React-Anwendungen integriert. Es stellt Kontext-Provider und Hooks für die Internationalisierung in React bereit.
67
65
 
68
66
  - **vite-intlayer**
69
-
70
67
  Enthält das Vite-Plugin zur Integration von Intlayer mit dem [Vite-Bundler](https://vite.dev/guide/why.html#why-bundle-for-production) sowie Middleware zur Erkennung der bevorzugten Sprache des Benutzers, Verwaltung von Cookies und Handhabung von URL-Weiterleitungen.
71
68
 
72
69
  ### Schritt 2: Konfiguration Ihres Projekts
@@ -78,11 +75,8 @@ import { type IntlayerConfig, Locales } from "intlayer";
78
75
 
79
76
  const config: IntlayerConfig = {
80
77
  internationalization: {
81
- defaultLocale: Locales.ENGLISH,
82
- locales: [Locales.ENGLISH, Locales.TURKISH],
83
- },
84
- middleware: {
85
- prefixDefault: true, // Standardlocale in URLs immer voranstellen
78
+ defaultLocale: Locales.ENGLISH, // Standard-Sprache
79
+ locales: [Locales.ENGLISH, Locales.FRENCH, Locales.SPANISH], // Verfügbare Sprachen
86
80
  },
87
81
  };
88
82
 
@@ -95,11 +89,8 @@ import { Locales } from "intlayer";
95
89
  /** @type {import('intlayer').IntlayerConfig} */
96
90
  const config = {
97
91
  internationalization: {
98
- defaultLocale: Locales.ENGLISH,
99
- locales: [Locales.ENGLISH, Locales.TURKISH],
100
- },
101
- middleware: {
102
- prefixDefault: true,
92
+ defaultLocale: Locales.ENGLISH, // Standard-Sprache
93
+ locales: [Locales.ENGLISH, Locales.FRENCH, Locales.SPANISH], // Verfügbare Sprachen
103
94
  },
104
95
  };
105
96
 
@@ -110,59 +101,49 @@ export default config;
110
101
  const { Locales } = require("intlayer");
111
102
 
112
103
  /** @type {import('intlayer').IntlayerConfig} */
113
- // Konfiguration des Intlayer-Setups
114
104
  const config = {
115
105
  internationalization: {
116
- defaultLocale: Locales.ENGLISH, // Standard-Sprache
117
- locales: [Locales.ENGLISH, Locales.TURKISH], // Verfügbare Sprachen
118
- },
119
- middleware: {
120
- prefixDefault: true, // Standard-Sprache immer im URL-Pfad voranstellen
106
+ defaultLocale: Locales.ENGLISH, // Standardsprache
107
+ locales: [Locales.ENGLISH, Locales.FRENCH, Locales.SPANISH], // Verfügbare Sprachen
121
108
  },
122
109
  };
123
110
 
124
111
  module.exports = config;
125
112
  ```
126
113
 
127
- > Über diese Konfigurationsdatei können Sie lokalisierte URLs, Middleware-Weiterleitungen, Cookie-Namen, den Speicherort und die Erweiterung Ihrer Inhaltsdeklarationen einstellen, Intlayer-Logs in der Konsole deaktivieren und vieles mehr. Für eine vollständige Liste der verfügbaren Parameter konsultieren Sie bitte die [Konfigurationsdokumentation](https://github.com/aymericzip/intlayer/blob/main/docs/docs/de/configuration.md).
128
-
129
- ### Schritt 3: React Router v7 Routen konfigurieren
130
-
131
- Richten Sie Ihre Routing-Konfiguration mit sprachsensitiven Routen ein:
114
+ > Über diese Konfigurationsdatei können Sie lokalisierte URLs, Middleware-Weiterleitungen, Cookie-Namen, den Speicherort und die Erweiterung Ihrer Inhaltsdeklarationen einstellen, Intlayer-Logs in der Konsole deaktivieren und vieles mehr. Für eine vollständige Liste der verfügbaren Parameter lesen Sie bitte die [Konfigurationsdokumentation](https://github.com/aymericzip/intlayer/blob/main/docs/docs/de/configuration.md).
132
115
 
133
- ```typescript fileName="app/routes.ts" codeFormat="typescript"
134
- import { layout, route, type RouteConfig } from "@react-router/dev/routes";
135
-
136
- export default [
137
- layout("routes/layout.tsx", [
138
- route("/", "routes/page.tsx"), // Startseite - leitet zur Sprache weiter
139
- route("/:lang", "routes/[lang]/page.tsx"), // Lokalisierte Startseite
140
- route("/:lang/about", "routes/[lang]/about/page.tsx"), // Lokalisierte Über-Seite
141
- ]),
142
- ] satisfies RouteConfig;
143
- ```
144
-
145
- ### Schritt 4: Intlayer in Ihre Vite-Konfiguration integrieren
116
+ ### Schritt 3: Integrieren Sie Intlayer in Ihre Vite-Konfiguration
146
117
 
147
118
  Fügen Sie das Intlayer-Plugin in Ihre Konfiguration ein:
148
119
 
149
- ```typescript fileName="vite.config.ts" codeFormat="typescript"
120
+ ```typescript fileName="vite.config.ts"
150
121
  import { reactRouter } from "@react-router/dev/vite";
151
122
  import { defineConfig } from "vite";
152
- import { intlayerMiddlewarePlugin, intlayer } from "vite-intlayer";
123
+ import { intlayer } from "vite-intlayer";
153
124
  import tsconfigPaths from "vite-tsconfig-paths";
154
125
 
155
126
  export default defineConfig({
156
- plugins: [
157
- reactRouter(),
158
- tsconfigPaths(),
159
- intlayer(),
160
- intlayerMiddlewarePlugin(),
161
- ],
127
+ plugins: [reactRouter(), tsconfigPaths(), intlayer()],
162
128
  });
163
129
  ```
164
130
 
165
- > Das `intlayer()` Vite-Plugin wird verwendet, um Intlayer in Vite zu integrieren. Es sorgt für den Aufbau von Inhaltsdeklarationsdateien und überwacht diese im Entwicklungsmodus. Es definiert Intlayer-Umgebungsvariablen innerhalb der Vite-Anwendung. Zusätzlich stellt es Aliase bereit, um die Leistung zu optimieren.
131
+ > Das `intlayer()` Vite-Plugin wird verwendet, um Intlayer mit Vite zu integrieren. Es sorgt für den Aufbau der Inhaltsdeklarationsdateien und überwacht diese im Entwicklungsmodus. Es definiert Intlayer-Umgebungsvariablen innerhalb der Vite-Anwendung. Zusätzlich stellt es Aliase bereit, um die Leistung zu optimieren.
132
+
133
+ ### Schritt 4: Konfigurieren der React Router v7 Routen
134
+
135
+ Richten Sie Ihre Routing-Konfiguration mit sprachsensitiven Routen ein:
136
+
137
+ ```typescript fileName="app/routes.ts"
138
+ import { layout, route, type RouteConfig } from "@react-router/dev/routes";
139
+
140
+ export default [
141
+ layout("routes/layout.tsx", [
142
+ route("/:lang?", "routes/page.tsx"), // Lokalisierte Startseite
143
+ route("/:lang?/about", "routes/about/page.tsx"), // Lokalisierte Über-Seite
144
+ ]),
145
+ ] satisfies RouteConfig;
146
+ ```
166
147
 
167
148
  ### Schritt 5: Layout-Komponenten erstellen
168
149
 
@@ -170,15 +151,17 @@ Richten Sie Ihr Root-Layout und sprachspezifische Layouts ein:
170
151
 
171
152
  #### Root-Layout
172
153
 
173
- ```tsx fileName="app/routes/layout.tsx" codeFormat="typescript"
174
- tsx fileName="app/routes/layout.tsx" codeFormat="typescript"
175
- // app/routes/layout.tsx
176
- import { Outlet } from "react-router";
154
+ ```tsx fileName="app/routes/layout.tsx"
177
155
  import { IntlayerProvider } from "react-intlayer";
156
+ import { Outlet } from "react-router";
157
+
158
+ import type { Route } from "./+types/layout";
159
+
160
+ export default function RootLayout({ params }: Route.ComponentProps) {
161
+ const { locale } = params;
178
162
 
179
- export default function RootLayout() {
180
163
  return (
181
- <IntlayerProvider>
164
+ <IntlayerProvider locale={locale}>
182
165
  <Outlet />
183
166
  </IntlayerProvider>
184
167
  );
@@ -189,7 +172,7 @@ export default function RootLayout() {
189
172
 
190
173
  Erstellen und verwalten Sie Ihre Inhaltsdeklarationen, um Übersetzungen zu speichern:
191
174
 
192
- ```tsx fileName="app/routes/[lang]/page.content.ts" contentDeclarationFormat="typescript"
175
+ ```tsx fileName="app/routes/[lang]/page.content.ts"
193
176
  import { t, type Dictionary } from "intlayer";
194
177
 
195
178
  const pageContent = {
@@ -197,19 +180,23 @@ const pageContent = {
197
180
  content: {
198
181
  title: t({
199
182
  en: "Welcome to React Router v7 + Intlayer",
200
- tr: "React Router v7 + Intlayer'a Hoş Geldiniz",
183
+ es: "Bienvenido a React Router v7 + Intlayer",
184
+ fr: "Bienvenue sur React Router v7 + Intlayer",
201
185
  }),
202
186
  description: t({
203
187
  en: "Build multilingual applications with ease using React Router v7 and Intlayer.",
204
- tr: "React Router v7 ve Intlayer kullanarak kolayca çok dilli uygulamalar geliştirin.",
188
+ es: "Cree aplicaciones multilingües fácilmente usando React Router v7 y Intlayer.",
189
+ fr: "Créez des applications multilingues facilement avec React Router v7 et Intlayer.",
205
190
  }),
206
191
  aboutLink: t({
207
192
  en: "Erfahren Sie mehr über uns",
208
- tr: "Hakkımızda Öğrenin",
193
+ es: "Aprender Sobre Nosotros",
194
+ fr: "En savoir plus sur nous",
209
195
  }),
210
196
  homeLink: t({
211
197
  en: "Startseite",
212
- tr: "Ana Sayfa",
198
+ es: "Inicio",
199
+ fr: "Accueil",
213
200
  }),
214
201
  },
215
202
  } satisfies Dictionary;
@@ -217,163 +204,165 @@ const pageContent = {
217
204
  export default pageContent;
218
205
  ```
219
206
 
220
- > Ihre Inhaltsdeklarationen können überall in Ihrer Anwendung definiert werden, sobald sie in das Verzeichnis `contentDir` (standardmäßig `./app`) aufgenommen werden. Und sie müssen der Dateiendung für Inhaltsdeklarationen entsprechen (standardmäßig `.content.{json,ts,tsx,js,jsx,mjs,mjx,cjs,cjx}`).
207
+ > Ihre Inhaltsdeklarationen können überall in Ihrer Anwendung definiert werden, sobald sie in das Verzeichnis `contentDir` aufgenommen werden (standardmäßig `./app`). Und sie müssen der Dateierweiterung für Inhaltsdeklarationen entsprechen (standardmäßig `.content.{json,ts,tsx,js,jsx,mjs,mjx,cjs,cjx}`).
221
208
 
222
- > Für weitere Details lesen Sie bitte die [Dokumentation zur Inhaltsdeklaration](https://github.com/aymericzip/intlayer/blob/main/docs/docs/de/dictionary/get_started.md).
209
+ > Für weitere Details siehe die [Dokumentation zur Inhaltsdeklaration](https://github.com/aymericzip/intlayer/blob/main/docs/docs/de/dictionary/get_started.md).
223
210
 
224
- ### Schritt 7: Erstellen Sie sprachspezifische Komponenten
211
+ ### Schritt 7: Erstellen Sie locale-bewusste Komponenten
225
212
 
226
- Erstellen Sie eine `LocalizedLink`-Komponente für lokalisierungsbewusste Navigation:
213
+ Erstellen Sie eine `LocalizedLink`-Komponente für locale-bewusste Navigation:
227
214
 
228
- ```tsx fileName="app/components/localized-link.tsx" codeFormat="typescript"
229
- // app/components/localized-link.tsx
230
- import { getLocalizedUrl } from "intlayer";
231
- import { useLocale } from "react-intlayer";
232
- import React from "react";
233
- import { Link, useLocation } from "react-router";
234
-
235
- type RouterLinkProps = React.ComponentProps<typeof Link>;
215
+ ```tsx fileName="app/components/localized-link.tsx"
216
+ import type { FC } from "react";
236
217
 
237
- export default function LocalizedLink({ to, ...props }: RouterLinkProps) {
238
- const { locale } = useLocale();
239
- const location = useLocation();
218
+ import { getLocalizedUrl, type LocalesValues } from "intlayer";
219
+ import { useLocale } from "react-intlayer";
220
+ import { Link, type LinkProps, type To } from "react-router";
240
221
 
241
- const isExternal = (path: string) =>
242
- /^([a-z][a-z0-9+.-]*:)?\/\//i.test(path) || path.startsWith("mailto:");
222
+ const isExternalLink = (to: string) => /^(https?:)?\/\//.test(to);
243
223
 
224
+ // Prüft, ob der Link extern ist
225
+ export const locacalizeTo = (to: To, locale: LocalesValues): To => {
244
226
  if (typeof to === "string") {
245
- if (to.startsWith("/") && !isExternal(to)) {
246
- return <Link to={getLocalizedUrl(to, locale)} {...props} />;
227
+ if (isExternalLink(to)) {
228
+ return to;
247
229
  }
248
- return <Link to={to} {...props} />;
230
+
231
+ return getLocalizedUrl(to, locale);
249
232
  }
250
233
 
251
- if (to && typeof to === "object") {
252
- const pathname = (to as { pathname?: string }).pathname;
253
- if (pathname && pathname.startsWith("/") && !isExternal(pathname)) {
254
- return (
255
- <Link
256
- to={{ ...to, pathname: getLocalizedUrl(pathname, locale) }}
257
- {...props}
258
- />
259
- );
260
- }
261
- return <Link to={to} {...props} />;
234
+ if (isExternalLink(to.pathname ?? "")) {
235
+ return to;
262
236
  }
263
237
 
264
- return (
265
- <Link
266
- to={getLocalizedUrl(location.pathname + location.search, locale)}
267
- {...props}
268
- />
269
- );
270
- }
271
- ```
238
+ return {
239
+ ...to,
240
+ pathname: getLocalizedUrl(to.pathname ?? "", locale),
241
+ };
242
+ };
272
243
 
273
- ### Schritt 8: Verwenden Sie Intlayer in Ihren Seiten
244
+ // Lokalisierter Link-Komponenten für die Navigation
245
+ export const LocalizedLink: FC<LinkProps> = (props) => {
246
+ const { locale } = useLocale();
274
247
 
275
- Greifen Sie in Ihrer gesamten Anwendung auf Ihre Inhaltsverzeichnisse zu:
248
+ return <Link {...props} to={locacalizeTo(props.to, locale)} />;
249
+ };
250
+ ```
276
251
 
277
- #### Root-Weiterleitungsseite
252
+ Falls Sie zu den lokalisierten Routen navigieren möchten, können Sie den `useLocalizedNavigate` Hook verwenden:
278
253
 
279
- ```tsx fileName="app/routes/page.tsx" codeFormat="typescript"
280
- // app/routes/page.tsx
281
- import { useLocale } from "react-intlayer";
282
- import { Navigate } from "react-router";
254
+ ```tsx fileName="app/hooks/useLocalizedNavigate.ts"
255
+ import { useLocale } from "intlayer";
256
+ import { type NavigateOptions, type To, useNavigate } from "react-router";
283
257
 
284
- export default function Page() {
258
+ import { locacalizeTo } from "~/components/localized-link";
259
+
260
+ export const useLocalizedNavigate = () => {
261
+ const navigate = useNavigate();
285
262
  const { locale } = useLocale();
286
263
 
287
- return <Navigate replace to={locale} />;
288
- }
264
+ const localizedNavigate = (to: To, options?: NavigateOptions) => {
265
+ const localedTo = locacalizeTo(to, locale);
266
+
267
+ navigate(localedTo, options);
268
+ };
269
+
270
+ return localizedNavigate;
271
+ };
289
272
  ```
290
273
 
274
+ ### Schritt 8: Verwenden Sie Intlayer in Ihren Seiten
275
+
276
+ Greifen Sie in Ihrer gesamten Anwendung auf Ihre Inhaltswörterbücher zu:
277
+
291
278
  #### Lokalisierte Startseite
292
279
 
293
- ```tsx fileName="app/routes/[lang]/page.tsx" codeFormat="typescript"
280
+ ```tsx fileName="app/routes/[lang]/page.tsx"
294
281
  import { useIntlayer } from "react-intlayer";
295
- import LocalizedLink from "~/components/localized-link";
282
+ import { LocalizedLink } from "~/components/localized-link";
296
283
 
297
284
  export default function Page() {
298
- const content = useIntlayer("page");
285
+ const { title, description, aboutLink } = useIntlayer("page");
299
286
 
300
287
  return (
301
- <div style={{ padding: "2rem", textAlign: "center" }}>
302
- <h1>{content.title}</h1>
303
- <p>{content.description}</p>
304
- <nav style={{ marginTop: "2rem" }}>
305
- <LocalizedLink
306
- to="/about"
307
- style={{
308
- display: "inline-block",
309
- padding: "0.5rem 1rem",
310
- backgroundColor: "#007bff",
311
- color: "white",
312
- textDecoration: "none",
313
- borderRadius: "4px",
314
- }}
315
- >
316
- {content.aboutLink}
317
- </LocalizedLink>
288
+ <div>
289
+ <h1>{title}</h1>
290
+ <p>{description}</p>
291
+ <nav>
292
+ <LocalizedLink to="/about">{aboutLink}</LocalizedLink>
318
293
  </nav>
319
294
  </div>
320
295
  );
321
296
  }
322
297
  ```
323
298
 
324
- > Um mehr über den `useIntlayer` Hook zu erfahren, siehe die [Dokumentation](https://github.com/aymericzip/intlayer/blob/main/docs/docs/de/packages/react-intlayer/useIntlayer.md).
299
+ > Um mehr über den `useIntlayer` Hook zu erfahren, lesen Sie die [Dokumentation](https://github.com/aymericzip/intlayer/blob/main/docs/docs/de/packages/react-intlayer/useIntlayer.md).
325
300
 
326
301
  ### Schritt 9: Erstellen Sie eine Sprachumschalter-Komponente
327
302
 
328
303
  Erstellen Sie eine Komponente, die es Benutzern ermöglicht, die Sprache zu wechseln:
329
304
 
330
- ```tsx fileName="app/components/locale-switcher.tsx" codeFormat="typescript"
331
- import { getLocalizedUrl, getLocaleName } from "intlayer";
332
- import { useLocale } from "intlayer";
333
- import { useLocation, useNavigate } from "react-router";
305
+ ```tsx fileName="app/components/locale-switcher.tsx"
306
+ import type { FC } from "react";
334
307
 
335
- export default function LocaleSwitcher() {
336
- const { locale, availableLocales, setLocale } = useLocale();
337
- const location = useLocation();
338
- const navigate = useNavigate();
308
+ import {
309
+ getHTMLTextDir,
310
+ getLocaleName,
311
+ getLocalizedUrl,
312
+ getPathWithoutLocale,
313
+ } from "intlayer";
314
+ import { setLocaleCookie, useIntlayer, useLocale } from "react-intlayer";
315
+ import { Link, useLocation } from "react-router";
339
316
 
340
- const handleLocaleChange = (newLocale: string) => {
341
- const localizedUrl = getLocalizedUrl(
342
- location.pathname + location.search,
343
- newLocale
344
- );
345
- setLocale(newLocale);
346
- navigate(localizedUrl);
347
- };
317
+ export const LocaleSwitcher: FC = () => {
318
+ const { localeSwitcherLabel } = useIntlayer("locale-switcher");
319
+ const { pathname } = useLocation();
320
+
321
+ const { availableLocales, locale } = useLocale();
322
+
323
+ const pathWithoutLocale = getPathWithoutLocale(pathname);
348
324
 
349
325
  return (
350
- <div style={{ margin: "1rem 0" }}>
351
- <label htmlFor="locale-select">Sprache wählen: </label>
352
- <select
353
- id="locale-select"
354
- value={locale}
355
- onChange={(e) => handleLocaleChange(e.target.value)}
356
- style={{ padding: "0.25rem", marginLeft: "0.5rem" }}
357
- >
358
- {availableLocales.map((availableLocale) => (
359
- <option key={availableLocale} value={availableLocale}>
360
- {getLocaleName(availableLocale)}
361
- </option>
362
- ))}
363
- </select>
364
- </div>
326
+ <ol>
327
+ {availableLocales.map((localeItem) => (
328
+ <li key={localeItem}>
329
+ <Link
330
+ aria-current={localeItem === locale ? "page" : undefined}
331
+ aria-label={`${localeSwitcherLabel.value} ${getLocaleName(localeItem)}`}
332
+ onClick={() => setLocaleCookie(localeItem)}
333
+ to={getLocalizedUrl(pathWithoutLocale, localeItem)}
334
+ >
335
+ <span>
336
+ {/* Gebietsschema - z.B. FR */}
337
+ {localeItem}
338
+ </span>
339
+ <span>
340
+ {/* Sprache im eigenen Gebietsschema - z.B. Français */}
341
+ {getLocaleName(localeItem, locale)}
342
+ </span>
343
+ <span dir={getHTMLTextDir(localeItem)} lang={localeItem}>
344
+ {/* Sprache im aktuellen Gebietsschema - z.B. Francés mit aktuellem Gebietsschema auf Locales.SPANISH gesetzt */}
345
+ {getLocaleName(localeItem)}
346
+ </span>
347
+ <span dir="ltr" lang={Locales.ENGLISH}>
348
+ {/* Sprache auf Englisch - z.B. Französisch */}
349
+ {getLocaleName(localeItem, Locales.ENGLISH)}
350
+ </span>
351
+ </Link>
352
+ </li>
353
+ ))}
354
+ </ol>
365
355
  );
366
- }
356
+ };
367
357
  ```
368
358
 
369
- > Um mehr über den `useLocale` Hook zu erfahren, lesen Sie die [Dokumentation](https://github.com/aymericzip/intlayer/blob/main/docs/docs/de/packages/react-intlayer/useLocale.md).
359
+ > Um mehr über den `useLocale` Hook zu erfahren, siehe die [Dokumentation](https://github.com/aymericzip/intlayer/blob/main/docs/docs/de/packages/react-intlayer/useLocale.md).
370
360
 
371
361
  ### Schritt 10: HTML-Attribute-Verwaltung hinzufügen (Optional)
372
362
 
373
363
  Erstellen Sie einen Hook, um die HTML-Attribute lang und dir zu verwalten:
374
364
 
375
- ```tsx fileName="app/hooks/useI18nHTMLAttributes.tsx" codeFormat="typescript"
376
- // app/hooks/useI18nHTMLAttributes.tsx
365
+ ```tsx fileName="app/hooks/useI18nHTMLAttributes.tsx"
377
366
  import { getHTMLTextDir } from "intlayer";
378
367
  import { useEffect } from "react";
379
368
  import { useLocale } from "react-intlayer";
@@ -390,15 +379,14 @@ export const useI18nHTMLAttributes = () => {
390
379
 
391
380
  Verwenden Sie es dann in Ihrer Root-Komponente:
392
381
 
393
- ```tsx fileName="app/root.tsx" codeFormat="typescript"
394
- // app/routes/layout.tsx
382
+ ```tsx fileName="app/routes/layout.tsx"
395
383
  import { Outlet } from "react-router";
396
384
  import { IntlayerProvider } from "react-intlayer";
397
385
 
398
- import { useI18nHTMLAttributes } from "app/hooks/useI18nHTMLAttributes"; // Hook importieren
386
+ import { useI18nHTMLAttributes } from "app/hooks/useI18nHTMLAttributes"; // den Hook importieren
399
387
 
400
388
  export default function RootLayout() {
401
- useI18nHTMLAttributes(); // Hook aufrufen
389
+ useI18nHTMLAttributes(); // den Hook aufrufen
402
390
 
403
391
  return (
404
392
  <IntlayerProvider>
@@ -408,57 +396,48 @@ export default function RootLayout() {
408
396
  }
409
397
  ```
410
398
 
411
- ### Schritt 11: Erstellen und Starten Sie Ihre Anwendung
412
-
413
- Baue die Inhaltswörterbücher und starte deine Anwendung:
399
+ ### Schritt 11: Middleware hinzufügen (Optional)
414
400
 
415
- ```bash packageManager="npm"
416
- # Baue Intlayer-Wörterbücher
417
- npm run intlayer:build
401
+ Sie können auch das `intlayerMiddleware` verwenden, um serverseitiges Routing zu Ihrer Anwendung hinzuzufügen. Dieses Plugin erkennt automatisch die aktuelle Locale basierend auf der URL und setzt das entsprechende Locale-Cookie. Wenn keine Locale angegeben ist, bestimmt das Plugin die am besten geeignete Locale basierend auf den Spracheinstellungen des Browsers des Benutzers. Wenn keine Locale erkannt wird, erfolgt eine Weiterleitung zur Standard-Locale.
418
402
 
419
- # Starte den Entwicklungsserver
420
- npm run dev
421
- ```
403
+ > Beachten Sie, dass Sie, um das `intlayerMiddleware` in der Produktion zu verwenden, das Paket `vite-intlayer` von `devDependencies` zu `dependencies` verschieben müssen.
422
404
 
423
- ```bash packageManager="pnpm"
424
- # Baue Intlayer-Wörterbücher
425
- pnpm intlayer:build
405
+ ```typescript {3,7} fileName="vite.config.ts"
406
+ import { defineConfig } from "vite";
407
+ import react from "@vitejs/plugin-react-swc";
408
+ import { intlayer, intlayerMiddleware } from "vite-intlayer";
426
409
 
427
- # Starte den Entwicklungsserver
428
- pnpm dev
410
+ // https://vitejs.dev/config/
411
+ export default defineConfig({
412
+ plugins: [react(), intlayer(), intlayerMiddleware()],
413
+ });
429
414
  ```
430
415
 
431
- ```bash packageManager="yarn"
432
- # Baue Intlayer-Wörterbücher
433
- yarn intlayer:build
434
-
435
- # Starte den Entwicklungsserver
436
- yarn dev
437
- ```
416
+ ---
438
417
 
439
- ### Schritt 12: TypeScript konfigurieren (Optional)
418
+ ## TypeScript konfigurieren
440
419
 
441
- Intlayer verwendet Module Augmentation, um die Vorteile von TypeScript zu nutzen und deinen Code robuster zu machen.
420
+ Intlayer verwendet Module Augmentation, um die Vorteile von TypeScript zu nutzen und Ihren Code stabiler zu machen.
442
421
 
443
- Stelle sicher, dass deine TypeScript-Konfiguration die automatisch generierten Typen einschließt:
422
+ Stellen Sie sicher, dass Ihre TypeScript-Konfiguration die automatisch generierten Typen enthält:
444
423
 
445
424
  ```json5 fileName="tsconfig.json"
446
425
  {
447
- compilerOptions: {
448
- // ... deine bestehenden TypeScript-Konfigurationen
449
- },
426
+ // ... Ihre bestehenden Konfigurationen
450
427
  include: [
451
428
  // ... Ihre bestehenden Includes
452
- ".intlayer/**/*.ts", // Einschließen der automatisch generierten Typen
429
+ ".intlayer/**/*.ts", // Einschluss der automatisch generierten Typen
453
430
  ],
454
431
  }
455
432
  ```
456
433
 
457
- ### Git-Konfiguration
434
+ ---
435
+
436
+ ## Git-Konfiguration
458
437
 
459
- Es wird empfohlen, die von Intlayer generierten Dateien zu ignorieren. So vermeiden Sie, dass diese in Ihr Git-Repository übernommen werden.
438
+ Es wird empfohlen, die von Intlayer generierten Dateien zu ignorieren. So vermeiden Sie, dass diese versehentlich in Ihr Git-Repository committet werden.
460
439
 
461
- Fügen Sie dazu die folgenden Anweisungen in Ihre `.gitignore`-Datei ein:
440
+ Fügen Sie dazu folgende Anweisungen in Ihre `.gitignore`-Datei ein:
462
441
 
463
442
  ```plaintext fileName=".gitignore"
464
443
  # Ignoriere die von Intlayer generierten Dateien
@@ -467,35 +446,6 @@ Fügen Sie dazu die folgenden Anweisungen in Ihre `.gitignore`-Datei ein:
467
446
 
468
447
  ---
469
448
 
470
- ## Produktionsbereitstellung
471
-
472
- Beim Deployment Ihrer Anwendung:
473
-
474
- 1. **Bauen Sie Ihre Anwendung:**
475
-
476
- ```bash
477
- npm run build
478
- ```
479
-
480
- 2. **Bauen Sie die Intlayer-Wörterbücher:**
481
-
482
- ```bash
483
- npm run intlayer:build
484
- ```
485
-
486
- 3. **Verschieben Sie `vite-intlayer` in die Abhängigkeiten**, wenn Sie Middleware in der Produktion verwenden:
487
- ```bash
488
- npm install vite-intlayer --save
489
- ```
490
-
491
- Ihre Anwendung unterstützt nun:
492
-
493
- - **URL-Struktur**: `/en`, `/en/about`, `/tr`, `/tr/about`
494
- - **Automatische Spracherkennung** basierend auf den Browsereinstellungen
495
- - **Sprachbewusstes Routing** mit React Router v7
496
- - **TypeScript-Unterstützung** mit automatisch generierten Typen
497
- - **Server-seitiges Rendering** mit korrekter Sprachbehandlung
498
-
499
449
  ## VS Code Erweiterung
500
450
 
501
451
  Um Ihre Entwicklungserfahrung mit Intlayer zu verbessern, können Sie die offizielle **Intlayer VS Code Erweiterung** installieren.
@@ -506,10 +456,10 @@ Diese Erweiterung bietet:
506
456
 
507
457
  - **Autovervollständigung** für Übersetzungsschlüssel.
508
458
  - **Echtzeit-Fehlererkennung** für fehlende Übersetzungen.
509
- - **Inline-Vorschauen** der übersetzten Inhalte.
459
+ - **Inline-Vorschauen** des übersetzten Inhalts.
510
460
  - **Schnellaktionen**, um Übersetzungen einfach zu erstellen und zu aktualisieren.
511
461
 
512
- Für weitere Details zur Verwendung der Erweiterung siehe die [Intlayer VS Code Erweiterungsdokumentation](https://intlayer.org/doc/vs-code-extension).
462
+ Für weitere Details zur Nutzung der Erweiterung lesen Sie die [Intlayer VS Code Erweiterungsdokumentation](https://intlayer.org/doc/vs-code-extension).
513
463
 
514
464
  ---
515
465
 
@@ -532,6 +482,7 @@ Dieser umfassende Leitfaden bietet alles, was Sie benötigen, um Intlayer mit Re
532
482
 
533
483
  ## Dokumentationsverlauf
534
484
 
535
- | Version | Datum | Änderungen |
536
- | ------- | --------- | ------------------------------- |
537
- | 5.8.2 | 2025-09-4 | Hinzugefügt für React Router v7 |
485
+ | Version | Datum | Änderungen |
486
+ | ------- | ---------- | ------------------------------- |
487
+ | 6.1.5 | 2025-10-03 | Dokumentation aktualisiert |
488
+ | 5.8.2 | 2025-09-04 | Hinzugefügt für React Router v7 |