@intlayer/docs 8.4.9 → 8.5.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (370) 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 +22 -22
  8. package/docs/ar/dictionary/markdown.md +18 -18
  9. package/docs/ar/intlayer_with_analog.md +2 -13
  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 +738 -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 +21 -5
  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 +738 -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 +738 -0
  31. package/docs/cs/intlayer_with_vite+vanilla.md +722 -0
  32. package/docs/de/dictionary/html.md +146 -24
  33. package/docs/de/dictionary/markdown.md +143 -25
  34. package/docs/de/intlayer_with_analog.md +2 -13
  35. package/docs/de/intlayer_with_angular.md +1 -12
  36. package/docs/de/intlayer_with_nextjs_14.md +1 -1
  37. package/docs/de/intlayer_with_nextjs_page_router.md +1 -1
  38. package/docs/de/intlayer_with_react_router_v7.md +6 -1
  39. package/docs/de/intlayer_with_react_router_v7_fs_routes.md +6 -1
  40. package/docs/de/intlayer_with_storybook.md +2 -5
  41. package/docs/de/intlayer_with_svelte_kit.md +9 -5
  42. package/docs/de/intlayer_with_vite+lit.md +747 -0
  43. package/docs/de/intlayer_with_vite+react.md +16 -4
  44. package/docs/de/intlayer_with_vite+solid.md +1 -1
  45. package/docs/de/intlayer_with_vite+svelte.md +19 -6
  46. package/docs/de/intlayer_with_vite+vanilla.md +722 -0
  47. package/docs/de/intlayer_with_vite+vue.md +21 -5
  48. package/docs/de/packages/react-intlayer/MarkdownRenderer.md +1 -1
  49. package/docs/de/packages/svelte-intlayer/useRewriteURL.md +1 -1
  50. package/docs/de/releases/v8.md +27 -27
  51. package/docs/en/compiler.md +4 -1
  52. package/docs/en/configuration.md +4 -1
  53. package/docs/en/dictionary/html.md +146 -24
  54. package/docs/en/dictionary/markdown.md +143 -21
  55. package/docs/en/intlayer_with_analog.md +3 -14
  56. package/docs/en/intlayer_with_angular.md +1 -12
  57. package/docs/en/intlayer_with_nextjs_14.md +1 -1
  58. package/docs/en/intlayer_with_nextjs_16.md +12 -3
  59. package/docs/en/intlayer_with_nextjs_compiler.md +16 -4
  60. package/docs/en/intlayer_with_nextjs_page_router.md +1 -1
  61. package/docs/en/intlayer_with_react_router_v7.md +17 -4
  62. package/docs/en/intlayer_with_react_router_v7_fs_routes.md +18 -4
  63. package/docs/en/intlayer_with_storybook.md +2 -5
  64. package/docs/en/intlayer_with_svelte_kit.md +21 -8
  65. package/docs/en/intlayer_with_tanstack.md +12 -3
  66. package/docs/en/intlayer_with_vite+lit.md +750 -0
  67. package/docs/en/intlayer_with_vite+preact.md +31 -3
  68. package/docs/en/intlayer_with_vite+react.md +28 -7
  69. package/docs/en/intlayer_with_vite+react_compiler.md +4 -1
  70. package/docs/en/intlayer_with_vite+solid.md +31 -3
  71. package/docs/en/intlayer_with_vite+svelte.md +30 -9
  72. package/docs/en/intlayer_with_vite+vanilla.md +725 -0
  73. package/docs/en/intlayer_with_vite+vue.md +28 -7
  74. package/docs/en/packages/react-intlayer/MarkdownRenderer.md +1 -1
  75. package/docs/en/packages/svelte-intlayer/useRewriteURL.md +1 -1
  76. package/docs/en/readme.md +1 -0
  77. package/docs/en/releases/v8.md +27 -27
  78. package/docs/en-GB/compiler.md +4 -1
  79. package/docs/en-GB/configuration.md +4 -1
  80. package/docs/en-GB/dictionary/html.md +22 -22
  81. package/docs/en-GB/dictionary/markdown.md +18 -18
  82. package/docs/en-GB/intlayer_with_analog.md +2 -13
  83. package/docs/en-GB/intlayer_with_angular.md +1 -12
  84. package/docs/en-GB/intlayer_with_nextjs_14.md +1 -1
  85. package/docs/en-GB/intlayer_with_nextjs_page_router.md +1 -1
  86. package/docs/en-GB/intlayer_with_react_router_v7.md +6 -1
  87. package/docs/en-GB/intlayer_with_react_router_v7_fs_routes.md +6 -1
  88. package/docs/en-GB/intlayer_with_storybook.md +2 -5
  89. package/docs/en-GB/intlayer_with_svelte_kit.md +9 -5
  90. package/docs/en-GB/intlayer_with_vite+lit.md +750 -0
  91. package/docs/en-GB/intlayer_with_vite+react.md +15 -3
  92. package/docs/en-GB/intlayer_with_vite+solid.md +1 -1
  93. package/docs/en-GB/intlayer_with_vite+svelte.md +17 -5
  94. package/docs/en-GB/intlayer_with_vite+vanilla.md +725 -0
  95. package/docs/en-GB/intlayer_with_vite+vue.md +16 -4
  96. package/docs/en-GB/packages/react-intlayer/MarkdownRenderer.md +1 -1
  97. package/docs/en-GB/packages/svelte-intlayer/useRewriteURL.md +1 -1
  98. package/docs/en-GB/releases/v8.md +27 -27
  99. package/docs/es/dictionary/html.md +147 -25
  100. package/docs/es/dictionary/markdown.md +143 -25
  101. package/docs/es/intlayer_with_analog.md +2 -13
  102. package/docs/es/intlayer_with_angular.md +1 -12
  103. package/docs/es/intlayer_with_nextjs_14.md +1 -1
  104. package/docs/es/intlayer_with_nextjs_page_router.md +1 -1
  105. package/docs/es/intlayer_with_react_router_v7.md +6 -1
  106. package/docs/es/intlayer_with_react_router_v7_fs_routes.md +6 -1
  107. package/docs/es/intlayer_with_storybook.md +2 -5
  108. package/docs/es/intlayer_with_svelte_kit.md +9 -5
  109. package/docs/es/intlayer_with_vite+lit.md +747 -0
  110. package/docs/es/intlayer_with_vite+react.md +16 -4
  111. package/docs/es/intlayer_with_vite+solid.md +1 -1
  112. package/docs/es/intlayer_with_vite+svelte.md +16 -6
  113. package/docs/es/intlayer_with_vite+vanilla.md +722 -0
  114. package/docs/es/intlayer_with_vite+vue.md +21 -5
  115. package/docs/es/packages/react-intlayer/MarkdownRenderer.md +1 -1
  116. package/docs/es/packages/svelte-intlayer/useRewriteURL.md +1 -1
  117. package/docs/es/releases/v8.md +27 -27
  118. package/docs/fr/dictionary/html.md +146 -24
  119. package/docs/fr/dictionary/markdown.md +143 -25
  120. package/docs/fr/intlayer_with_analog.md +2 -13
  121. package/docs/fr/intlayer_with_angular.md +1 -12
  122. package/docs/fr/intlayer_with_nextjs_14.md +1 -1
  123. package/docs/fr/intlayer_with_nextjs_page_router.md +1 -1
  124. package/docs/fr/intlayer_with_react_router_v7.md +6 -1
  125. package/docs/fr/intlayer_with_react_router_v7_fs_routes.md +6 -1
  126. package/docs/fr/intlayer_with_storybook.md +2 -5
  127. package/docs/fr/intlayer_with_svelte_kit.md +9 -5
  128. package/docs/fr/intlayer_with_vite+lit.md +747 -0
  129. package/docs/fr/intlayer_with_vite+react.md +16 -4
  130. package/docs/fr/intlayer_with_vite+solid.md +1 -1
  131. package/docs/fr/intlayer_with_vite+svelte.md +19 -6
  132. package/docs/fr/intlayer_with_vite+vanilla.md +722 -0
  133. package/docs/fr/intlayer_with_vite+vue.md +21 -5
  134. package/docs/fr/packages/react-intlayer/MarkdownRenderer.md +1 -1
  135. package/docs/fr/packages/svelte-intlayer/useRewriteURL.md +1 -1
  136. package/docs/fr/releases/v8.md +27 -27
  137. package/docs/hi/dictionary/html.md +22 -22
  138. package/docs/hi/dictionary/markdown.md +18 -18
  139. package/docs/hi/intlayer_with_analog.md +2 -13
  140. package/docs/hi/intlayer_with_angular.md +1 -12
  141. package/docs/hi/intlayer_with_nextjs_14.md +1 -1
  142. package/docs/hi/intlayer_with_nextjs_page_router.md +1 -1
  143. package/docs/hi/intlayer_with_react_router_v7.md +6 -1
  144. package/docs/hi/intlayer_with_react_router_v7_fs_routes.md +6 -1
  145. package/docs/hi/intlayer_with_storybook.md +2 -5
  146. package/docs/hi/intlayer_with_svelte_kit.md +9 -5
  147. package/docs/hi/intlayer_with_vite+lit.md +738 -0
  148. package/docs/hi/intlayer_with_vite+react.md +16 -4
  149. package/docs/hi/intlayer_with_vite+solid.md +1 -1
  150. package/docs/hi/intlayer_with_vite+svelte.md +13 -6
  151. package/docs/hi/intlayer_with_vite+vanilla.md +722 -0
  152. package/docs/hi/intlayer_with_vite+vue.md +21 -5
  153. package/docs/hi/packages/react-intlayer/MarkdownRenderer.md +1 -1
  154. package/docs/hi/packages/svelte-intlayer/useRewriteURL.md +1 -1
  155. package/docs/hi/releases/v8.md +27 -27
  156. package/docs/id/dictionary/html.md +22 -22
  157. package/docs/id/dictionary/markdown.md +18 -18
  158. package/docs/id/intlayer_with_analog.md +2 -13
  159. package/docs/id/intlayer_with_angular.md +1 -12
  160. package/docs/id/intlayer_with_nextjs_14.md +1 -1
  161. package/docs/id/intlayer_with_nextjs_page_router.md +1 -1
  162. package/docs/id/intlayer_with_react_router_v7.md +6 -1
  163. package/docs/id/intlayer_with_react_router_v7_fs_routes.md +6 -1
  164. package/docs/id/intlayer_with_storybook.md +2 -5
  165. package/docs/id/intlayer_with_svelte_kit.md +9 -5
  166. package/docs/id/intlayer_with_vite+lit.md +738 -0
  167. package/docs/id/intlayer_with_vite+react.md +16 -4
  168. package/docs/id/intlayer_with_vite+solid.md +1 -1
  169. package/docs/id/intlayer_with_vite+svelte.md +13 -6
  170. package/docs/id/intlayer_with_vite+vanilla.md +722 -0
  171. package/docs/id/intlayer_with_vite+vue.md +16 -4
  172. package/docs/id/packages/react-intlayer/MarkdownRenderer.md +1 -1
  173. package/docs/id/packages/svelte-intlayer/useRewriteURL.md +1 -1
  174. package/docs/id/releases/v8.md +27 -27
  175. package/docs/it/dictionary/html.md +146 -24
  176. package/docs/it/dictionary/markdown.md +143 -21
  177. package/docs/it/intlayer_with_analog.md +2 -13
  178. package/docs/it/intlayer_with_angular.md +1 -12
  179. package/docs/it/intlayer_with_nextjs_14.md +1 -1
  180. package/docs/it/intlayer_with_nextjs_page_router.md +1 -1
  181. package/docs/it/intlayer_with_react_router_v7.md +6 -1
  182. package/docs/it/intlayer_with_react_router_v7_fs_routes.md +6 -1
  183. package/docs/it/intlayer_with_storybook.md +2 -5
  184. package/docs/it/intlayer_with_svelte_kit.md +9 -5
  185. package/docs/it/intlayer_with_vite+lit.md +747 -0
  186. package/docs/it/intlayer_with_vite+react.md +16 -4
  187. package/docs/it/intlayer_with_vite+solid.md +1 -1
  188. package/docs/it/intlayer_with_vite+svelte.md +13 -6
  189. package/docs/it/intlayer_with_vite+vanilla.md +722 -0
  190. package/docs/it/intlayer_with_vite+vue.md +21 -5
  191. package/docs/it/packages/react-intlayer/MarkdownRenderer.md +1 -1
  192. package/docs/it/packages/svelte-intlayer/useRewriteURL.md +1 -1
  193. package/docs/it/releases/v8.md +27 -27
  194. package/docs/ja/dictionary/html.md +148 -27
  195. package/docs/ja/dictionary/markdown.md +139 -24
  196. package/docs/ja/intlayer_with_analog.md +2 -13
  197. package/docs/ja/intlayer_with_angular.md +1 -12
  198. package/docs/ja/intlayer_with_nextjs_14.md +1 -1
  199. package/docs/ja/intlayer_with_nextjs_page_router.md +1 -1
  200. package/docs/ja/intlayer_with_react_router_v7.md +6 -1
  201. package/docs/ja/intlayer_with_react_router_v7_fs_routes.md +6 -1
  202. package/docs/ja/intlayer_with_storybook.md +2 -5
  203. package/docs/ja/intlayer_with_vite+lit.md +747 -0
  204. package/docs/ja/intlayer_with_vite+solid.md +1 -1
  205. package/docs/ja/intlayer_with_vite+svelte.md +13 -6
  206. package/docs/ja/intlayer_with_vite+vanilla.md +722 -0
  207. package/docs/ja/intlayer_with_vite+vue.md +21 -5
  208. package/docs/ja/packages/react-intlayer/MarkdownRenderer.md +1 -1
  209. package/docs/ja/packages/svelte-intlayer/useRewriteURL.md +1 -1
  210. package/docs/ja/releases/v8.md +27 -27
  211. package/docs/ko/dictionary/html.md +149 -28
  212. package/docs/ko/dictionary/markdown.md +143 -25
  213. package/docs/ko/intlayer_with_analog.md +2 -13
  214. package/docs/ko/intlayer_with_angular.md +1 -12
  215. package/docs/ko/intlayer_with_nextjs_14.md +1 -1
  216. package/docs/ko/intlayer_with_nextjs_page_router.md +1 -1
  217. package/docs/ko/intlayer_with_react_router_v7.md +6 -1
  218. package/docs/ko/intlayer_with_react_router_v7_fs_routes.md +6 -1
  219. package/docs/ko/intlayer_with_storybook.md +2 -5
  220. package/docs/ko/intlayer_with_svelte_kit.md +9 -5
  221. package/docs/ko/intlayer_with_vite+lit.md +747 -0
  222. package/docs/ko/intlayer_with_vite+react.md +16 -4
  223. package/docs/ko/intlayer_with_vite+solid.md +1 -1
  224. package/docs/ko/intlayer_with_vite+svelte.md +13 -6
  225. package/docs/ko/intlayer_with_vite+vanilla.md +722 -0
  226. package/docs/ko/intlayer_with_vite+vue.md +21 -5
  227. package/docs/ko/packages/react-intlayer/MarkdownRenderer.md +1 -1
  228. package/docs/ko/packages/svelte-intlayer/useRewriteURL.md +1 -1
  229. package/docs/ko/releases/v8.md +27 -27
  230. package/docs/nl/intlayer_with_storybook.md +2 -5
  231. package/docs/nl/intlayer_with_vite+lit.md +738 -0
  232. package/docs/nl/intlayer_with_vite+vanilla.md +722 -0
  233. package/docs/pl/dictionary/html.md +146 -24
  234. package/docs/pl/dictionary/markdown.md +143 -25
  235. package/docs/pl/intlayer_with_analog.md +2 -13
  236. package/docs/pl/intlayer_with_angular.md +1 -12
  237. package/docs/pl/intlayer_with_nextjs_14.md +1 -1
  238. package/docs/pl/intlayer_with_nextjs_page_router.md +1 -1
  239. package/docs/pl/intlayer_with_react_router_v7.md +6 -1
  240. package/docs/pl/intlayer_with_react_router_v7_fs_routes.md +6 -1
  241. package/docs/pl/intlayer_with_storybook.md +2 -5
  242. package/docs/pl/intlayer_with_svelte_kit.md +9 -5
  243. package/docs/pl/intlayer_with_vite+lit.md +738 -0
  244. package/docs/pl/intlayer_with_vite+react.md +16 -4
  245. package/docs/pl/intlayer_with_vite+solid.md +1 -1
  246. package/docs/pl/intlayer_with_vite+svelte.md +13 -6
  247. package/docs/pl/intlayer_with_vite+vanilla.md +722 -0
  248. package/docs/pl/intlayer_with_vite+vue.md +16 -4
  249. package/docs/pl/packages/react-intlayer/MarkdownRenderer.md +1 -1
  250. package/docs/pl/packages/svelte-intlayer/useRewriteURL.md +1 -1
  251. package/docs/pl/releases/v8.md +27 -27
  252. package/docs/pt/dictionary/html.md +127 -24
  253. package/docs/pt/dictionary/markdown.md +143 -25
  254. package/docs/pt/intlayer_with_analog.md +2 -13
  255. package/docs/pt/intlayer_with_angular.md +1 -12
  256. package/docs/pt/intlayer_with_nextjs_14.md +1 -1
  257. package/docs/pt/intlayer_with_nextjs_page_router.md +1 -1
  258. package/docs/pt/intlayer_with_react_router_v7.md +6 -1
  259. package/docs/pt/intlayer_with_react_router_v7_fs_routes.md +6 -1
  260. package/docs/pt/intlayer_with_storybook.md +2 -5
  261. package/docs/pt/intlayer_with_svelte_kit.md +9 -5
  262. package/docs/pt/intlayer_with_vite+lit.md +747 -0
  263. package/docs/pt/intlayer_with_vite+react.md +16 -4
  264. package/docs/pt/intlayer_with_vite+solid.md +1 -1
  265. package/docs/pt/intlayer_with_vite+svelte.md +16 -6
  266. package/docs/pt/intlayer_with_vite+vanilla.md +722 -0
  267. package/docs/pt/intlayer_with_vite+vue.md +21 -5
  268. package/docs/pt/packages/react-intlayer/MarkdownRenderer.md +1 -1
  269. package/docs/pt/packages/svelte-intlayer/useRewriteURL.md +1 -1
  270. package/docs/pt/releases/v8.md +27 -27
  271. package/docs/ru/dictionary/html.md +148 -27
  272. package/docs/ru/dictionary/markdown.md +143 -23
  273. package/docs/ru/intlayer_with_analog.md +2 -13
  274. package/docs/ru/intlayer_with_angular.md +1 -12
  275. package/docs/ru/intlayer_with_nextjs_14.md +1 -1
  276. package/docs/ru/intlayer_with_nextjs_page_router.md +1 -1
  277. package/docs/ru/intlayer_with_react_router_v7.md +6 -1
  278. package/docs/ru/intlayer_with_react_router_v7_fs_routes.md +6 -1
  279. package/docs/ru/intlayer_with_storybook.md +2 -5
  280. package/docs/ru/intlayer_with_svelte_kit.md +9 -5
  281. package/docs/ru/intlayer_with_vite+lit.md +747 -0
  282. package/docs/ru/intlayer_with_vite+react.md +16 -4
  283. package/docs/ru/intlayer_with_vite+solid.md +1 -1
  284. package/docs/ru/intlayer_with_vite+svelte.md +13 -6
  285. package/docs/ru/intlayer_with_vite+vanilla.md +722 -0
  286. package/docs/ru/intlayer_with_vite+vue.md +21 -5
  287. package/docs/ru/packages/react-intlayer/MarkdownRenderer.md +1 -1
  288. package/docs/ru/packages/svelte-intlayer/useRewriteURL.md +1 -1
  289. package/docs/ru/releases/v8.md +27 -27
  290. package/docs/tr/dictionary/html.md +129 -27
  291. package/docs/tr/dictionary/markdown.md +143 -23
  292. package/docs/tr/intlayer_with_analog.md +2 -13
  293. package/docs/tr/intlayer_with_angular.md +1 -12
  294. package/docs/tr/intlayer_with_nextjs_14.md +1 -1
  295. package/docs/tr/intlayer_with_nextjs_page_router.md +1 -1
  296. package/docs/tr/intlayer_with_react_router_v7.md +6 -1
  297. package/docs/tr/intlayer_with_react_router_v7_fs_routes.md +6 -1
  298. package/docs/tr/intlayer_with_storybook.md +2 -5
  299. package/docs/tr/intlayer_with_svelte_kit.md +9 -5
  300. package/docs/tr/intlayer_with_vite+lit.md +738 -0
  301. package/docs/tr/intlayer_with_vite+react.md +16 -4
  302. package/docs/tr/intlayer_with_vite+solid.md +1 -1
  303. package/docs/tr/intlayer_with_vite+svelte.md +13 -6
  304. package/docs/tr/intlayer_with_vite+vanilla.md +722 -0
  305. package/docs/tr/intlayer_with_vite+vue.md +16 -4
  306. package/docs/tr/packages/react-intlayer/MarkdownRenderer.md +1 -1
  307. package/docs/tr/packages/svelte-intlayer/useRewriteURL.md +1 -1
  308. package/docs/tr/releases/v8.md +27 -27
  309. package/docs/uk/dictionary/html.md +22 -22
  310. package/docs/uk/dictionary/markdown.md +18 -18
  311. package/docs/uk/intlayer_with_analog.md +2 -13
  312. package/docs/uk/intlayer_with_angular.md +1 -12
  313. package/docs/uk/intlayer_with_nextjs_14.md +1 -1
  314. package/docs/uk/intlayer_with_nextjs_page_router.md +1 -1
  315. package/docs/uk/intlayer_with_react_router_v7.md +5 -1
  316. package/docs/uk/intlayer_with_react_router_v7_fs_routes.md +6 -1
  317. package/docs/uk/intlayer_with_storybook.md +2 -5
  318. package/docs/uk/intlayer_with_svelte_kit.md +9 -5
  319. package/docs/uk/intlayer_with_vite+lit.md +738 -0
  320. package/docs/uk/intlayer_with_vite+react.md +16 -4
  321. package/docs/uk/intlayer_with_vite+solid.md +1 -1
  322. package/docs/uk/intlayer_with_vite+svelte.md +18 -6
  323. package/docs/uk/intlayer_with_vite+vanilla.md +722 -0
  324. package/docs/uk/intlayer_with_vite+vue.md +16 -4
  325. package/docs/uk/packages/react-intlayer/MarkdownRenderer.md +1 -1
  326. package/docs/uk/packages/svelte-intlayer/useRewriteURL.md +1 -1
  327. package/docs/uk/releases/v8.md +27 -27
  328. package/docs/ur/intlayer_with_storybook.md +2 -5
  329. package/docs/ur/intlayer_with_vite+lit.md +738 -0
  330. package/docs/ur/intlayer_with_vite+vanilla.md +722 -0
  331. package/docs/vi/dictionary/html.md +22 -22
  332. package/docs/vi/dictionary/markdown.md +18 -18
  333. package/docs/vi/intlayer_with_analog.md +2 -13
  334. package/docs/vi/intlayer_with_angular.md +1 -12
  335. package/docs/vi/intlayer_with_nextjs_14.md +1 -1
  336. package/docs/vi/intlayer_with_nextjs_page_router.md +1 -1
  337. package/docs/vi/intlayer_with_react_router_v7.md +6 -1
  338. package/docs/vi/intlayer_with_react_router_v7_fs_routes.md +6 -1
  339. package/docs/vi/intlayer_with_storybook.md +2 -5
  340. package/docs/vi/intlayer_with_svelte_kit.md +9 -5
  341. package/docs/vi/intlayer_with_vite+lit.md +738 -0
  342. package/docs/vi/intlayer_with_vite+react.md +16 -4
  343. package/docs/vi/intlayer_with_vite+solid.md +1 -1
  344. package/docs/vi/intlayer_with_vite+svelte.md +17 -5
  345. package/docs/vi/intlayer_with_vite+vanilla.md +722 -0
  346. package/docs/vi/intlayer_with_vite+vue.md +16 -4
  347. package/docs/vi/packages/react-intlayer/MarkdownRenderer.md +1 -1
  348. package/docs/vi/packages/svelte-intlayer/useRewriteURL.md +1 -1
  349. package/docs/vi/releases/v8.md +27 -27
  350. package/docs/zh/dictionary/html.md +148 -27
  351. package/docs/zh/dictionary/markdown.md +143 -21
  352. package/docs/zh/intlayer_with_analog.md +2 -13
  353. package/docs/zh/intlayer_with_angular.md +1 -12
  354. package/docs/zh/intlayer_with_nextjs_14.md +1 -1
  355. package/docs/zh/intlayer_with_nextjs_page_router.md +1 -1
  356. package/docs/zh/intlayer_with_react_router_v7.md +6 -1
  357. package/docs/zh/intlayer_with_react_router_v7_fs_routes.md +6 -1
  358. package/docs/zh/intlayer_with_storybook.md +2 -5
  359. package/docs/zh/intlayer_with_svelte_kit.md +9 -5
  360. package/docs/zh/intlayer_with_vite+lit.md +747 -0
  361. package/docs/zh/intlayer_with_vite+react.md +16 -4
  362. package/docs/zh/intlayer_with_vite+solid.md +1 -1
  363. package/docs/zh/intlayer_with_vite+svelte.md +16 -6
  364. package/docs/zh/intlayer_with_vite+vanilla.md +722 -0
  365. package/docs/zh/intlayer_with_vite+vue.md +16 -4
  366. package/docs/zh/packages/react-intlayer/MarkdownRenderer.md +1 -1
  367. package/docs/zh/packages/svelte-intlayer/useRewriteURL.md +1 -1
  368. package/docs/zh/releases/v8.md +27 -27
  369. package/package.json +8 -8
  370. package/src/generated/docs.entry.ts +40 -0
