@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,725 @@
1
+ ---
2
+ createdAt: 2026-03-23
3
+ updatedAt: 2026-03-23
4
+ title: i18n Vite + Vanilla JS - How to translate a Vanilla JS app in 2026
5
+ description: Discover how to make your Vite and Vanilla JS website multilingual. Follow the documentation to internationalise (i18n) and translate it.
6
+ keywords:
7
+ - Internationalisation
8
+ - Documentation
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
+ # Translate your Vite and Vanilla JS website using Intlayer | Internationalisation (i18n)
27
+
28
+ ## Table of Contents
29
+
30
+ <TOC/>
31
+
32
+ ## What is Intlayer?
33
+
34
+ **Intlayer** is an innovative, open-source internationalisation (i18n) library designed to simplify multilingual support in modern web applications.
35
+
36
+ With Intlayer, you can:
37
+
38
+ - **Easily manage translations** using declarative dictionaries at the component level.
39
+ - **Dynamically localise metadata**, routes, and content.
40
+ - **Ensure TypeScript support** with autogenerated types, improving autocompletion and error detection.
41
+ - **Benefit from advanced features**, like dynamic locale detection and switching.
42
+
43
+ ---
44
+
45
+ ## Step-by-Step Guide to Set Up Intlayer in a Vite and Vanilla JS Application
46
+
47
+ ### Step 1: Install Dependencies
48
+
49
+ Install the necessary packages using 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
+ The core package that provides internationalisation tools for configuration management, translation, [content declaration](https://github.com/aymericzip/intlayer/blob/main/docs/docs/en-GB/dictionary/content_file.md), transpilation, and [CLI commands](https://github.com/aymericzip/intlayer/blob/main/docs/docs/en-GB/cli/index.md).
77
+
78
+ - **vanilla-intlayer**
79
+ The package that integrates Intlayer with plain JavaScript / TypeScript applications. It provides a pub/sub singleton (`IntlayerClient`) and callback-based helpers (`useIntlayer`, `useLocale`, etc.) so any part of your app can react to locale changes without depending on a UI framework.
80
+
81
+ - **vite-intlayer**
82
+ Includes the Vite plugin for integrating Intlayer with the [Vite bundler](https://vite.dev/guide/why.html#why-bundle-for-production), as well as middleware for detecting the user's preferred locale, managing cookies, and handling URL redirection.
83
+
84
+ ### Step 2: Configuration of your project
85
+
86
+ Create a config file to configure the languages of your application:
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
+ // Your other locales
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
+ // Your other locales
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
+ // Your other locales
136
+ ],
137
+ defaultLocale: Locales.ENGLISH,
138
+ },
139
+ };
140
+
141
+ module.exports = config;
142
+ ```
143
+
144
+ > Through this configuration file, you can set up localised URLs, middleware redirection, cookie names, the location and extension of your content declarations, disable Intlayer logs in the console, and more. For a complete list of available parameters, refer to the [configuration documentation](https://github.com/aymericzip/intlayer/blob/main/docs/docs/en-GB/configuration.md).
145
+
146
+ ### Step 3: Integrate Intlayer in Your Vite Configuration
147
+
148
+ Add the intlayer plugin into your configuration.
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
+ > The `intlayer()` Vite plugin is used to integrate Intlayer with Vite. It ensures the building of content declaration files and monitors them in development mode. It defines Intlayer environment variables within the Vite application. Additionally, it provides aliases to optimise performance.
181
+
182
+ ### Step 4: Bootstrap Intlayer in your entry point
183
+
184
+ Call `installIntlayer()` **before** any content is rendered so that the global locale singleton is ready.
185
+
186
+ ```typescript fileName="src/main.ts" codeFormat="typescript"
187
+ import { installIntlayer } from "vanilla-intlayer";
188
+
189
+ // Must be called before rendering any i18n content.
190
+ installIntlayer();
191
+
192
+ // Import and run your app modules.
193
+ import "./app.js";
194
+ ```
195
+
196
+ If you also use `md()` content declarations (Markdown), install the markdown renderer as well:
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
+ ### Step 5: Declare Your Content
208
+
209
+ Create and manage your content declarations to store translations:
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: "Haga clic en el logotipo de Vite para obtener más información",
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: "Haga clic en le logo de Vite para obtener más información",
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: "Haga clic en le logo de Vite para obtener más información",
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": "Haga clic en le logo de Vite pour obtenir plus d'informations"
343
+ }
344
+ }
345
+ }
346
+ }
347
+ ```
348
+
349
+ > Your content declarations can be defined anywhere in your application as soon as they are included in the `contentDir` directory (by default, `./src`). And match the content declaration file extension (by default, `.content.{json,ts,tsx,js,jsx,mjs,cjs}`).
350
+ >
351
+ > For more details, refer to the [content declaration documentation](https://github.com/aymericzip/intlayer/blob/main/docs/docs/en-GB/dictionary/content_file.md).
352
+
353
+ ### Step 6: Use Intlayer in Your JavaScript
354
+
355
+ `vanilla-intlayer` mirrors the `react-intlayer` surface API: `useIntlayer(key, locale?)` returns the translated content directly. Chain `.onChange()` on the result to subscribe to locale changes — the explicit equivalent of a React re-render.
356
+
357
+ ```typescript fileName="src/main.ts" codeFormat="typescript"
358
+ import { installIntlayer, useIntlayer } from "vanilla-intlayer";
359
+
360
+ installIntlayer();
361
+
362
+ // Get the initial content for the current locale.
363
+ // Chain .onChange() to be notified whenever the locale changes.
364
+ const content = useIntlayer("app").onChange((newContent) => {
365
+ // Re-render or patch only the affected DOM nodes
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
+ // Initial render
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
+ > Access leaf values as strings by wrapping them in `String()`, which calls the node's `toString()` method and returns the translated text.
382
+ >
383
+ > When you need the value for a native HTML attribute (e.g. `alt`, `aria-label`), use `.value` directly:
384
+ >
385
+ > ```typescript
386
+ > img.alt = content.viteLogoLabel.value;
387
+ > ```
388
+
389
+ ### (Optional) Step 7: Change the language of your content
390
+
391
+ To change the language of your content, use the `setLocale` function exposed by `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
+ // Keep the dropdown in sync when locale changes from elsewhere
420
+ return subscribe((newLocale) => render(newLocale));
421
+ }
422
+ ```
423
+
424
+ ### (Optional) Step 8: Render Markdown and HTML content
425
+
426
+ Intlayer supports `md()` and `html()` content declarations. In vanilla JS, compiled output is inserted as raw HTML via `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
+ Compile and inject the 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)` calls `toString()` on the `IntlayerNode` which returns the raw Markdown string. Pass it to `compileMarkdown` to get an HTML string, then set it via `innerHTML`.
470
+
471
+ > [!WARNING]
472
+ > Only use `innerHTML` with trusted content. If the markdown comes from user input, sanitise it first (e.g. with DOMPurify). You can install a sanitising renderer dynamically:
473
+ >
474
+ > ```typescript
475
+ > import { installIntlayerMarkdownDynamic } from "vanilla-intlayer";
476
+ >
477
+ > await installIntlayerMarkdownDynamic(async () => {
478
+ > const DOMPurify = await import("dompurify");
479
+ > return (markdown) => DOMPurify.sanitise(compileMarkdown(markdown));
480
+ > });
481
+ > ```
482
+
483
+ ### (Optional) Step 9: Add localised Routing to your application
484
+
485
+ To make unique routes for each language (useful for SEO), you can use `intlayerProxy` in your Vite config for server-side locale detection.
486
+
487
+ First, add `intlayerProxy` to your Vite config:
488
+
489
+ > Note that to use `intlayerProxy` in production, you need to move `vite-intlayer` from `devDependencies` to `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(), // should be placed first
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(), // should be placed first
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(), // should be placed first
522
+ intlayer(),
523
+ ],
524
+ });
525
+ ```
526
+
527
+ ### (Optional) Step 10: Change the URL when the locale changes
528
+
529
+ To update the browser URL when the locale changes, call `useRewriteURL()` after installing Intlayer:
530
+
531
+ ```typescript fileName="src/main.ts" codeFormat="typescript"
532
+ import { installIntlayer, useRewriteURL } from "vanilla-intlayer";
533
+
534
+ installIntlayer();
535
+
536
+ // Rewrites the URL immediately and on every subsequent locale change.
537
+ // Returns an unsubscribe function for cleanup.
538
+ const stopRewriteURL = useRewriteURL();
539
+ ```
540
+
541
+ ### (Optional) Step 11: Switch the HTML Language and Direction Attributes
542
+
543
+ Update the `<html>` tag's `lang` and `dir` attributes to match the current locale for accessibility and 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
+ ### (Optional) Step 12: Lazy-load dictionaries per locale
560
+
561
+ For large apps you may want to split each locale's dictionary into its own chunk. Use `useDictionaryDynamic` alongside Vite's dynamic `import()`:
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
+ > Each locale's bundle is fetched only when that locale becomes active and the result is cached — subsequent switches to the same locale are instant.
581
+
582
+ ### (Optional) Step 13: Extract the content of your components
583
+
584
+ If you have an existing codebase, transforming thousands of files can be time-consuming.
585
+
586
+ To ease this process, Intlayer proposes a [compiler](https://github.com/aymericzip/intlayer/blob/main/docs/docs/en-GB/compiler.md) / [extractor](https://github.com/aymericzip/intlayer/blob/main/docs/docs/en-GB/cli/extract.md) to transform your components and extract the content.
587
+
588
+ To set it up, you can add a `compiler` section in your `intlayer.config.ts` file:
589
+
590
+ ```typescript fileName="intlayer.config.ts" codeFormat="typescript"
591
+ import { type IntlayerConfig } from "intlayer";
592
+
593
+ const config: IntlayerConfig = {
594
+ // ... Rest of your config
595
+ compiler: {
596
+ /**
597
+ * Indicates if the compiler should be enabled.
598
+ */
599
+ enabled: true,
600
+
601
+ /**
602
+ * Defines the output files path
603
+ */
604
+ output: ({ fileName, extension }) => `./${fileName}${extension}`,
605
+
606
+ /**
607
+ * Indicates if the components should be saved after being transformed.
608
+ *
609
+ * - If `true`, the compiler will rewrite the component file in the disk. So the transformation will be permanent, and the compiler will skip the transformation for the next process. That way, the compiler can transform the app, and then it can be removed.
610
+ *
611
+ * - If `false`, the compiler will inject the `useIntlayer()` function call into the code in the build output only, and keep the base codebase intact. The transformation will be done only in memory.
612
+ */
613
+ saveComponents: false,
614
+
615
+ /**
616
+ * Dictionary key prefix
617
+ */
618
+ dictionaryKeyPrefix: "",
619
+ },
620
+ };
621
+
622
+ export default config;
623
+ ```
624
+
625
+ <Tabs>
626
+ <Tab value='Extract command'>
627
+
628
+ Run the extractor to transform your components and extract the content
629
+
630
+ ```bash packageManager="npm"
631
+ npx intlayer extract
632
+ ```
633
+
634
+ ```bash packageManager="pnpm"
635
+ pnpm intlayer extract
636
+ ```
637
+
638
+ ```bash packageManager="yarn"
639
+ yarn intlayer extract
640
+ ```
641
+
642
+ ```bash packageManager="bun"
643
+ bunx intlayer extract
644
+ ```
645
+
646
+ </Tab>
647
+ <Tab value='Babel compiler'>
648
+
649
+ Update your `vite.config.ts` to include the `intlayerCompiler` plugin:
650
+
651
+ ```ts fileName="vite.config.ts"
652
+ import { defineConfig } from "vite";
653
+ import { intlayer, intlayerCompiler } from "vite-intlayer";
654
+
655
+ export default defineConfig({
656
+ plugins: [
657
+ intlayer(),
658
+ intlayerCompiler(), // Adds the compiler plugin
659
+ ],
660
+ });
661
+ ```
662
+
663
+ ```bash packageManager="npm"
664
+ npm run build # Or npm run dev
665
+ ```
666
+
667
+ ```bash packageManager="pnpm"
668
+ pnpm run build # Or pnpm run dev
669
+ ```
670
+
671
+ ```bash packageManager="yarn"
672
+ yarn build # Or yarn dev
673
+ ```
674
+
675
+ ```bash packageManager="bun"
676
+ bun run build # Or bun run dev
677
+ ```
678
+
679
+ </Tab>
680
+ </Tabs>
681
+
682
+ ### Configure TypeScript
683
+
684
+ Ensure your TypeScript configuration includes the autogenerated types.
685
+
686
+ ```json5 fileName="tsconfig.json"
687
+ {
688
+ "compilerOptions": {
689
+ // ...
690
+ },
691
+ "include": ["src", ".intlayer/**/*.ts"],
692
+ }
693
+ ```
694
+
695
+ ### Git Configuration
696
+
697
+ It is recommended to ignore the files generated by Intlayer. This allows you to avoid committing them to your Git repository.
698
+
699
+ To do this, you can add the following instructions to your `.gitignore` file:
700
+
701
+ ```bash
702
+ # Ignore the files generated by Intlayer
703
+ .intlayer
704
+ ```
705
+
706
+ ### VS Code Extension
707
+
708
+ To improve your development experience with Intlayer, you can install the official **Intlayer VS Code Extension**.
709
+
710
+ [Install from the VS Code Marketplace](https://marketplace.visualstudio.com/items?itemName=intlayer.intlayer-vs-code-extension)
711
+
712
+ This extension provides:
713
+
714
+ - **Autocompletion** for translation keys.
715
+ - **Real-time error detection** for missing translations.
716
+ - **Inline previews** of translated content.
717
+ - **Quick actions** to easily create and update translations.
718
+
719
+ For more details on how to use the extension, refer to the [Intlayer VS Code Extension documentation](https://intlayer.org/doc/vs-code-extension).
720
+
721
+ ---
722
+
723
+ ### Go Further
724
+
725
+ To go further, you can implement the [visual editor](https://github.com/aymericzip/intlayer/blob/main/docs/docs/en-GB/intlayer_visual_editor.md) or externalise your content using the [CMS](https://github.com/aymericzip/intlayer/blob/main/docs/docs/en-GB/intlayer_CMS.md).