@intlayer/docs 8.4.10 → 8.5.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 (382) hide show
  1. package/dist/cjs/generated/docs.entry.cjs +40 -0
  2. package/dist/cjs/generated/docs.entry.cjs.map +1 -1
  3. package/dist/esm/generated/docs.entry.mjs +40 -0
  4. package/dist/esm/generated/docs.entry.mjs.map +1 -1
  5. package/dist/types/generated/docs.entry.d.ts +2 -0
  6. package/dist/types/generated/docs.entry.d.ts.map +1 -1
  7. package/docs/ar/dictionary/html.md +32 -25
  8. package/docs/ar/dictionary/markdown.md +33 -35
  9. package/docs/ar/intlayer_with_analog.md +10 -27
  10. package/docs/ar/intlayer_with_angular.md +1 -12
  11. package/docs/ar/intlayer_with_nextjs_14.md +1 -1
  12. package/docs/ar/intlayer_with_nextjs_page_router.md +1 -1
  13. package/docs/ar/intlayer_with_react_router_v7.md +6 -1
  14. package/docs/ar/intlayer_with_react_router_v7_fs_routes.md +6 -1
  15. package/docs/ar/intlayer_with_storybook.md +2 -5
  16. package/docs/ar/intlayer_with_svelte_kit.md +9 -5
  17. package/docs/ar/intlayer_with_vite+lit.md +689 -0
  18. package/docs/ar/intlayer_with_vite+react.md +16 -4
  19. package/docs/ar/intlayer_with_vite+solid.md +1 -1
  20. package/docs/ar/intlayer_with_vite+svelte.md +13 -6
  21. package/docs/ar/intlayer_with_vite+vanilla.md +722 -0
  22. package/docs/ar/intlayer_with_vite+vue.md +24 -8
  23. package/docs/ar/packages/react-intlayer/MarkdownRenderer.md +1 -1
  24. package/docs/ar/packages/svelte-intlayer/useRewriteURL.md +1 -1
  25. package/docs/ar/releases/v8.md +27 -27
  26. package/docs/bn/intlayer_with_storybook.md +2 -5
  27. package/docs/bn/intlayer_with_vite+lit.md +689 -0
  28. package/docs/bn/intlayer_with_vite+vanilla.md +722 -0
  29. package/docs/cs/intlayer_with_storybook.md +2 -5
  30. package/docs/cs/intlayer_with_vite+lit.md +689 -0
  31. package/docs/cs/intlayer_with_vite+vanilla.md +722 -0
  32. package/docs/de/compiler.md +6 -1
  33. package/docs/de/configuration.md +12 -9
  34. package/docs/de/dictionary/html.md +151 -26
  35. package/docs/de/dictionary/markdown.md +154 -42
  36. package/docs/de/intlayer_with_analog.md +10 -27
  37. package/docs/de/intlayer_with_angular.md +1 -12
  38. package/docs/de/intlayer_with_nextjs_14.md +1 -1
  39. package/docs/de/intlayer_with_nextjs_page_router.md +1 -1
  40. package/docs/de/intlayer_with_react_router_v7.md +6 -1
  41. package/docs/de/intlayer_with_react_router_v7_fs_routes.md +6 -1
  42. package/docs/de/intlayer_with_storybook.md +2 -5
  43. package/docs/de/intlayer_with_svelte_kit.md +9 -5
  44. package/docs/de/intlayer_with_vite+lit.md +698 -0
  45. package/docs/de/intlayer_with_vite+react.md +16 -4
  46. package/docs/de/intlayer_with_vite+solid.md +1 -1
  47. package/docs/de/intlayer_with_vite+svelte.md +19 -6
  48. package/docs/de/intlayer_with_vite+vanilla.md +722 -0
  49. package/docs/de/intlayer_with_vite+vue.md +24 -8
  50. package/docs/de/packages/react-intlayer/MarkdownRenderer.md +1 -1
  51. package/docs/de/packages/svelte-intlayer/useRewriteURL.md +1 -1
  52. package/docs/de/releases/v8.md +27 -27
  53. package/docs/en/compiler.md +6 -1
  54. package/docs/en/configuration.md +12 -9
  55. package/docs/en/dictionary/html.md +152 -27
  56. package/docs/en/dictionary/markdown.md +154 -38
  57. package/docs/en/intlayer_with_analog.md +10 -27
  58. package/docs/en/intlayer_with_angular.md +1 -12
  59. package/docs/en/intlayer_with_nextjs_14.md +1 -1
  60. package/docs/en/intlayer_with_nextjs_16.md +12 -3
  61. package/docs/en/intlayer_with_nextjs_compiler.md +16 -4
  62. package/docs/en/intlayer_with_nextjs_page_router.md +1 -1
  63. package/docs/en/intlayer_with_react_router_v7.md +17 -4
  64. package/docs/en/intlayer_with_react_router_v7_fs_routes.md +18 -4
  65. package/docs/en/intlayer_with_storybook.md +2 -5
  66. package/docs/en/intlayer_with_svelte_kit.md +21 -8
  67. package/docs/en/intlayer_with_tanstack.md +12 -3
  68. package/docs/en/intlayer_with_vite+lit.md +703 -0
  69. package/docs/en/intlayer_with_vite+preact.md +31 -3
  70. package/docs/en/intlayer_with_vite+react.md +28 -7
  71. package/docs/en/intlayer_with_vite+react_compiler.md +4 -1
  72. package/docs/en/intlayer_with_vite+solid.md +31 -3
  73. package/docs/en/intlayer_with_vite+svelte.md +30 -9
  74. package/docs/en/intlayer_with_vite+vanilla.md +725 -0
  75. package/docs/en/intlayer_with_vite+vue.md +41 -10
  76. package/docs/en/packages/react-intlayer/MarkdownRenderer.md +1 -1
  77. package/docs/en/packages/svelte-intlayer/useRewriteURL.md +1 -1
  78. package/docs/en/readme.md +1 -0
  79. package/docs/en/releases/v8.md +27 -27
  80. package/docs/en-GB/compiler.md +4 -1
  81. package/docs/en-GB/configuration.md +4 -1
  82. package/docs/en-GB/dictionary/html.md +32 -25
  83. package/docs/en-GB/dictionary/markdown.md +34 -36
  84. package/docs/en-GB/intlayer_with_analog.md +10 -27
  85. package/docs/en-GB/intlayer_with_angular.md +1 -12
  86. package/docs/en-GB/intlayer_with_nextjs_14.md +1 -1
  87. package/docs/en-GB/intlayer_with_nextjs_page_router.md +1 -1
  88. package/docs/en-GB/intlayer_with_react_router_v7.md +6 -1
  89. package/docs/en-GB/intlayer_with_react_router_v7_fs_routes.md +6 -1
  90. package/docs/en-GB/intlayer_with_storybook.md +2 -5
  91. package/docs/en-GB/intlayer_with_svelte_kit.md +9 -5
  92. package/docs/en-GB/intlayer_with_vite+lit.md +703 -0
  93. package/docs/en-GB/intlayer_with_vite+react.md +15 -3
  94. package/docs/en-GB/intlayer_with_vite+solid.md +1 -1
  95. package/docs/en-GB/intlayer_with_vite+svelte.md +17 -5
  96. package/docs/en-GB/intlayer_with_vite+vanilla.md +725 -0
  97. package/docs/en-GB/intlayer_with_vite+vue.md +19 -7
  98. package/docs/en-GB/packages/react-intlayer/MarkdownRenderer.md +1 -1
  99. package/docs/en-GB/packages/svelte-intlayer/useRewriteURL.md +1 -1
  100. package/docs/en-GB/releases/v8.md +27 -27
  101. package/docs/es/compiler.md +6 -1
  102. package/docs/es/configuration.md +12 -9
  103. package/docs/es/dictionary/html.md +152 -27
  104. package/docs/es/dictionary/markdown.md +155 -43
  105. package/docs/es/intlayer_with_analog.md +10 -27
  106. package/docs/es/intlayer_with_angular.md +1 -12
  107. package/docs/es/intlayer_with_nextjs_14.md +1 -1
  108. package/docs/es/intlayer_with_nextjs_page_router.md +1 -1
  109. package/docs/es/intlayer_with_react_router_v7.md +6 -1
  110. package/docs/es/intlayer_with_react_router_v7_fs_routes.md +6 -1
  111. package/docs/es/intlayer_with_storybook.md +2 -5
  112. package/docs/es/intlayer_with_svelte_kit.md +9 -5
  113. package/docs/es/intlayer_with_vite+lit.md +698 -0
  114. package/docs/es/intlayer_with_vite+react.md +16 -4
  115. package/docs/es/intlayer_with_vite+solid.md +1 -1
  116. package/docs/es/intlayer_with_vite+svelte.md +16 -6
  117. package/docs/es/intlayer_with_vite+vanilla.md +722 -0
  118. package/docs/es/intlayer_with_vite+vue.md +24 -8
  119. package/docs/es/packages/react-intlayer/MarkdownRenderer.md +1 -1
  120. package/docs/es/packages/svelte-intlayer/useRewriteURL.md +1 -1
  121. package/docs/es/releases/v8.md +27 -27
  122. package/docs/fr/compiler.md +8 -3
  123. package/docs/fr/configuration.md +12 -9
  124. package/docs/fr/dictionary/html.md +151 -26
  125. package/docs/fr/dictionary/markdown.md +155 -43
  126. package/docs/fr/intlayer_with_analog.md +10 -27
  127. package/docs/fr/intlayer_with_angular.md +1 -12
  128. package/docs/fr/intlayer_with_nextjs_14.md +1 -1
  129. package/docs/fr/intlayer_with_nextjs_page_router.md +1 -1
  130. package/docs/fr/intlayer_with_react_router_v7.md +6 -1
  131. package/docs/fr/intlayer_with_react_router_v7_fs_routes.md +6 -1
  132. package/docs/fr/intlayer_with_storybook.md +2 -5
  133. package/docs/fr/intlayer_with_svelte_kit.md +9 -5
  134. package/docs/fr/intlayer_with_vite+lit.md +698 -0
  135. package/docs/fr/intlayer_with_vite+react.md +16 -4
  136. package/docs/fr/intlayer_with_vite+solid.md +1 -1
  137. package/docs/fr/intlayer_with_vite+svelte.md +19 -6
  138. package/docs/fr/intlayer_with_vite+vanilla.md +722 -0
  139. package/docs/fr/intlayer_with_vite+vue.md +24 -8
  140. package/docs/fr/packages/react-intlayer/MarkdownRenderer.md +1 -1
  141. package/docs/fr/packages/svelte-intlayer/useRewriteURL.md +1 -1
  142. package/docs/fr/releases/v8.md +27 -27
  143. package/docs/hi/dictionary/html.md +32 -25
  144. package/docs/hi/dictionary/markdown.md +35 -37
  145. package/docs/hi/intlayer_with_analog.md +10 -27
  146. package/docs/hi/intlayer_with_angular.md +1 -12
  147. package/docs/hi/intlayer_with_nextjs_14.md +1 -1
  148. package/docs/hi/intlayer_with_nextjs_page_router.md +1 -1
  149. package/docs/hi/intlayer_with_react_router_v7.md +6 -1
  150. package/docs/hi/intlayer_with_react_router_v7_fs_routes.md +6 -1
  151. package/docs/hi/intlayer_with_storybook.md +2 -5
  152. package/docs/hi/intlayer_with_svelte_kit.md +9 -5
  153. package/docs/hi/intlayer_with_vite+lit.md +689 -0
  154. package/docs/hi/intlayer_with_vite+react.md +16 -4
  155. package/docs/hi/intlayer_with_vite+solid.md +1 -1
  156. package/docs/hi/intlayer_with_vite+svelte.md +13 -6
  157. package/docs/hi/intlayer_with_vite+vanilla.md +722 -0
  158. package/docs/hi/intlayer_with_vite+vue.md +24 -8
  159. package/docs/hi/packages/react-intlayer/MarkdownRenderer.md +1 -1
  160. package/docs/hi/packages/svelte-intlayer/useRewriteURL.md +1 -1
  161. package/docs/hi/releases/v8.md +27 -27
  162. package/docs/id/dictionary/html.md +32 -25
  163. package/docs/id/dictionary/markdown.md +35 -37
  164. package/docs/id/intlayer_with_analog.md +10 -27
  165. package/docs/id/intlayer_with_angular.md +1 -12
  166. package/docs/id/intlayer_with_nextjs_14.md +1 -1
  167. package/docs/id/intlayer_with_nextjs_page_router.md +1 -1
  168. package/docs/id/intlayer_with_react_router_v7.md +6 -1
  169. package/docs/id/intlayer_with_react_router_v7_fs_routes.md +6 -1
  170. package/docs/id/intlayer_with_storybook.md +2 -5
  171. package/docs/id/intlayer_with_svelte_kit.md +9 -5
  172. package/docs/id/intlayer_with_vite+lit.md +689 -0
  173. package/docs/id/intlayer_with_vite+react.md +16 -4
  174. package/docs/id/intlayer_with_vite+solid.md +1 -1
  175. package/docs/id/intlayer_with_vite+svelte.md +13 -6
  176. package/docs/id/intlayer_with_vite+vanilla.md +722 -0
  177. package/docs/id/intlayer_with_vite+vue.md +19 -7
  178. package/docs/id/packages/react-intlayer/MarkdownRenderer.md +1 -1
  179. package/docs/id/packages/svelte-intlayer/useRewriteURL.md +1 -1
  180. package/docs/id/releases/v8.md +27 -27
  181. package/docs/it/compiler.md +8 -3
  182. package/docs/it/configuration.md +12 -9
  183. package/docs/it/dictionary/html.md +151 -26
  184. package/docs/it/dictionary/markdown.md +155 -39
  185. package/docs/it/intlayer_with_analog.md +10 -27
  186. package/docs/it/intlayer_with_angular.md +1 -12
  187. package/docs/it/intlayer_with_nextjs_14.md +1 -1
  188. package/docs/it/intlayer_with_nextjs_page_router.md +1 -1
  189. package/docs/it/intlayer_with_react_router_v7.md +6 -1
  190. package/docs/it/intlayer_with_react_router_v7_fs_routes.md +6 -1
  191. package/docs/it/intlayer_with_storybook.md +2 -5
  192. package/docs/it/intlayer_with_svelte_kit.md +9 -5
  193. package/docs/it/intlayer_with_vite+lit.md +698 -0
  194. package/docs/it/intlayer_with_vite+react.md +16 -4
  195. package/docs/it/intlayer_with_vite+solid.md +1 -1
  196. package/docs/it/intlayer_with_vite+svelte.md +13 -6
  197. package/docs/it/intlayer_with_vite+vanilla.md +722 -0
  198. package/docs/it/intlayer_with_vite+vue.md +24 -8
  199. package/docs/it/packages/react-intlayer/MarkdownRenderer.md +1 -1
  200. package/docs/it/packages/svelte-intlayer/useRewriteURL.md +1 -1
  201. package/docs/it/releases/v8.md +27 -27
  202. package/docs/ja/dictionary/html.md +153 -29
  203. package/docs/ja/dictionary/markdown.md +154 -42
  204. package/docs/ja/intlayer_with_analog.md +10 -27
  205. package/docs/ja/intlayer_with_angular.md +1 -12
  206. package/docs/ja/intlayer_with_nextjs_14.md +1 -1
  207. package/docs/ja/intlayer_with_nextjs_page_router.md +1 -1
  208. package/docs/ja/intlayer_with_react_router_v7.md +6 -1
  209. package/docs/ja/intlayer_with_react_router_v7_fs_routes.md +6 -1
  210. package/docs/ja/intlayer_with_storybook.md +2 -5
  211. package/docs/ja/intlayer_with_vite+lit.md +698 -0
  212. package/docs/ja/intlayer_with_vite+solid.md +1 -1
  213. package/docs/ja/intlayer_with_vite+svelte.md +13 -6
  214. package/docs/ja/intlayer_with_vite+vanilla.md +722 -0
  215. package/docs/ja/intlayer_with_vite+vue.md +24 -8
  216. package/docs/ja/packages/react-intlayer/MarkdownRenderer.md +1 -1
  217. package/docs/ja/packages/svelte-intlayer/useRewriteURL.md +1 -1
  218. package/docs/ja/releases/v8.md +27 -27
  219. package/docs/ko/dictionary/html.md +154 -30
  220. package/docs/ko/dictionary/markdown.md +155 -43
  221. package/docs/ko/intlayer_with_analog.md +10 -27
  222. package/docs/ko/intlayer_with_angular.md +1 -12
  223. package/docs/ko/intlayer_with_nextjs_14.md +1 -1
  224. package/docs/ko/intlayer_with_nextjs_page_router.md +1 -1
  225. package/docs/ko/intlayer_with_react_router_v7.md +6 -1
  226. package/docs/ko/intlayer_with_react_router_v7_fs_routes.md +6 -1
  227. package/docs/ko/intlayer_with_storybook.md +2 -5
  228. package/docs/ko/intlayer_with_svelte_kit.md +9 -5
  229. package/docs/ko/intlayer_with_vite+lit.md +698 -0
  230. package/docs/ko/intlayer_with_vite+react.md +16 -4
  231. package/docs/ko/intlayer_with_vite+solid.md +1 -1
  232. package/docs/ko/intlayer_with_vite+svelte.md +13 -6
  233. package/docs/ko/intlayer_with_vite+vanilla.md +722 -0
  234. package/docs/ko/intlayer_with_vite+vue.md +24 -8
  235. package/docs/ko/packages/react-intlayer/MarkdownRenderer.md +1 -1
  236. package/docs/ko/packages/svelte-intlayer/useRewriteURL.md +1 -1
  237. package/docs/ko/releases/v8.md +27 -27
  238. package/docs/nl/intlayer_with_storybook.md +2 -5
  239. package/docs/nl/intlayer_with_vite+lit.md +689 -0
  240. package/docs/nl/intlayer_with_vite+vanilla.md +722 -0
  241. package/docs/pl/dictionary/html.md +151 -26
  242. package/docs/pl/dictionary/markdown.md +155 -43
  243. package/docs/pl/intlayer_with_analog.md +10 -27
  244. package/docs/pl/intlayer_with_angular.md +1 -12
  245. package/docs/pl/intlayer_with_nextjs_14.md +1 -1
  246. package/docs/pl/intlayer_with_nextjs_page_router.md +1 -1
  247. package/docs/pl/intlayer_with_react_router_v7.md +6 -1
  248. package/docs/pl/intlayer_with_react_router_v7_fs_routes.md +6 -1
  249. package/docs/pl/intlayer_with_storybook.md +2 -5
  250. package/docs/pl/intlayer_with_svelte_kit.md +9 -5
  251. package/docs/pl/intlayer_with_vite+lit.md +689 -0
  252. package/docs/pl/intlayer_with_vite+react.md +16 -4
  253. package/docs/pl/intlayer_with_vite+solid.md +1 -1
  254. package/docs/pl/intlayer_with_vite+svelte.md +13 -6
  255. package/docs/pl/intlayer_with_vite+vanilla.md +722 -0
  256. package/docs/pl/intlayer_with_vite+vue.md +19 -7
  257. package/docs/pl/packages/react-intlayer/MarkdownRenderer.md +1 -1
  258. package/docs/pl/packages/svelte-intlayer/useRewriteURL.md +1 -1
  259. package/docs/pl/releases/v8.md +27 -27
  260. package/docs/pt/compiler.md +7 -2
  261. package/docs/pt/configuration.md +11 -9
  262. package/docs/pt/dictionary/html.md +132 -26
  263. package/docs/pt/dictionary/markdown.md +155 -43
  264. package/docs/pt/intlayer_with_analog.md +10 -27
  265. package/docs/pt/intlayer_with_angular.md +1 -12
  266. package/docs/pt/intlayer_with_nextjs_14.md +1 -1
  267. package/docs/pt/intlayer_with_nextjs_page_router.md +1 -1
  268. package/docs/pt/intlayer_with_react_router_v7.md +6 -1
  269. package/docs/pt/intlayer_with_react_router_v7_fs_routes.md +6 -1
  270. package/docs/pt/intlayer_with_storybook.md +2 -5
  271. package/docs/pt/intlayer_with_svelte_kit.md +9 -5
  272. package/docs/pt/intlayer_with_vite+lit.md +698 -0
  273. package/docs/pt/intlayer_with_vite+react.md +16 -4
  274. package/docs/pt/intlayer_with_vite+solid.md +1 -1
  275. package/docs/pt/intlayer_with_vite+svelte.md +16 -6
  276. package/docs/pt/intlayer_with_vite+vanilla.md +722 -0
  277. package/docs/pt/intlayer_with_vite+vue.md +24 -8
  278. package/docs/pt/packages/react-intlayer/MarkdownRenderer.md +1 -1
  279. package/docs/pt/packages/svelte-intlayer/useRewriteURL.md +1 -1
  280. package/docs/pt/releases/v8.md +27 -27
  281. package/docs/ru/dictionary/html.md +153 -29
  282. package/docs/ru/dictionary/markdown.md +155 -41
  283. package/docs/ru/intlayer_with_analog.md +10 -27
  284. package/docs/ru/intlayer_with_angular.md +1 -12
  285. package/docs/ru/intlayer_with_nextjs_14.md +1 -1
  286. package/docs/ru/intlayer_with_nextjs_page_router.md +1 -1
  287. package/docs/ru/intlayer_with_react_router_v7.md +6 -1
  288. package/docs/ru/intlayer_with_react_router_v7_fs_routes.md +6 -1
  289. package/docs/ru/intlayer_with_storybook.md +2 -5
  290. package/docs/ru/intlayer_with_svelte_kit.md +9 -5
  291. package/docs/ru/intlayer_with_vite+lit.md +698 -0
  292. package/docs/ru/intlayer_with_vite+react.md +16 -4
  293. package/docs/ru/intlayer_with_vite+solid.md +1 -1
  294. package/docs/ru/intlayer_with_vite+svelte.md +13 -6
  295. package/docs/ru/intlayer_with_vite+vanilla.md +722 -0
  296. package/docs/ru/intlayer_with_vite+vue.md +24 -8
  297. package/docs/ru/packages/react-intlayer/MarkdownRenderer.md +1 -1
  298. package/docs/ru/packages/svelte-intlayer/useRewriteURL.md +1 -1
  299. package/docs/ru/releases/v8.md +27 -27
  300. package/docs/tr/dictionary/html.md +134 -29
  301. package/docs/tr/dictionary/markdown.md +155 -41
  302. package/docs/tr/intlayer_with_analog.md +10 -27
  303. package/docs/tr/intlayer_with_angular.md +1 -12
  304. package/docs/tr/intlayer_with_nextjs_14.md +1 -1
  305. package/docs/tr/intlayer_with_nextjs_page_router.md +1 -1
  306. package/docs/tr/intlayer_with_react_router_v7.md +6 -1
  307. package/docs/tr/intlayer_with_react_router_v7_fs_routes.md +6 -1
  308. package/docs/tr/intlayer_with_storybook.md +2 -5
  309. package/docs/tr/intlayer_with_svelte_kit.md +9 -5
  310. package/docs/tr/intlayer_with_vite+lit.md +689 -0
  311. package/docs/tr/intlayer_with_vite+react.md +16 -4
  312. package/docs/tr/intlayer_with_vite+solid.md +1 -1
  313. package/docs/tr/intlayer_with_vite+svelte.md +13 -6
  314. package/docs/tr/intlayer_with_vite+vanilla.md +722 -0
  315. package/docs/tr/intlayer_with_vite+vue.md +19 -7
  316. package/docs/tr/packages/react-intlayer/MarkdownRenderer.md +1 -1
  317. package/docs/tr/packages/svelte-intlayer/useRewriteURL.md +1 -1
  318. package/docs/tr/releases/v8.md +27 -27
  319. package/docs/uk/dictionary/html.md +32 -25
  320. package/docs/uk/dictionary/markdown.md +35 -37
  321. package/docs/uk/intlayer_with_analog.md +10 -27
  322. package/docs/uk/intlayer_with_angular.md +1 -12
  323. package/docs/uk/intlayer_with_nextjs_14.md +1 -1
  324. package/docs/uk/intlayer_with_nextjs_page_router.md +1 -1
  325. package/docs/uk/intlayer_with_react_router_v7.md +5 -1
  326. package/docs/uk/intlayer_with_react_router_v7_fs_routes.md +6 -1
  327. package/docs/uk/intlayer_with_storybook.md +2 -5
  328. package/docs/uk/intlayer_with_svelte_kit.md +9 -5
  329. package/docs/uk/intlayer_with_vite+lit.md +689 -0
  330. package/docs/uk/intlayer_with_vite+react.md +16 -4
  331. package/docs/uk/intlayer_with_vite+solid.md +1 -1
  332. package/docs/uk/intlayer_with_vite+svelte.md +18 -6
  333. package/docs/uk/intlayer_with_vite+vanilla.md +722 -0
  334. package/docs/uk/intlayer_with_vite+vue.md +19 -7
  335. package/docs/uk/packages/react-intlayer/MarkdownRenderer.md +1 -1
  336. package/docs/uk/packages/svelte-intlayer/useRewriteURL.md +1 -1
  337. package/docs/uk/releases/v8.md +27 -27
  338. package/docs/ur/intlayer_with_storybook.md +2 -5
  339. package/docs/ur/intlayer_with_vite+lit.md +689 -0
  340. package/docs/ur/intlayer_with_vite+vanilla.md +722 -0
  341. package/docs/vi/dictionary/html.md +32 -25
  342. package/docs/vi/dictionary/markdown.md +35 -37
  343. package/docs/vi/intlayer_with_analog.md +10 -27
  344. package/docs/vi/intlayer_with_angular.md +1 -12
  345. package/docs/vi/intlayer_with_nextjs_14.md +1 -1
  346. package/docs/vi/intlayer_with_nextjs_page_router.md +1 -1
  347. package/docs/vi/intlayer_with_react_router_v7.md +6 -1
  348. package/docs/vi/intlayer_with_react_router_v7_fs_routes.md +6 -1
  349. package/docs/vi/intlayer_with_storybook.md +2 -5
  350. package/docs/vi/intlayer_with_svelte_kit.md +9 -5
  351. package/docs/vi/intlayer_with_vite+lit.md +689 -0
  352. package/docs/vi/intlayer_with_vite+react.md +16 -4
  353. package/docs/vi/intlayer_with_vite+solid.md +1 -1
  354. package/docs/vi/intlayer_with_vite+svelte.md +17 -5
  355. package/docs/vi/intlayer_with_vite+vanilla.md +722 -0
  356. package/docs/vi/intlayer_with_vite+vue.md +19 -7
  357. package/docs/vi/packages/react-intlayer/MarkdownRenderer.md +1 -1
  358. package/docs/vi/packages/svelte-intlayer/useRewriteURL.md +1 -1
  359. package/docs/vi/releases/v8.md +27 -27
  360. package/docs/zh/compiler.md +8 -3
  361. package/docs/zh/configuration.md +4 -1
  362. package/docs/zh/dictionary/html.md +153 -29
  363. package/docs/zh/dictionary/markdown.md +155 -39
  364. package/docs/zh/intlayer_with_analog.md +10 -27
  365. package/docs/zh/intlayer_with_angular.md +1 -12
  366. package/docs/zh/intlayer_with_nextjs_14.md +1 -1
  367. package/docs/zh/intlayer_with_nextjs_page_router.md +1 -1
  368. package/docs/zh/intlayer_with_react_router_v7.md +6 -1
  369. package/docs/zh/intlayer_with_react_router_v7_fs_routes.md +6 -1
  370. package/docs/zh/intlayer_with_storybook.md +2 -5
  371. package/docs/zh/intlayer_with_svelte_kit.md +9 -5
  372. package/docs/zh/intlayer_with_vite+lit.md +698 -0
  373. package/docs/zh/intlayer_with_vite+react.md +16 -4
  374. package/docs/zh/intlayer_with_vite+solid.md +1 -1
  375. package/docs/zh/intlayer_with_vite+svelte.md +16 -6
  376. package/docs/zh/intlayer_with_vite+vanilla.md +722 -0
  377. package/docs/zh/intlayer_with_vite+vue.md +19 -7
  378. package/docs/zh/packages/react-intlayer/MarkdownRenderer.md +1 -1
  379. package/docs/zh/packages/svelte-intlayer/useRewriteURL.md +1 -1
  380. package/docs/zh/releases/v8.md +27 -27
  381. package/package.json +6 -6
  382. package/src/generated/docs.entry.ts +40 -0