@@ -0,0 +1,722 @@
1
+ ---
2
+ createdAt: 2026-03-23
3
+ updatedAt: 2026-03-23
4
+ title: i18n Vite + Vanilla JS - Come tradurre un'app Vanilla JS nel 2026
5
+ description: Scopri come rendere multilingue il tuo sito web Vite e Vanilla JS. Segui la documentazione per l'internazionalizzazione (i18n) e la traduzione.
6
+ keywords:
7
+ - Internazionalizzazione
8
+ - Documentazione
9
+ - Intlayer
10
+ - Vite
11
+ - Vanilla JS
12
+ - JavaScript
13
+ - TypeScript
14
+ - HTML
15
+ slugs:
16
+ - doc
17
+ - environment
18
+ - vite-and-vanilla
19
+ applicationTemplate: https://github.com/aymericzip/intlayer-vite-vanilla-template
20
+ history:
21
+ - version: 8.4.10
22
+ date: 2026-03-23
23
+ changes: "Init history"
24
+ ---
25
+
26
+ # Traduci il tuo sito web Vite e Vanilla JS utilizzando Intlayer | Internazionalizzazione (i18n)
27
+
28
+ ## Sommario
29
+
30
+ <TOC/>
31
+
32
+ ## Cos'è Intlayer?
33
+
34
+ **Intlayer** è una libreria di internazionalizzazione (i18n) innovativa e open-source progettata per semplificare il supporto multilingue nelle moderne applicazioni web.
35
+
36
+ Con Intlayer, puoi:
37
+
38
+ - **Gestire facilmente le traduzioni** utilizzando dizionari dichiarativi a livello di componente.
39
+ - **Localizzare dinamicamente metadati**, percorsi e contenuti.
40
+ - **Garantire il supporto TypeScript** con tipi autogenerati, migliorando l'autocompletamento e il rilevamento degli errori.
41
+ - **Beneficiare di funzionalità avanzate**, come il rilevamento e la commutazione dinamica della lingua.
42
+
43
+ ---
44
+
45
+ ## Guida passo-passo per configurare Intlayer in un'applicazione Vite e Vanilla JS
46
+
47
+ ### Passaggio 1: Installa le dipendenze
48
+
49
+ Installa i pacchetti necessari utilizzando npm:
50
+
51
+ ```bash packageManager="npm"
52
+ npm install intlayer vanilla-intlayer
53
+ npm install vite-intlayer --save-dev
54
+ npx intlayer init
55
+ ```
56
+
57
+ ```bash packageManager="pnpm"
58
+ pnpm add intlayer vanilla-intlayer
59
+ pnpm add vite-intlayer --save-dev
60
+ pnpm intlayer init
61
+ ```
62
+
63
+ ```bash packageManager="yarn"
64
+ yarn add intlayer vanilla-intlayer
65
+ yarn add vite-intlayer --save-dev
66
+ yarn intlayer init
67
+ ```
68
+
69
+ ```bash packageManager="bun"
70
+ bun add intlayer vanilla-intlayer
71
+ bun add vite-intlayer --dev
72
+ bunx intlayer init
73
+ ```
74
+
75
+ - **intlayer**
76
+ Il pacchetto principale che fornisce strumenti di internazionalizzazione per la gestione della configurazione, la traduzione, la [dichiarazione dei contenuti](https://github.com/aymericzip/intlayer/blob/main/docs/docs/it/dictionary/content_file.md), la transpilazione e i [comandi CLI](https://github.com/aymericzip/intlayer/blob/main/docs/docs/it/cli/index.md).
77
+
78
+ - **vanilla-intlayer**
79
+ Il pacchetto che integra Intlayer con applicazioni JavaScript puro / TypeScript. Fornisce un singleton pub/sub (`IntlayerClient`) e helper basati su callback (`useIntlayer`, `useLocale`, ecc.) in modo che qualsiasi parte della tua app possa reagire ai cambiamenti di lingua senza dipendere da un framework UI.
80
+
81
+ - **vite-intlayer**
82
+ Include il plugin Vite per l'integrazione di Intlayer con il [bundler Vite](https://vite.dev/guide/why.html#why-bundle-for-production), oltre a un middleware per rilevare la lingua preferita dell'utente, gestire i cookie e gestire il reindirizzamento degli URL.
83
+
84
+ ### Passaggio 2: Configurazione del progetto
85
+
86
+ Crea un file di configurazione per impostare le lingue della tua applicazione:
87
+
88
+ ```typescript fileName="intlayer.config.ts" codeFormat="typescript"
89
+ import { Locales, type IntlayerConfig } from "intlayer";
90
+
91
+ const config: IntlayerConfig = {
92
+ internationalization: {
93
+ locales: [
94
+ Locales.ENGLISH,
95
+ Locales.FRENCH,
96
+ Locales.SPANISH,
97
+ // Le tue altre lingue
98
+ ],
99
+ defaultLocale: Locales.ENGLISH,
100
+ },
101
+ };
102
+
103
+ export default config;
104
+ ```
105
+
106
+ ```javascript fileName="intlayer.config.mjs" codeFormat="esm"
107
+ import { Locales } from "intlayer";
108
+
109
+ /** @type {import('intlayer').IntlayerConfig} */
110
+ const config = {
111
+ internationalization: {
112
+ locales: [
113
+ Locales.ENGLISH,
114
+ Locales.FRENCH,
115
+ Locales.SPANISH,
116
+ // Le tue altre lingue
117
+ ],
118
+ defaultLocale: Locales.ENGLISH,
119
+ },
120
+ };
121
+
122
+ export default config;
123
+ ```
124
+
125
+ ```javascript fileName="intlayer.config.cjs" codeFormat="commonjs"
126
+ const { Locales } = require("intlayer");
127
+
128
+ /** @type {import('intlayer').IntlayerConfig} */
129
+ const config = {
130
+ internationalization: {
131
+ locales: [
132
+ Locales.ENGLISH,
133
+ Locales.FRENCH,
134
+ Locales.SPANISH,
135
+ // Le tue altre lingue
136
+ ],
137
+ defaultLocale: Locales.ENGLISH,
138
+ },
139
+ };
140
+
141
+ module.exports = config;
142
+ ```
143
+
144
+ > Attraverso questo file di configurazione, puoi impostare URL localizzati, reindirizzamento middleware, nomi dei cookie, la posizione e l'estensione delle tue dichiarazioni di contenuto, disabilitare i log di Intlayer nella console e altro ancora. Per un elenco completo dei parametri disponibili, consulta la [documentazione sulla configurazione](https://github.com/aymericzip/intlayer/blob/main/docs/docs/it/configuration.md).
145
+
146
+ ### Passaggio 3: Integra Intlayer nella tua configurazione Vite
147
+
148
+ Aggiungi il plugin intlayer nella tua configurazione.
149
+
150
+ ```typescript fileName="vite.config.ts" codeFormat="typescript"
151
+ import { defineConfig } from "vite";
152
+ import { intlayer } from "vite-intlayer";
153
+
154
+ // https://vitejs.dev/config/
155
+ export default defineConfig({
156
+ plugins: [intlayer()],
157
+ });
158
+ ```
159
+
160
+ ```javascript fileName="vite.config.mjs" codeFormat="esm"
161
+ import { defineConfig } from "vite";
162
+ import { intlayer } from "vite-intlayer";
163
+
164
+ // https://vitejs.dev/config/
165
+ export default defineConfig({
166
+ plugins: [intlayer()],
167
+ });
168
+ ```
169
+
170
+ ```javascript fileName="vite.config.cjs" codeFormat="commonjs"
171
+ const { defineConfig } = require("vite");
172
+ const { intlayer } = require("vite-intlayer");
173
+
174
+ // https://vitejs.dev/config/
175
+ module.exports = defineConfig({
176
+ plugins: [intlayer()],
177
+ });
178
+ ```
179
+
180
+ > Il plugin Vite `intlayer()` viene utilizzato per integrare Intlayer con Vite. Garantisce la creazione dei file di dichiarazione del contenuto e li monitora in modalità sviluppo. Definisce le variabili di ambiente Intlayer all'interno dell'applicazione Vite. Inoltre, fornisce alias per ottimizzare le prestazioni.
181
+
182
+ ### Passaggio 4: Bootstrap di Intlayer nel tuo punto di ingresso
183
+
184
+ Chiama `installIntlayer()` **prima** che qualsiasi contenuto venga renderizzato in modo che il singleton della lingua globale sia pronto.
185
+
186
+ ```typescript fileName="src/main.ts" codeFormat="typescript"
187
+ import { installIntlayer } from "vanilla-intlayer";
188
+
189
+ // Deve essere chiamato prima di renderizzare qualsiasi contenuto i18n.
190
+ installIntlayer();
191
+
192
+ // Importa ed esegui i tuoi moduli dell'applicazione.
193
+ import "./app.js";
194
+ ```
195
+
196
+ Se utilizzi anche dichiarazioni di contenuto `md()` (Markdown), installa anche il renderer markdown:
197
+
198
+ ```typescript fileName="src/main.ts" codeFormat="typescript"
199
+ import { installIntlayer, installIntlayerMarkdown } from "vanilla-intlayer";
200
+
201
+ installIntlayer();
202
+ installIntlayerMarkdown();
203
+
204
+ import "./app.js";
205
+ ```
206
+
207
+ ### Passaggio 5: Dichiarazione del contenuto
208
+
209
+ Crea e gestisci le tue dichiarazioni di contenuto per memorizzare le traduzioni:
210
+
211
+ ```typescript fileName="src/app.content.ts" contentDeclarationFormat="typescript"
212
+ import { insert, t, type Dictionary } from "intlayer";
213
+
214
+ const appContent = {
215
+ key: "app",
216
+ content: {
217
+ title: "Vite + Vanilla",
218
+
219
+ viteLogoLabel: t({
220
+ en: "Vite Logo",
221
+ fr: "Logo Vite",
222
+ es: "Logo Vite",
223
+ }),
224
+
225
+ count: insert(
226
+ t({
227
+ en: "count is {{count}}",
228
+ fr: "le compte est {{count}}",
229
+ es: "el recuento es {{count}}",
230
+ })
231
+ ),
232
+
233
+ readTheDocs: t({
234
+ en: "Click on the Vite logo to learn more",
235
+ fr: "Cliquez sur le logo Vite pour en savoir plus",
236
+ es: "Fai clic sul logo Vite per saperne di più",
237
+ }),
238
+ },
239
+ } satisfies Dictionary;
240
+
241
+ export default appContent;
242
+ ```
243
+
244
+ ```javascript fileName="src/app.content.mjs" contentDeclarationFormat="esm"
245
+ import { insert, t } from "intlayer";
246
+
247
+ /** @type {import('intlayer').Dictionary} */
248
+ const appContent = {
249
+ key: "app",
250
+ content: {
251
+ title: "Vite + Vanilla",
252
+
253
+ viteLogoLabel: t({
254
+ en: "Vite Logo",
255
+ fr: "Logo Vite",
256
+ es: "Logo Vite",
257
+ }),
258
+
259
+ count: insert(
260
+ t({
261
+ en: "count is {{count}}",
262
+ fr: "le compte est {{count}}",
263
+ es: "el recuento es {{count}}",
264
+ })
265
+ ),
266
+
267
+ readTheDocs: t({
268
+ en: "Click on the Vite logo to learn more",
269
+ fr: "Cliquez sur le logo Vite pour en savoir plus",
270
+ es: "Fai clic sul logo Vite per saperne di più",
271
+ }),
272
+ },
273
+ };
274
+
275
+ export default appContent;
276
+ ```
277
+
278
+ ```javascript fileName="src/app.content.cjs" contentDeclarationFormat="commonjs"
279
+ const { insert, t } = require("intlayer");
280
+
281
+ /** @type {import('intlayer').Dictionary} */
282
+ const appContent = {
283
+ key: "app",
284
+ content: {
285
+ title: "Vite + Vanilla",
286
+
287
+ viteLogoLabel: t({
288
+ en: "Vite Logo",
289
+ fr: "Logo Vite",
290
+ es: "Logo Vite",
291
+ }),
292
+
293
+ count: insert(
294
+ t({
295
+ en: "count is {{count}}",
296
+ fr: "le compte est {{count}}",
297
+ es: "el recuento es {{count}}",
298
+ })
299
+ ),
300
+
301
+ readTheDocs: t({
302
+ en: "Click on the Vite logo to learn more",
303
+ fr: "Cliquez sur le logo Vite pour en savoir plus",
304
+ es: "Fai clic sul logo Vite per saperne di più",
305
+ }),
306
+ },
307
+ };
308
+
309
+ module.exports = appContent;
310
+ ```
311
+
312
+ ```json fileName="src/app.content.json" contentDeclarationFormat="json"
313
+ {
314
+ "$schema": "https://intlayer.org/schema.json",
315
+ "key": "app",
316
+ "content": {
317
+ "title": "Vite + Vanilla",
318
+ "viteLogoLabel": {
319
+ "nodeType": "translation",
320
+ "translation": {
321
+ "en": "Vite Logo",
322
+ "fr": "Logo Vite",
323
+ "es": "Logo Vite"
324
+ }
325
+ },
326
+ "count": {
327
+ "nodeType": "insertion",
328
+ "insertion": {
329
+ "nodeType": "translation",
330
+ "translation": {
331
+ "en": "count is {{count}}",
332
+ "fr": "le compte est {{count}}",
333
+ "es": "el recuento es {{count}}"
334
+ }
335
+ }
336
+ },
337
+ "readTheDocs": {
338
+ "nodeType": "translation",
339
+ "translation": {
340
+ "en": "Click on the Vite logo to learn more",
341
+ "fr": "Cliquez sur le logo Vite pour en savoir plus",
342
+ "es": "Fai clic sul logo Vite per saperne di più"
343
+ }
344
+ }
345
+ }
346
+ }
347
+ ```
348
+
349
+ > Le tue dichiarazioni dei contenuti possono essere definite ovunque nella tua applicazione, purché siano incluse nella directory `contentDir` (per impostazione predefinita, `./src`). E corrispondano all'estensione del file di dichiarazione del contenuto (per impostazione predefinita, `.content.{json,ts,tsx,js,jsx,mjs,cjs}`).
350
+ >
351
+ > Per maggiori dettagli, consulta la [documentazione sulla dichiarazione dei contenuti](https://github.com/aymericzip/intlayer/blob/main/docs/docs/it/dictionary/content_file.md).
352
+
353
+ ### Passaggio 6: Usa Intlayer nel tuo JavaScript
354
+
355
+ `vanilla-intlayer` rispecchia l'API di superficie di `react-intlayer`: `useIntlayer(key, locale?)` restituisce direttamente il contenuto tradotto. Collega `.onChange()` sul risultato per iscriverti ai cambiamenti di lingua — l'equivalente esplicito di un re-render di React.
356
+
357
+ ```typescript fileName="src/main.ts" codeFormat="typescript"
358
+ import { installIntlayer, useIntlayer } from "vanilla-intlayer";
359
+
360
+ installIntlayer();
361
+
362
+ // Ottieni il contenuto iniziale per la lingua corrente.
363
+ // Collega .onChange() per essere informato ogni volta che la lingua cambia.
364
+ const content = useIntlayer("app").onChange((newContent) => {
365
+ // Re-render o aggiornamento solo dei nodi DOM interessati
366
+ document.querySelector<HTMLHeadingElement>("h1")!.textContent = String(
367
+ newContent.title
368
+ );
369
+ document.querySelector<HTMLParagraphElement>(".read-the-docs")!.textContent =
370
+ String(newContent.readTheDocs);
371
+ });
372
+
373
+ // Render iniziale
374
+ document.querySelector<HTMLHeadingElement>("h1")!.textContent = String(
375
+ content.title
376
+ );
377
+ document.querySelector<HTMLParagraphElement>(".read-the-docs")!.textContent =
378
+ String(content.readTheDocs);
379
+ ```
380
+
381
+ > Accedi ai valori finali come stringhe avvolgendoli in `String()`, che chiama il metodo `toString()` del nodo e restituisce il testo tradotto.
382
+ >
383
+ > Quando hai bisogno del valore per un attributo HTML nativo (es. `alt`, `aria-label`), usa direttamente `.value`:
384
+ >
385
+ > ```typescript
386
+ > img.alt = content.viteLogoLabel.value;
387
+ > ```
388
+
389
+ ### (Opzionale) Passaggio 7: Cambia la lingua dei tuoi contenuti
390
+
391
+ Per cambiare la lingua del tuo contenuto, usa la funzione `setLocale` esposta da `useLocale`.
392
+
393
+ ```typescript fileName="src/locale-switcher.ts" codeFormat="typescript"
394
+ import { getLocaleName } from "intlayer";
395
+ import { useLocale } from "vanilla-intlayer";
396
+
397
+ export function setupLocaleSwitcher(container: HTMLElement): () => void {
398
+ const { locale, availableLocales, setLocale, subscribe } = useLocale();
399
+
400
+ const select = document.createElement("select");
401
+ select.setAttribute("aria-label", "Language");
402
+
403
+ const render = (currentLocale: string) => {
404
+ select.innerHTML = availableLocales
405
+ .map(
406
+ (loc) =>
407
+ `<option value="${loc}"${loc === currentLocale ? " selected" : ""}>
408
+ ${getLocaleName(loc)}
409
+ </option>`
410
+ )
411
+ .join("");
412
+ };
413
+
414
+ render(locale);
415
+ container.appendChild(select);
416
+
417
+ select.addEventListener("change", () => setLocale(select.value as any));
418
+
419
+ // Mantieni il dropdown sincronizzato quando la lingua cambia da altrove
420
+ return subscribe((newLocale) => render(newLocale));
421
+ }
422
+ ```
423
+
424
+ ### (Opzionale) Passaggio 8: Renderizza contenuti Markdown e HTML
425
+
426
+ Intlayer supporta le dichiarazioni di contenuto `md()` e `html()`. In vanilla JS, l'output compilato viene inserito come HTML grezzo tramite `innerHTML`.
427
+
428
+ ```typescript fileName="src/app.content.ts" contentDeclarationFormat="typescript"
429
+ import { md, t, type Dictionary } from "intlayer";
430
+
431
+ const appContent = {
432
+ key: "app",
433
+ content: {
434
+ // ...
435
+ editNote: md(
436
+ t({
437
+ en: "Edit `src/main.ts` and save to test **HMR**",
438
+ fr: "Modifiez `src/main.ts` et enregistrez pour tester **HMR**",
439
+ es: "Edite `src/main.ts` y guarde para probar **HMR**",
440
+ })
441
+ ),
442
+ },
443
+ } satisfies Dictionary;
444
+
445
+ export default appContent;
446
+ ```
447
+
448
+ Compila e inietta l'HTML:
449
+
450
+ ```typescript fileName="src/main.ts" codeFormat="typescript"
451
+ import {
452
+ compileMarkdown,
453
+ installIntlayerMarkdown,
454
+ useIntlayer,
455
+ } from "vanilla-intlayer";
456
+
457
+ installIntlayerMarkdown();
458
+
459
+ const content = useIntlayer("app").onChange((newContent) => {
460
+ const el = document.querySelector<HTMLDivElement>(".edit-note")!;
461
+ el.innerHTML = compileMarkdown(String(newContent.editNote));
462
+ });
463
+
464
+ document.querySelector<HTMLDivElement>(".edit-note")!.innerHTML =
465
+ compileMarkdown(String(content.editNote));
466
+ ```
467
+
468
+ > [!TIP]
469
+ > `String(content.editNote)` chiama `toString()` sull'`IntlayerNode` che restituisce la stringa Markdown grezza. Passala a `compileMarkdown` per ottenere una stringa HTML, quindi impostala tramite `innerHTML`.
470
+
471
+ > [!WARNING]
472
+ > Usa `innerHTML` solo con contenuti fidati. Se il markdown proviene dall'input dell'utente, sanificalo prima (es. con DOMPurify). Puoi installare un renderer di sanificazione dinamicamente:
473
+ >
474
+ > ```typescript
475
+ > import { installIntlayerMarkdownDynamic } from "vanilla-intlayer";
476
+ >
477
+ > await installIntlayerMarkdownDynamic(async () => {
478
+ > const DOMPurify = await import("dompurify");
479
+ > return (markdown) => DOMPurify.sanitize(compileMarkdown(markdown));
480
+ > });
481
+ > ```
482
+
483
+ ### (Opzionale) Passaggio 9: Aggiungi il routing localizzato alla tua applicazione
484
+
485
+ Per creare percorsi unici per ogni lingua (utile per il SEO), puoi utilizzare `intlayerProxy` nella tua configurazione Vite per il rilevamento della lingua lato server.
486
+
487
+ Innanzitutto, aggiungi `intlayerProxy` alla tua configurazione Vite:
488
+
489
+ > Tieni presente che per utilizzare `intlayerProxy` in produzione, devi spostare `vite-intlayer` da `devDependencies` a `dependencies`.
490
+
491
+ ```typescript {3,7} fileName="vite.config.ts" codeFormat="typescript"
492
+ import { defineConfig } from "vite";
493
+ import { intlayer, intlayerProxy } from "vite-intlayer";
494
+
495
+ export default defineConfig({
496
+ plugins: [
497
+ intlayerProxy(), // dovrebbe essere posizionato per primo
498
+ intlayer(),
499
+ ],
500
+ });
501
+ ```
502
+
503
+ ```javascript {3,7} fileName="vite.config.mjs" codeFormat="esm"
504
+ import { defineConfig } from "vite";
505
+ import { intlayer, intlayerProxy } from "vite-intlayer";
506
+
507
+ export default defineConfig({
508
+ plugins: [
509
+ intlayerProxy(), // dovrebbe essere posizionato per primo
510
+ intlayer(),
511
+ ],
512
+ });
513
+ ```
514
+
515
+ ```javascript {3,7} fileName="vite.config.cjs" codeFormat="commonjs"
516
+ const { defineConfig } = require("vite");
517
+ const { intlayer, intlayerProxy } = require("vite-intlayer");
518
+
519
+ module.exports = defineConfig({
520
+ plugins: [
521
+ intlayerProxy(), // dovrebbe essere posizionato per primo
522
+ intlayer(),
523
+ ],
524
+ });
525
+ ```
526
+
527
+ ### (Opzionale) Passaggio 10: Cambia l'URL quando cambia la lingua
528
+
529
+ Per aggiornare l'URL del browser quando cambia la lingua, chiama `useRewriteURL()` dopo aver installato Intlayer:
530
+
531
+ ```typescript fileName="src/main.ts" codeFormat="typescript"
532
+ import { installIntlayer, useRewriteURL } from "vanilla-intlayer";
533
+
534
+ installIntlayer();
535
+
536
+ // Riscrive l'URL immediatamente e ad ogni successivo cambiamento di lingua.
537
+ // Restituisce una funzione di cancellazione dell'iscrizione per la pulizia.
538
+ const stopRewriteURL = useRewriteURL();
539
+ ```
540
+
541
+ ### (Opzionale) Passaggio 11: Passa agli attributi HTML della lingua e della direzione
542
+
543
+ Aggiorna gli attributi `lang` e `dir` del tag `<html>` per corrispondere alla lingua corrente per l'accessibilità e il SEO.
544
+
545
+ ```typescript fileName="src/main.ts" codeFormat="typescript"
546
+ import { getHTMLTextDir } from "intlayer";
547
+ import { installIntlayer, useLocale } from "vanilla-intlayer";
548
+
549
+ installIntlayer();
550
+
551
+ useLocale({
552
+ onLocaleChange: (locale) => {
553
+ document.documentElement.lang = locale;
554
+ document.documentElement.dir = getHTMLTextDir(locale);
555
+ },
556
+ });
557
+ ```
558
+
559
+ ### (Opzionale) Passaggio 12: Caricamento differito dei dizionari per lingua
560
+
561
+ Per le app di grandi dimensioni potresti voler dividere il dizionario di ogni lingua nel proprio chunk. Usa `useDictionaryDynamic` insieme all'`import()` dinamico di Vite:
562
+
563
+ ```typescript fileName="src/app.ts" codeFormat="typescript"
564
+ import { installIntlayer, useDictionaryDynamic } from "vanilla-intlayer";
565
+
566
+ installIntlayer();
567
+
568
+ const unsubscribe = useDictionaryDynamic(
569
+ {
570
+ en: () => import("../.intlayer/dictionaries/en/app.mjs"),
571
+ fr: () => import("../.intlayer/dictionaries/fr/app.mjs"),
572
+ es: () => import("../.intlayer/dictionaries/es/app.mjs"),
573
+ },
574
+ "app"
575
+ ).onChange((content) => {
576
+ document.querySelector("h1")!.textContent = String(content.title);
577
+ });
578
+ ```
579
+
580
+ > Il bundle di ogni lingua viene recuperato solo quando quella lingua diventa attiva e il risultato viene memorizzato nella cache — i successivi passaggi alla stessa lingua sono istantanei.
581
+
582
+ ### (Opzionale) Passaggio 13: Estract il contenuto dei tuoi componenti
583
+
584
+ Se hai una base di codice esistente, trasformare migliaia di file può richiedere molto tempo.
585
+
586
+ Per facilitare questo processo, Intlayer propone un [compilatore](https://github.com/aymericzip/intlayer/blob/main/docs/docs/it/compiler.md) / [estrattore](https://github.com/aymericzip/intlayer/blob/main/docs/docs/it/cli/extract.md) per trasformare i tuoi componenti ed estrarre il contenuto.
587
+
588
+ Per configurarlo, puoi aggiungere una sezione `compiler` nel tuo file `intlayer.config.ts`:
589
+
590
+ ```typescript fileName="intlayer.config.ts" codeFormat="typescript"
591
+ import { type IntlayerConfig } from "intlayer";
592
+
593
+ const config: IntlayerConfig = {
594
+ // ... Resto della tua config
595
+ compiler: {
596
+ /**
597
+ * Indica se il compilatore deve essere abilitato.
598
+ */
599
+ enabled: true,
600
+
601
+ /**
602
+ * Definisce il percorso dei file di output
603
+ */
604
+ output: ({ fileName, extension }) => `./${fileName}${extension}`,
605
+
606
+ /**
607
+ * Indica se i componenti devono essere salvati dopo essere stati trasformati.
608
+ * In questo modo, il compilatore può essere eseguito solo una volta per trasformare l'app e quindi può essere rimosso.
609
+ */
610
+ saveComponents: false,
611
+
612
+ /**
613
+ * Prefisso della chiave del dizionario
614
+ */
615
+ dictionaryKeyPrefix: "",
616
+ },
617
+ };
618
+
619
+ export default config;
620
+ ```
621
+
622
+ <Tabs>
623
+ <Tab value='Comando Extract'>
624
+
625
+ Esegui l'estrattore per trasformare i tuoi componenti ed estrarre il contenuto
626
+
627
+ ```bash packageManager="npm"
628
+ npx intlayer extract
629
+ ```
630
+
631
+ ```bash packageManager="pnpm"
632
+ pnpm intlayer extract
633
+ ```
634
+
635
+ ```bash packageManager="yarn"
636
+ yarn intlayer extract
637
+ ```
638
+
639
+ ```bash packageManager="bun"
640
+ bunx intlayer extract
641
+ ```
642
+
643
+ </Tab>
644
+ <Tab value='Compilatore Babel'>
645
+
646
+ Aggiorna il tuo `vite.config.ts` per includere il plugin `intlayerCompiler`:
647
+
648
+ ```ts fileName="vite.config.ts"
649
+ import { defineConfig } from "vite";
650
+ import { intlayer, intlayerCompiler } from "vite-intlayer";
651
+
652
+ export default defineConfig({
653
+ plugins: [
654
+ intlayer(),
655
+ intlayerCompiler(), // Aggiunge il plugin del compilatore
656
+ ],
657
+ });
658
+ ```
659
+
660
+ ```bash packageManager="npm"
661
+ npm run build # O npm run dev
662
+ ```
663
+
664
+ ```bash packageManager="pnpm"
665
+ pnpm run build # O pnpm run dev
666
+ ```
667
+
668
+ ```bash packageManager="yarn"
669
+ yarn build # O yarn dev
670
+ ```
671
+
672
+ ```bash packageManager="bun"
673
+ bun run build # O bun run dev
674
+ ```
675
+
676
+ </Tab>
677
+ </Tabs>
678
+
679
+ ### Configura TypeScript
680
+
681
+ Assicurati che la tua configurazione TypeScript includa i tipi autogenerati.
682
+
683
+ ```json5 fileName="tsconfig.json"
684
+ {
685
+ "compilerOptions": {
686
+ // ...
687
+ },
688
+ "include": ["src", ".intlayer/**/*.ts"],
689
+ }
690
+ ```
691
+
692
+ ### Configurazione Git
693
+
694
+ Si consiglia di ignorare i file generati da Intlayer. Ciò consente di evitare di inserirli nel proprio repository Git.
695
+
696
+ Per farlo, puoi aggiungere le seguenti istruzioni al tuo file `.gitignore`:
697
+
698
+ ```bash
699
+ # Ignora i file generati da Intlayer
700
+ .intlayer
701
+ ```
702
+
703
+ ### Estensione VS Code
704
+
705
+ Per migliorare la tua esperienza di sviluppo con Intlayer, puoi installare l'**estensione ufficiale di Intlayer per VS Code**.
706
+
707
+ [Installa dal VS Code Marketplace](https://marketplace.visualstudio.com/items?itemName=intlayer.intlayer-vs-code-extension)
708
+
709
+ Questa estensione fornisce:
710
+
711
+ - **Autocompletamento** per le chiavi di traduzione.
712
+ - **Rilevamento degli errori in tempo reale** per le traduzioni mancanti.
713
+ - **Anteprime in linea** del contenuto tradotto.
714
+ - **Azioni rapide** per creare e aggiornare facilmente le traduzioni.
715
+
716
+ Per maggiori dettagli su come utilizzare l'estensione, consulta la [documentazione dell'estensione Intlayer per VS Code](https://intlayer.org/doc/vs-code-extension).
717
+
718
+ ---
719
+
720
+ ### Vai oltre
721
+
722
+ Per andare oltre, puoi implementare l'[editor visuale](https://github.com/aymericzip/intlayer/blob/main/docs/docs/it/intlayer_visual_editor.md) o esternalizzare il tuo contenuto utilizzando il [CMS](https://github.com/aymericzip/intlayer/blob/main/docs/docs/it/intlayer_CMS.md).