@@ -0,0 +1,698 @@
1
+ ---
2
+ createdAt: 2026-03-23
3
+ updatedAt: 2026-03-23
4
+ title: i18n Vite + Lit - Comment traduire une application Lit en 2026
5
+ description: Découvrez comment rendre votre site web Vite et Lit multilingue. Suivez la documentation pour l'internationaliser (i18n) et le traduire.
6
+ keywords:
7
+ - Internationalisation
8
+ - Documentation
9
+ - Intlayer
10
+ - Vite
11
+ - Lit
12
+ - Web Components
13
+ - JavaScript
14
+ slugs:
15
+ - doc
16
+ - environment
17
+ - vite-and-lit
18
+ applicationTemplate: https://github.com/aymericzip/intlayer-vite-lit-template
19
+ history:
20
+ - version: 8.4.10
21
+ date: 2026-03-23
22
+ changes: "Init history"
23
+ ---
24
+
25
+ # Traduisez votre site web Vite et Lit en utilisant Intlayer | Internationalisation (i18n)
26
+
27
+ <iframe
28
+ src="https://stackblitz.com/github/aymericzip/intlayer-vite-lit-template?embed=1&ctl=1&file=intlayer.config.ts"
29
+ className="m-auto overflow-hidden rounded-lg border-0 max-md:size-full max-md:h-[700px] md:aspect-16/9 md:w-full"
30
+ title="Demo CodeSandbox - How to Internationalize your application using Intlayer"
31
+ sandbox="allow-forms allow-modals allow-popups allow-presentation allow-same-origin allow-scripts"
32
+ loading="lazy"
33
+ />
34
+
35
+ ## Table des matières
36
+
37
+ <TOC/>
38
+
39
+ ## Qu'est-ce qu'Intlayer ?
40
+
41
+ **Intlayer** est une bibliothèque d'internationalisation (i18n) innovante et open-source conçue pour simplifier le support multilingue dans les applications web modernes.
42
+
43
+ Avec Intlayer, vous pouvez :
44
+
45
+ - **Gérer facilement les traductions** en utilisant des dictionnaires déclaratifs au niveau des composants.
46
+ - **Localiser dynamiquement les métadonnées**, les routes et le contenu.
47
+ - **Assurer le support TypeScript** avec des types autogénérés, améliorant l'autocomplétion et la détection d'erreurs.
48
+ - **Bénéficier de fonctionnalités avancées**, comme la détection et le changement dynamique de langue.
49
+
50
+ ---
51
+
52
+ ## Guide étape par étape pour configurer Intlayer dans une application Vite et Lit
53
+
54
+ ### Étape 1 : Installer les dépendances
55
+
56
+ Installez les paquets nécessaires en utilisant npm :
57
+
58
+ ```bash packageManager="npm"
59
+ npm install intlayer lit-intlayer
60
+ npm install vite-intlayer --save-dev
61
+ npx intlayer init
62
+ ```
63
+
64
+ ```bash packageManager="pnpm"
65
+ pnpm add intlayer lit-intlayer
66
+ pnpm add vite-intlayer --save-dev
67
+ pnpm intlayer init
68
+ ```
69
+
70
+ ```bash packageManager="yarn"
71
+ yarn add intlayer lit-intlayer
72
+ yarn add vite-intlayer --save-dev
73
+ yarn intlayer init
74
+ ```
75
+
76
+ ```bash packageManager="bun"
77
+ bun add intlayer lit-intlayer
78
+ bun add vite-intlayer --dev
79
+ bunx intlayer init
80
+ ```
81
+
82
+ - **intlayer**
83
+
84
+ Le paquet principal qui fournit des outils d'internationalisation pour la gestion de la configuration, la traduction, la [déclaration de contenu](https://github.com/aymericzip/intlayer/blob/main/docs/docs/fr/dictionary/content_file.md), la transpilation et les [commandes CLI](https://github.com/aymericzip/intlayer/blob/main/docs/docs/fr/cli/index.md).
85
+
86
+ - **lit-intlayer**
87
+ Le paquet qui intègre Intlayer aux applications Lit. Il fournit des hooks basés sur `ReactiveController` (`useIntlayer`, `useLocale`, etc.) pour que les LitElements se re-rendent automatiquement lorsque la langue change.
88
+
89
+ - **vite-intlayer**
90
+ Comprend le plugin Vite pour intégrer Intlayer avec le [bundler Vite](https://vite.dev/guide/why.html#why-bundle-for-production), ainsi qu'un middleware pour détecter la langue préférée de l'utilisateur, gérer les cookies et gérer la redirection d'URL.
91
+
92
+ ### Étape 2 : Configuration de votre projet
93
+
94
+ Créez un fichier de configuration pour configurer les langues de votre application :
95
+
96
+ ```typescript fileName="intlayer.config.ts" codeFormat="typescript"
97
+ import { Locales, type IntlayerConfig } from "intlayer";
98
+
99
+ const config: IntlayerConfig = {
100
+ internationalization: {
101
+ locales: [
102
+ Locales.ENGLISH,
103
+ Locales.FRENCH,
104
+ Locales.SPANISH,
105
+ // Vos autres langues
106
+ ],
107
+ defaultLocale: Locales.ENGLISH,
108
+ },
109
+ };
110
+
111
+ export default config;
112
+ ```
113
+
114
+ ```javascript fileName="intlayer.config.mjs" codeFormat="esm"
115
+ import { Locales } from "intlayer";
116
+
117
+ /** @type {import('intlayer').IntlayerConfig} */
118
+ const config = {
119
+ internationalization: {
120
+ locales: [
121
+ Locales.ENGLISH,
122
+ Locales.FRENCH,
123
+ Locales.SPANISH,
124
+ // Vos autres langues
125
+ ],
126
+ defaultLocale: Locales.ENGLISH,
127
+ },
128
+ };
129
+
130
+ export default config;
131
+ ```
132
+
133
+ ```javascript fileName="intlayer.config.cjs" codeFormat="commonjs"
134
+ const { Locales } = require("intlayer");
135
+
136
+ /** @type {import('intlayer').IntlayerConfig} */
137
+ const config = {
138
+ internationalization: {
139
+ locales: [
140
+ Locales.ENGLISH,
141
+ Locales.FRENCH,
142
+ Locales.SPANISH,
143
+ // Vos autres langues
144
+ ],
145
+ defaultLocale: Locales.ENGLISH,
146
+ },
147
+ };
148
+
149
+ module.exports = config;
150
+ ```
151
+
152
+ > Via ce fichier de configuration, vous pouvez configurer les URL localisées, la redirection du middleware, les noms des cookies, l'emplacement et l'extension de vos déclarations de contenu, désactiver les logs Intlayer dans la console, et plus encore. Pour une liste complète des paramètres disponibles, reportez-vous à la [documentation de configuration](https://github.com/aymericzip/intlayer/blob/main/docs/docs/fr/configuration.md).
153
+
154
+ ### Étape 3 : Intégrer Intlayer dans votre configuration Vite
155
+
156
+ Ajoutez le plugin intlayer dans votre configuration.
157
+
158
+ ```typescript fileName="vite.config.ts" codeFormat="typescript"
159
+ import { defineConfig } from "vite";
160
+ import { intlayer } from "vite-intlayer";
161
+
162
+ // https://vitejs.dev/config/
163
+ export default defineConfig({
164
+ plugins: [intlayer()],
165
+ });
166
+ ```
167
+
168
+ ```javascript fileName="vite.config.mjs" codeFormat="esm"
169
+ import { defineConfig } from "vite";
170
+ import { intlayer } from "vite-intlayer";
171
+
172
+ // https://vitejs.dev/config/
173
+ export default defineConfig({
174
+ plugins: [intlayer()],
175
+ });
176
+ ```
177
+
178
+ ```javascript fileName="vite.config.cjs" codeFormat="commonjs"
179
+ const { defineConfig } = require("vite");
180
+ const { intlayer } = require("vite-intlayer");
181
+
182
+ // https://vitejs.dev/config/
183
+ module.exports = defineConfig({
184
+ plugins: [intlayer()],
185
+ });
186
+ ```
187
+
188
+ > Le plugin Vite `intlayer()` est utilisé pour intégrer Intlayer avec Vite. Il assure la construction des fichiers de déclaration de contenu et les surveille en mode développement. Il définit les variables d'environnement Intlayer dans l'application Vite. De plus, il fournit des alias pour optimiser les performances.
189
+
190
+ ### Étape 4 : Initialiser Intlayer dans votre point d'entrée
191
+
192
+ Appelez `installIntlayer()` **avant** que les éléments personnalisés ne soient enregistrés pour que le singleton global de langue soit prêt lorsque le premier élément se connecte.
193
+
194
+ ```typescript fileName="src/main.ts" codeFormat="typescript"
195
+ import { installIntlayer } from "lit-intlayer";
196
+
197
+ // Doit être appelé avant qu'un LitElement ne soit connecté au DOM.
198
+ installIntlayer();
199
+
200
+ // Importez et enregistrez vos éléments personnalisés.
201
+ import "./my-element.js";
202
+ ```
203
+
204
+ Si vous utilisez également des déclarations de contenu `md()` (Markdown), installez également le moteur de rendu markdown :
205
+
206
+ ```typescript fileName="src/main.ts" codeFormat="typescript"
207
+ import { installIntlayer, installIntlayerMarkdown } from "lit-intlayer";
208
+
209
+ installIntlayer();
210
+ installIntlayerMarkdown();
211
+
212
+ import "./my-element.js";
213
+ ```
214
+
215
+ ### Étape 5 : Déclarer votre contenu
216
+
217
+ Créez et gérez vos déclarations de contenu pour stocker les traductions :
218
+
219
+ ```typescript fileName="src/app.content.ts" contentDeclarationFormat="typescript"
220
+ import { t, type Dictionary } from "intlayer";
221
+
222
+ const appContent = {
223
+ key: "app",
224
+ content: {
225
+ title: "Vite + Lit",
226
+
227
+ viteLogo: t({
228
+ en: "Vite logo",
229
+ fr: "Logo Vite",
230
+ es: "Logo Vite",
231
+ }),
232
+ litLogo: t({
233
+ en: "Lit logo",
234
+ fr: "Logo Lit",
235
+ es: "Logo Lit",
236
+ }),
237
+
238
+ count: t({
239
+ en: "count is {{count}}",
240
+ fr: "le compte est {{count}}",
241
+ es: "el recuento es {{count}}",
242
+ }),
243
+
244
+ readTheDocs: t({
245
+ en: "Click on the Vite and Lit logos to learn more",
246
+ fr: "Cliquez sur les logos Vite et Lit pour en savoir plus",
247
+ es: "Haga clic en los logotipos de Vite y Lit para obtener más información",
248
+ }),
249
+ },
250
+ } satisfies Dictionary;
251
+
252
+ export default appContent;
253
+ ```
254
+
255
+ ```javascript fileName="src/app.content.mjs" contentDeclarationFormat="esm"
256
+ import { t } from "intlayer";
257
+
258
+ /** @type {import('intlayer').Dictionary} */
259
+ const appContent = {
260
+ key: "app",
261
+ content: {
262
+ title: "Vite + Lit",
263
+
264
+ viteLogo: t({
265
+ en: "Vite logo",
266
+ fr: "Logo Vite",
267
+ es: "Logo Vite",
268
+ }),
269
+ litLogo: t({
270
+ en: "Lit logo",
271
+ fr: "Logo Lit",
272
+ es: "Logo Lit",
273
+ }),
274
+
275
+ count: t({
276
+ en: "count is {{count}}",
277
+ fr: "le compte est {{count}}",
278
+ es: "el recuento es {{count}}",
279
+ }),
280
+
281
+ readTheDocs: t({
282
+ en: "Click on the Vite and Lit logos to learn more",
283
+ fr: "Cliquez sur les logos Vite et Lit pour en savoir plus",
284
+ es: "Haga clic en los logotipos de Vite y Lit para obtener más información",
285
+ }),
286
+ },
287
+ };
288
+
289
+ export default appContent;
290
+ ```
291
+
292
+ ```javascript fileName="src/app.content.cjs" contentDeclarationFormat="commonjs"
293
+ const { t } = require("intlayer");
294
+
295
+ /** @type {import('intlayer').Dictionary} */
296
+ const appContent = {
297
+ key: "app",
298
+ content: {
299
+ title: "Vite + Lit",
300
+
301
+ viteLogo: t({
302
+ en: "Vite logo",
303
+ fr: "Logo Vite",
304
+ es: "Logo Vite",
305
+ }),
306
+ litLogo: t({
307
+ en: "Lit logo",
308
+ fr: "Logo Lit",
309
+ es: "Logo Lit",
310
+ }),
311
+
312
+ count: t({
313
+ en: "count is {{count}}",
314
+ fr: "le compte est {{count}}",
315
+ es: "el recuento es {{count}}",
316
+ }),
317
+
318
+ readTheDocs: t({
319
+ en: "Click on the Vite and Lit logos to learn more",
320
+ fr: "Cliquez sur les logos Vite et Lit pour en savoir plus",
321
+ es: "Haga clic en los logotipos de Vite y Lit para obtener más información",
322
+ }),
323
+ },
324
+ };
325
+
326
+ module.exports = appContent;
327
+ ```
328
+
329
+ ```json fileName="src/app.content.json" contentDeclarationFormat="json"
330
+ {
331
+ "$schema": "https://intlayer.org/schema.json",
332
+ "key": "app",
333
+ "content": {
334
+ "title": "Vite + Lit",
335
+ "viteLogo": {
336
+ "nodeType": "translation",
337
+ "translation": {
338
+ "en": "Vite logo",
339
+ "fr": "Logo Vite",
340
+ "es": "Logo Vite"
341
+ }
342
+ },
343
+ "litLogo": {
344
+ "nodeType": "translation",
345
+ "translation": {
346
+ "en": "Lit logo",
347
+ "fr": "Logo Lit",
348
+ "es": "Logo Lit"
349
+ }
350
+ },
351
+ "count": {
352
+ "nodeType": "translation",
353
+ "translation": {
354
+ "en": "count is {{count}}",
355
+ "fr": "le compte est {{count}}",
356
+ "es": "el recuento es {{count}}"
357
+ }
358
+ },
359
+ "readTheDocs": {
360
+ "nodeType": "translation",
361
+ "translation": {
362
+ "en": "Click on the Vite and Lit logos to learn more",
363
+ "fr": "Cliquez sur les logos Vite et Lit pour en savoir plus",
364
+ "es": "Haga clic en los logotipos de Vite y Lit para obtener más información"
365
+ }
366
+ }
367
+ }
368
+ }
369
+ ```
370
+
371
+ > Vos déclarations de contenu peuvent être définies n'importe où dans votre application dès qu'elles sont incluses dans le répertoire `contentDir` (par défaut, `./src`) et correspondent à l'extension du fichier de déclaration de contenu (par défaut, `.content.{json,ts,tsx,js,jsx,mjs,cjs}`).
372
+ >
373
+ > Pour plus de détails, reportez-vous à la [documentation sur la déclaration de contenu](https://github.com/aymericzip/intlayer/blob/main/docs/docs/fr/dictionary/content_file.md).
374
+
375
+ ### Étape 6 : Utiliser Intlayer dans votre LitElement
376
+
377
+ Utilisez `useIntlayer` à l'intérieur d'un `LitElement`. Il renvoie un proxy `ReactiveController` qui déclenche automatiquement des re-rendus dès que la langue active change — aucune configuration supplémentaire n'est requise.
378
+
379
+ ```typescript fileName="src/my-element.ts" codeFormat="typescript"
380
+ import { LitElement, html } from "lit";
381
+ import { customElement, property } from "lit/decorators.js";
382
+ import { useIntlayer } from "lit-intlayer";
383
+
384
+ @customElement("my-element")
385
+ export class MyElement extends LitElement {
386
+ @property({ type: Number })
387
+ count = 0;
388
+
389
+ // useIntlayer s'enregistre en tant que ReactiveController.
390
+ // L'élément se re-rend automatiquement lorsque la langue change.
391
+ private content = useIntlayer(this, "app");
392
+
393
+ override render() {
394
+ const { content } = this;
395
+
396
+ return html`
397
+ <h1>${content.title}</h1>
398
+
399
+ <img src="/vite.svg" alt=${content.viteLogo.value} />
400
+ <img src="/lit.svg" alt=${content.litLogo.value} />
401
+
402
+ <button @click=${() => this.count++}>
403
+ ${content.count({ count: this.count })}
404
+ </button>
405
+
406
+ <p>${content.readTheDocs}</p>
407
+ `;
408
+ }
409
+ }
410
+ ```
411
+
412
+ > [!NOTE]
413
+ > Lorsque vous avez besoin de la chaîne traduite dans un attribut HTML natif (ex: `alt`, `aria-label`, `title`), appelez `.value` sur le nœud terminal :
414
+ >
415
+ > ```typescript
416
+ > html`<img alt=${content.viteLogo.value} />`;
417
+ > ```
418
+
419
+ ### (Optionnel) Étape 7 : Changer la langue de votre contenu
420
+
421
+ Pour changer la langue de votre contenu, utilisez la méthode `setLocale` exposée par le contrôleur `useLocale`.
422
+
423
+ ```typescript fileName="src/locale-switcher.ts" codeFormat="typescript"
424
+ import { LitElement, html } from "lit";
425
+ import { customElement } from "lit/decorators.js";
426
+ import { getLocaleName } from "intlayer";
427
+ import { useLocale } from "lit-intlayer";
428
+
429
+ @customElement("locale-switcher")
430
+ export class LocaleSwitcher extends LitElement {
431
+ private locale = useLocale(this);
432
+
433
+ private _onChange(e: Event) {
434
+ const select = e.target as HTMLSelectElement;
435
+ this.locale.setLocale(select.value as any);
436
+ }
437
+
438
+ override render() {
439
+ return html`
440
+ <select @change=${this._onChange}>
441
+ ${this.locale.availableLocales.map(
442
+ (loc) => html`
443
+ <option value=${loc} ?selected=${loc === this.locale.locale}>
444
+ ${getLocaleName(loc)}
445
+ </option>
446
+ `
447
+ )}
448
+ </select>
449
+ `;
450
+ }
451
+ }
452
+ ```
453
+
454
+ ### (Optionnel) Étape 8 : Rendre du contenu Markdown et HTML
455
+
456
+ Intlayer prend en charge les déclarations de contenu `md()` et `html()`. Dans Lit, le résultat compilé est injecté en tant que HTML brut via la directive `unsafeHTML`.
457
+
458
+ ```typescript fileName="src/app.content.ts" contentDeclarationFormat="typescript"
459
+ import { md, t, type Dictionary } from "intlayer";
460
+
461
+ const appContent = {
462
+ key: "app",
463
+ content: {
464
+ // ...
465
+ editNote: md(
466
+ t({
467
+ en: "Edit `src/my-element.ts` and save to test **HMR**",
468
+ fr: "Modifiez `src/my-element.ts` et enregistrez pour tester **HMR**",
469
+ es: "Edite `src/my-element.ts` y guarde para probar **HMR**",
470
+ })
471
+ ),
472
+ },
473
+ } satisfies Dictionary;
474
+
475
+ export default appContent;
476
+ ```
477
+
478
+ Rendez le HTML compilé dans votre élément :
479
+
480
+ ```typescript fileName="src/my-element.ts" codeFormat="typescript"
481
+ import { LitElement, html } from "lit";
482
+ import { customElement } from "lit/decorators.js";
483
+ import { unsafeHTML } from "lit/directives/unsafe-html.js";
484
+ import { useIntlayer } from "lit-intlayer";
485
+ import { compileMarkdown } from "lit-intlayer/markdown";
486
+
487
+ @customElement("my-element")
488
+ export class MyElement extends LitElement {
489
+ private content = useIntlayer(this, "app");
490
+
491
+ override render() {
492
+ return html`
493
+ <div class="edit-note">
494
+ ${unsafeHTML(compileMarkdown(String(this.content.editNote)))}
495
+ </div>
496
+ `;
497
+ }
498
+ }
499
+ ```
500
+
501
+ > [!TIP]
502
+ > `String(content.editNote)` appelle `toString()` sur l'`IntlayerNode`, qui renvoie la chaîne Markdown brute. Passez-la à `compileMarkdown` pour obtenir une chaîne HTML, puis rendez-la avec la directive `unsafeHTML` de Lit.
503
+
504
+ ### (Optionnel) Étape 9 : Ajouter le routage localisé à votre application
505
+
506
+ Pour créer des routes uniques pour chaque langue (utile pour le SEO), vous pouvez utiliser un routeur côté client aux côtés des helpers `localeMap` / `localeFlatMap` d'Intlayer, et le plugin Vite `intlayerProxy` pour la détection de la langue côté serveur.
507
+
508
+ Tout d'abord, ajoutez `intlayerProxy` à votre configuration Vite :
509
+
510
+ > Notez que pour utiliser `intlayerProxy` en production, vous devez déplacer `vite-intlayer` de `devDependencies` vers `dependencies`.
511
+
512
+ ```typescript {3,7} fileName="vite.config.ts" codeFormat="typescript"
513
+ import { defineConfig } from "vite";
514
+ import { intlayer, intlayerProxy } from "vite-intlayer";
515
+
516
+ export default defineConfig({
517
+ plugins: [
518
+ intlayerProxy(), // should be placed first
519
+ intlayer(),
520
+ ],
521
+ });
522
+ ```
523
+
524
+ ```javascript {3,7} fileName="vite.config.mjs" codeFormat="esm"
525
+ import { defineConfig } from "vite";
526
+ import { intlayer, intlayerProxy } from "vite-intlayer";
527
+
528
+ export default defineConfig({
529
+ plugins: [
530
+ intlayerProxy(), // should be placed first
531
+ intlayer(),
532
+ ],
533
+ });
534
+ ```
535
+
536
+ ```javascript {3,7} fileName="vite.config.cjs" codeFormat="commonjs"
537
+ const { defineConfig } = require("vite");
538
+ const { intlayer, intlayerProxy } = require("vite-intlayer");
539
+
540
+ module.exports = defineConfig({
541
+ plugins: [
542
+ intlayerProxy(), // should be placed first
543
+ intlayer(),
544
+ ],
545
+ });
546
+ ```
547
+
548
+ ### (Optionnel) Étape 10 : Changer l'URL lorsque la langue change
549
+
550
+ Pour mettre à jour l'URL du navigateur lorsque la langue change, utilisez `useRewriteURL` aux côtés du sélecteur de langue :
551
+
552
+ ```typescript fileName="src/locale-switcher.ts" codeFormat="typescript"
553
+ import { LitElement, html } from "lit";
554
+ import { customElement } from "lit/decorators.js";
555
+ import { getLocaleName, getLocalizedUrl } from "intlayer";
556
+ import { useLocale, useRewriteURL } from "lit-intlayer";
557
+
558
+ @customElement("locale-switcher")
559
+ export class LocaleSwitcher extends LitElement {
560
+ private locale = useLocale(this);
561
+
562
+ // Réécrit automatiquement l'URL actuelle lorsque la langue change.
563
+ private _rewriteURL = useRewriteURL(this);
564
+
565
+ private _onChange(e: Event) {
566
+ const select = e.target as HTMLSelectElement;
567
+ this.locale.setLocale(select.value as any);
568
+ }
569
+
570
+ override render() {
571
+ return html`
572
+ <select @change=${this._onChange}>
573
+ ${this.locale.availableLocales.map(
574
+ (loc) => html`
575
+ <option value=${loc} ?selected=${loc === this.locale.locale}>
576
+ ${getLocaleName(loc)}
577
+ </option>
578
+ `
579
+ )}
580
+ </select>
581
+ `;
582
+ }
583
+ }
584
+ ```
585
+
586
+ ### (Optionnel) Étape 11 : Changer les attributs de langue et de direction HTML
587
+
588
+ Mettez à jour les attributs `lang` et `dir` de la balise `<html>` pour qu'ils correspondent à la langue actuelle pour l'accessibilité et le SEO.
589
+
590
+ ```typescript fileName="src/my-element.ts" codeFormat="typescript"
591
+ import { LitElement, html } from "lit";
592
+ import { customElement } from "lit/decorators.js";
593
+ import { getHTMLTextDir } from "intlayer";
594
+ import { useLocale } from "lit-intlayer";
595
+
596
+ @customElement("my-element")
597
+ export class MyElement extends LitElement {
598
+ private locale = useLocale(this, {
599
+ onLocaleChange: (loc) => {
600
+ document.documentElement.lang = loc;
601
+ document.documentElement.dir = getHTMLTextDir(loc);
602
+ },
603
+ });
604
+
605
+ override render() {
606
+ return html`<!-- votre contenu -->`;
607
+ }
608
+ }
609
+ ```
610
+
611
+ ### (Optionnel) Étape 12 : Extraire le contenu de vos composants
612
+
613
+ Si vous avez une base de code existante, transformer des milliers de fichiers peut prendre du temps.
614
+
615
+ Pour faciliter ce processus, Intlayer propose un [compilateur](https://github.com/aymericzip/intlayer/blob/main/docs/docs/fr/compiler.md) / [extracteur](https://github.com/aymericzip/intlayer/blob/main/docs/docs/fr/cli/extract.md) pour transformer vos composants et extraire le contenu.
616
+
617
+ Pour le configurer, vous pouvez ajouter une section `compiler` dans votre fichier `intlayer.config.ts` :
618
+
619
+ ```typescript fileName="intlayer.config.ts" codeFormat="typescript"
620
+ import { type IntlayerConfig } from "intlayer";
621
+
622
+ const config: IntlayerConfig = {
623
+ // ... Reste de votre config
624
+ compiler: {
625
+ /**
626
+ * Indique si le compilateur doit être activé.
627
+ */
628
+ enabled: true,
629
+
630
+ /**
631
+ * Définit le chemin des fichiers de sortie
632
+ */
633
+ output: ({ fileName, extension }) => `./${fileName}${extension}`,
634
+
635
+ /**
636
+ * Indique si les composants doivent être sauvegardés après avoir été transformés.
637
+ * De cette façon, le compilateur peut être exécuté une seule fois pour transformer l'application, puis il peut être supprimé.
638
+ */
639
+ saveComponents: false,
640
+
641
+ /**
642
+ * Préfixe de clé de dictionnaire
643
+ */
644
+ dictionaryKeyPrefix: "",
645
+ },
646
+ };
647
+
648
+ export default config;
649
+ ```
650
+
651
+ ### Configurer TypeScript
652
+
653
+ Assurez-vous que votre configuration TypeScript inclut les types autogénérés.
654
+
655
+ ```json5 fileName="tsconfig.json"
656
+ {
657
+ "compilerOptions": {
658
+ // ...
659
+ "experimentalDecorators": true,
660
+ "useDefineForClassFields": false,
661
+ },
662
+ "include": ["src", ".intlayer/**/*.ts"],
663
+ }
664
+ ```
665
+
666
+ > `experimentalDecorators` et `useDefineForClassFields: false` sont requis par Lit pour le support des décorateurs.
667
+
668
+ ### Configuration Git
669
+
670
+ Il est recommandé d'ignorer les fichiers générés par Intlayer. Cela vous permet d'éviter de les commettre dans votre dépôt Git.
671
+
672
+ Pour ce faire, vous pouvez ajouter les instructions suivantes à votre fichier `.gitignore` :
673
+
674
+ ```bash
675
+ # Ignorez les fichiers générés par Intlayer
676
+ .intlayer
677
+ ```
678
+
679
+ ### Extension VS Code
680
+
681
+ Pour améliorer votre expérience de développement avec Intlayer, vous pouvez installer l'**extension officielle Intlayer VS Code**.
682
+
683
+ [Installer depuis le VS Code Marketplace](https://marketplace.visualstudio.com/items?itemName=intlayer.intlayer-vs-code-extension)
684
+
685
+ Cette extension fournit :
686
+
687
+ - **L'autocomplétion** pour les clés de traduction.
688
+ - **La détection d'erreurs en temps réel** pour les traductions manquantes.
689
+ - **Des aperçus en ligne** du contenu traduit.
690
+ - **Des actions rapides** pour créer et mettre à jour facilement les traductions.
691
+
692
+ Pour plus de détails sur l'utilisation de l'extension, reportez-vous à la [documentation de l'extension Intlayer VS Code](https://intlayer.org/doc/vs-code-extension).
693
+
694
+ ---
695
+
696
+ ### Aller plus loin
697
+
698
+ Pour aller plus loin, vous pouvez implémenter l'[éditeur visuel](https://github.com/aymericzip/intlayer/blob/main/docs/docs/fr/intlayer_visual_editor.md) ou externaliser votre contenu en utilisant le [CMS](https://github.com/aymericzip/intlayer/blob/main/docs/docs/fr/intlayer_CMS.md).