@intlayer/docs 8.12.1 → 8.12.3

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 (774) hide show
  1. package/dist/cjs/blog.cjs.map +1 -1
  2. package/dist/cjs/common.cjs.map +1 -1
  3. package/dist/cjs/doc.cjs.map +1 -1
  4. package/dist/cjs/frequentQuestions.cjs.map +1 -1
  5. package/dist/cjs/generated/blog.entry.cjs +1 -0
  6. package/dist/cjs/generated/blog.entry.cjs.map +1 -1
  7. package/dist/cjs/generated/docs.entry.cjs +121 -0
  8. package/dist/cjs/generated/docs.entry.cjs.map +1 -1
  9. package/dist/cjs/generated/frequentQuestions.entry.cjs +1 -0
  10. package/dist/cjs/generated/frequentQuestions.entry.cjs.map +1 -1
  11. package/dist/cjs/generated/legal.entry.cjs +1 -0
  12. package/dist/cjs/generated/legal.entry.cjs.map +1 -1
  13. package/dist/cjs/legal.cjs.map +1 -1
  14. package/dist/esm/blog.mjs.map +1 -1
  15. package/dist/esm/common.mjs.map +1 -1
  16. package/dist/esm/doc.mjs.map +1 -1
  17. package/dist/esm/frequentQuestions.mjs.map +1 -1
  18. package/dist/esm/generated/blog.entry.mjs.map +1 -1
  19. package/dist/esm/generated/docs.entry.mjs +120 -0
  20. package/dist/esm/generated/docs.entry.mjs.map +1 -1
  21. package/dist/esm/generated/frequentQuestions.entry.mjs.map +1 -1
  22. package/dist/esm/generated/legal.entry.mjs.map +1 -1
  23. package/dist/esm/legal.mjs.map +1 -1
  24. package/dist/types/blog.d.ts.map +1 -1
  25. package/dist/types/common.d.ts.map +1 -1
  26. package/dist/types/doc.d.ts.map +1 -1
  27. package/dist/types/frequentQuestions.d.ts.map +1 -1
  28. package/dist/types/generated/docs.entry.d.ts +6 -0
  29. package/dist/types/generated/docs.entry.d.ts.map +1 -1
  30. package/dist/types/legal.d.ts.map +1 -1
  31. package/docs/ar/bundle_optimization.md +250 -102
  32. package/docs/ar/configuration.md +10 -9
  33. package/docs/ar/intlayer_with_adonisjs.md +1 -1
  34. package/docs/ar/intlayer_with_analog.md +1 -1
  35. package/docs/ar/intlayer_with_angular_19.md +1 -1
  36. package/docs/ar/intlayer_with_angular_21.md +1 -1
  37. package/docs/ar/intlayer_with_astro.md +1 -1
  38. package/docs/ar/intlayer_with_astro_lit.md +1 -1
  39. package/docs/ar/intlayer_with_astro_preact.md +1 -1
  40. package/docs/ar/intlayer_with_astro_react.md +1 -1
  41. package/docs/ar/intlayer_with_astro_solid.md +1 -1
  42. package/docs/ar/intlayer_with_astro_svelte.md +1 -1
  43. package/docs/ar/intlayer_with_astro_vanilla.md +1 -1
  44. package/docs/ar/intlayer_with_astro_vue.md +1 -1
  45. package/docs/ar/intlayer_with_create_react_app.md +1 -1
  46. package/docs/ar/intlayer_with_express.md +1 -1
  47. package/docs/ar/intlayer_with_fastify.md +1 -1
  48. package/docs/ar/intlayer_with_hono.md +1 -1
  49. package/docs/ar/intlayer_with_nestjs.md +1 -1
  50. package/docs/ar/intlayer_with_nextjs_14.md +1 -1
  51. package/docs/ar/intlayer_with_nextjs_15.md +1 -1
  52. package/docs/ar/intlayer_with_nextjs_16.md +1 -1
  53. package/docs/ar/intlayer_with_nextjs_no_locale_path.md +1 -1
  54. package/docs/ar/intlayer_with_nuxt.md +1 -1
  55. package/docs/ar/intlayer_with_react_router_v7.md +1 -1
  56. package/docs/ar/intlayer_with_react_router_v7_fs_routes.md +1 -1
  57. package/docs/ar/intlayer_with_tanstack+solid.md +1 -1
  58. package/docs/ar/intlayer_with_tanstack.md +1 -1
  59. package/docs/ar/intlayer_with_vanilla.md +1 -1
  60. package/docs/ar/intlayer_with_vite+lit.md +1 -1
  61. package/docs/ar/intlayer_with_vite+preact.md +1 -1
  62. package/docs/ar/intlayer_with_vite+react.md +1 -1
  63. package/docs/ar/intlayer_with_vite+solid.md +1 -1
  64. package/docs/ar/intlayer_with_vite+svelte.md +1 -1
  65. package/docs/ar/intlayer_with_vite+vanilla.md +1 -1
  66. package/docs/ar/intlayer_with_vite+vue.md +1 -1
  67. package/docs/bn/bundle_optimization.md +252 -104
  68. package/docs/bn/configuration.md +10 -9
  69. package/docs/bn/intlayer_with_angular_21.md +1 -1
  70. package/docs/bn/intlayer_with_fastify.md +1 -1
  71. package/docs/bn/intlayer_with_hono.md +1 -1
  72. package/docs/bn/intlayer_with_vanilla.md +1 -1
  73. package/docs/bn/intlayer_with_vite+lit.md +1 -1
  74. package/docs/bn/intlayer_with_vite+vanilla.md +1 -1
  75. package/docs/cs/bundle_optimization.md +253 -105
  76. package/docs/cs/configuration.md +10 -9
  77. package/docs/cs/intlayer_with_angular_21.md +1 -1
  78. package/docs/cs/intlayer_with_fastify.md +1 -1
  79. package/docs/cs/intlayer_with_hono.md +1 -1
  80. package/docs/cs/intlayer_with_vanilla.md +1 -1
  81. package/docs/cs/intlayer_with_vite+lit.md +1 -1
  82. package/docs/cs/intlayer_with_vite+vanilla.md +1 -1
  83. package/docs/de/bundle_optimization.md +245 -97
  84. package/docs/de/configuration.md +10 -9
  85. package/docs/de/intlayer_with_adonisjs.md +1 -1
  86. package/docs/de/intlayer_with_analog.md +1 -1
  87. package/docs/de/intlayer_with_angular_19.md +1 -1
  88. package/docs/de/intlayer_with_angular_21.md +1 -1
  89. package/docs/de/intlayer_with_astro.md +1 -1
  90. package/docs/de/intlayer_with_astro_lit.md +1 -1
  91. package/docs/de/intlayer_with_astro_preact.md +1 -1
  92. package/docs/de/intlayer_with_astro_react.md +1 -1
  93. package/docs/de/intlayer_with_astro_solid.md +1 -1
  94. package/docs/de/intlayer_with_astro_svelte.md +1 -1
  95. package/docs/de/intlayer_with_astro_vanilla.md +1 -1
  96. package/docs/de/intlayer_with_astro_vue.md +1 -1
  97. package/docs/de/intlayer_with_create_react_app.md +1 -1
  98. package/docs/de/intlayer_with_express.md +1 -1
  99. package/docs/de/intlayer_with_fastify.md +1 -1
  100. package/docs/de/intlayer_with_hono.md +1 -1
  101. package/docs/de/intlayer_with_nestjs.md +1 -1
  102. package/docs/de/intlayer_with_nextjs_14.md +1 -1
  103. package/docs/de/intlayer_with_nextjs_15.md +1 -1
  104. package/docs/de/intlayer_with_nextjs_16.md +1 -1
  105. package/docs/de/intlayer_with_nextjs_no_locale_path.md +1 -1
  106. package/docs/de/intlayer_with_nuxt.md +1 -1
  107. package/docs/de/intlayer_with_react_router_v7.md +1 -1
  108. package/docs/de/intlayer_with_react_router_v7_fs_routes.md +1 -1
  109. package/docs/de/intlayer_with_tanstack+solid.md +1 -1
  110. package/docs/de/intlayer_with_tanstack.md +1 -1
  111. package/docs/de/intlayer_with_vanilla.md +1 -1
  112. package/docs/de/intlayer_with_vite+lit.md +1 -1
  113. package/docs/de/intlayer_with_vite+preact.md +1 -1
  114. package/docs/de/intlayer_with_vite+react.md +1 -1
  115. package/docs/de/intlayer_with_vite+solid.md +1 -1
  116. package/docs/de/intlayer_with_vite+svelte.md +1 -1
  117. package/docs/de/intlayer_with_vite+vanilla.md +1 -1
  118. package/docs/de/intlayer_with_vite+vue.md +1 -1
  119. package/docs/de/migration_from_i18next_to_intlayer.md +313 -0
  120. package/docs/de/migration_from_next-i18next_to_intlayer.md +338 -0
  121. package/docs/de/migration_from_next-intl_to_intlayer.md +347 -0
  122. package/docs/de/migration_from_nuxtjs_i18n_to_intlayer.md +311 -0
  123. package/docs/de/migration_from_react-i18next_to_intlayer.md +367 -0
  124. package/docs/de/migration_from_vue-i18n_to_intlayer.md +342 -0
  125. package/docs/en/bundle_optimization.md +172 -49
  126. package/docs/en/configuration.md +10 -9
  127. package/docs/en/intlayer_with_adonisjs.md +1 -1
  128. package/docs/en/intlayer_with_analog.md +1 -1
  129. package/docs/en/intlayer_with_angular_19.md +1 -1
  130. package/docs/en/intlayer_with_angular_21.md +1 -1
  131. package/docs/en/intlayer_with_astro.md +1 -1
  132. package/docs/en/intlayer_with_astro_lit.md +1 -1
  133. package/docs/en/intlayer_with_astro_preact.md +1 -1
  134. package/docs/en/intlayer_with_astro_react.md +1 -1
  135. package/docs/en/intlayer_with_astro_solid.md +1 -1
  136. package/docs/en/intlayer_with_astro_svelte.md +1 -1
  137. package/docs/en/intlayer_with_astro_vanilla.md +1 -1
  138. package/docs/en/intlayer_with_astro_vue.md +1 -1
  139. package/docs/en/intlayer_with_create_react_app.md +1 -1
  140. package/docs/en/intlayer_with_express.md +1 -1
  141. package/docs/en/intlayer_with_fastify.md +1 -1
  142. package/docs/en/intlayer_with_hono.md +1 -1
  143. package/docs/en/intlayer_with_nestjs.md +1 -1
  144. package/docs/en/intlayer_with_nextjs_14.md +1 -1
  145. package/docs/en/intlayer_with_nextjs_15.md +1 -1
  146. package/docs/en/intlayer_with_nextjs_16.md +1 -1
  147. package/docs/en/intlayer_with_nextjs_no_locale_path.md +1 -1
  148. package/docs/en/intlayer_with_nuxt.md +1 -1
  149. package/docs/en/intlayer_with_react_router_v7.md +1 -1
  150. package/docs/en/intlayer_with_react_router_v7_fs_routes.md +1 -1
  151. package/docs/en/intlayer_with_tanstack+solid.md +1 -1
  152. package/docs/en/intlayer_with_tanstack.md +1 -1
  153. package/docs/en/intlayer_with_vanilla.md +1 -1
  154. package/docs/en/intlayer_with_vite+lit.md +1 -1
  155. package/docs/en/intlayer_with_vite+preact.md +1 -1
  156. package/docs/en/intlayer_with_vite+react.md +1 -1
  157. package/docs/en/intlayer_with_vite+solid.md +1 -1
  158. package/docs/en/intlayer_with_vite+svelte.md +1 -1
  159. package/docs/en/intlayer_with_vite+vanilla.md +1 -1
  160. package/docs/en/intlayer_with_vite+vue.md +1 -1
  161. package/docs/en/migration_from_i18next_to_intlayer.md +316 -0
  162. package/docs/en/migration_from_next-i18next_to_intlayer.md +338 -0
  163. package/docs/en/migration_from_next-intl_to_intlayer.md +347 -0
  164. package/docs/en/migration_from_nuxtjs_i18n_to_intlayer.md +311 -0
  165. package/docs/en/migration_from_react-i18next_to_intlayer.md +367 -0
  166. package/docs/en/migration_from_vue-i18n_to_intlayer.md +342 -0
  167. package/docs/en-GB/bundle_optimization.md +230 -82
  168. package/docs/en-GB/configuration.md +10 -9
  169. package/docs/en-GB/intlayer_with_adonisjs.md +1 -1
  170. package/docs/en-GB/intlayer_with_analog.md +1 -1
  171. package/docs/en-GB/intlayer_with_angular_19.md +1 -1
  172. package/docs/en-GB/intlayer_with_angular_21.md +1 -1
  173. package/docs/en-GB/intlayer_with_astro.md +1 -1
  174. package/docs/en-GB/intlayer_with_astro_lit.md +1 -1
  175. package/docs/en-GB/intlayer_with_astro_preact.md +1 -1
  176. package/docs/en-GB/intlayer_with_astro_react.md +1 -1
  177. package/docs/en-GB/intlayer_with_astro_solid.md +1 -1
  178. package/docs/en-GB/intlayer_with_astro_svelte.md +1 -1
  179. package/docs/en-GB/intlayer_with_astro_vanilla.md +1 -1
  180. package/docs/en-GB/intlayer_with_astro_vue.md +1 -1
  181. package/docs/en-GB/intlayer_with_create_react_app.md +1 -1
  182. package/docs/en-GB/intlayer_with_express.md +1 -1
  183. package/docs/en-GB/intlayer_with_fastify.md +1 -1
  184. package/docs/en-GB/intlayer_with_hono.md +1 -1
  185. package/docs/en-GB/intlayer_with_nestjs.md +1 -1
  186. package/docs/en-GB/intlayer_with_nextjs_14.md +1 -1
  187. package/docs/en-GB/intlayer_with_nextjs_15.md +1 -1
  188. package/docs/en-GB/intlayer_with_nextjs_16.md +1 -1
  189. package/docs/en-GB/intlayer_with_nextjs_no_locale_path.md +1 -1
  190. package/docs/en-GB/intlayer_with_nuxt.md +1 -1
  191. package/docs/en-GB/intlayer_with_react_router_v7.md +1 -1
  192. package/docs/en-GB/intlayer_with_react_router_v7_fs_routes.md +1 -1
  193. package/docs/en-GB/intlayer_with_tanstack+solid.md +1 -1
  194. package/docs/en-GB/intlayer_with_tanstack.md +1 -1
  195. package/docs/en-GB/intlayer_with_vanilla.md +1 -1
  196. package/docs/en-GB/intlayer_with_vite+lit.md +1 -1
  197. package/docs/en-GB/intlayer_with_vite+preact.md +1 -1
  198. package/docs/en-GB/intlayer_with_vite+react.md +1 -1
  199. package/docs/en-GB/intlayer_with_vite+solid.md +1 -1
  200. package/docs/en-GB/intlayer_with_vite+svelte.md +1 -1
  201. package/docs/en-GB/intlayer_with_vite+vanilla.md +1 -1
  202. package/docs/en-GB/intlayer_with_vite+vue.md +1 -1
  203. package/docs/es/bundle_optimization.md +250 -102
  204. package/docs/es/configuration.md +10 -9
  205. package/docs/es/intlayer_with_adonisjs.md +1 -1
  206. package/docs/es/intlayer_with_analog.md +1 -1
  207. package/docs/es/intlayer_with_angular_19.md +1 -1
  208. package/docs/es/intlayer_with_angular_21.md +1 -1
  209. package/docs/es/intlayer_with_astro.md +1 -1
  210. package/docs/es/intlayer_with_astro_lit.md +1 -1
  211. package/docs/es/intlayer_with_astro_preact.md +1 -1
  212. package/docs/es/intlayer_with_astro_react.md +1 -1
  213. package/docs/es/intlayer_with_astro_solid.md +1 -1
  214. package/docs/es/intlayer_with_astro_svelte.md +1 -1
  215. package/docs/es/intlayer_with_astro_vanilla.md +1 -1
  216. package/docs/es/intlayer_with_astro_vue.md +1 -1
  217. package/docs/es/intlayer_with_create_react_app.md +1 -1
  218. package/docs/es/intlayer_with_express.md +1 -1
  219. package/docs/es/intlayer_with_fastify.md +1 -1
  220. package/docs/es/intlayer_with_hono.md +1 -1
  221. package/docs/es/intlayer_with_nestjs.md +1 -1
  222. package/docs/es/intlayer_with_nextjs_14.md +1 -1
  223. package/docs/es/intlayer_with_nextjs_15.md +1 -1
  224. package/docs/es/intlayer_with_nextjs_16.md +1 -1
  225. package/docs/es/intlayer_with_nextjs_no_locale_path.md +1 -1
  226. package/docs/es/intlayer_with_nuxt.md +1 -1
  227. package/docs/es/intlayer_with_react_router_v7.md +1 -1
  228. package/docs/es/intlayer_with_react_router_v7_fs_routes.md +1 -1
  229. package/docs/es/intlayer_with_tanstack+solid.md +1 -1
  230. package/docs/es/intlayer_with_tanstack.md +1 -1
  231. package/docs/es/intlayer_with_vanilla.md +1 -1
  232. package/docs/es/intlayer_with_vite+lit.md +1 -1
  233. package/docs/es/intlayer_with_vite+preact.md +1 -1
  234. package/docs/es/intlayer_with_vite+react.md +1 -1
  235. package/docs/es/intlayer_with_vite+solid.md +1 -1
  236. package/docs/es/intlayer_with_vite+svelte.md +1 -1
  237. package/docs/es/intlayer_with_vite+vanilla.md +1 -1
  238. package/docs/es/intlayer_with_vite+vue.md +1 -1
  239. package/docs/es/migration_from_i18next_to_intlayer.md +313 -0
  240. package/docs/es/migration_from_next-i18next_to_intlayer.md +338 -0
  241. package/docs/es/migration_from_next-intl_to_intlayer.md +347 -0
  242. package/docs/es/migration_from_nuxtjs_i18n_to_intlayer.md +311 -0
  243. package/docs/es/migration_from_react-i18next_to_intlayer.md +367 -0
  244. package/docs/es/migration_from_vue-i18n_to_intlayer.md +342 -0
  245. package/docs/es/packages/next-intlayer/index.md +1 -1
  246. package/docs/es/packages/react-intlayer/index.md +1 -1
  247. package/docs/fr/bundle_optimization.md +223 -75
  248. package/docs/fr/configuration.md +10 -9
  249. package/docs/fr/intlayer_with_adonisjs.md +1 -1
  250. package/docs/fr/intlayer_with_analog.md +1 -1
  251. package/docs/fr/intlayer_with_angular_19.md +1 -1
  252. package/docs/fr/intlayer_with_angular_21.md +1 -1
  253. package/docs/fr/intlayer_with_astro.md +1 -1
  254. package/docs/fr/intlayer_with_astro_lit.md +1 -1
  255. package/docs/fr/intlayer_with_astro_preact.md +1 -1
  256. package/docs/fr/intlayer_with_astro_react.md +1 -1
  257. package/docs/fr/intlayer_with_astro_solid.md +1 -1
  258. package/docs/fr/intlayer_with_astro_svelte.md +1 -1
  259. package/docs/fr/intlayer_with_astro_vanilla.md +1 -1
  260. package/docs/fr/intlayer_with_astro_vue.md +1 -1
  261. package/docs/fr/intlayer_with_create_react_app.md +1 -1
  262. package/docs/fr/intlayer_with_express.md +1 -1
  263. package/docs/fr/intlayer_with_fastify.md +1 -1
  264. package/docs/fr/intlayer_with_hono.md +1 -1
  265. package/docs/fr/intlayer_with_nestjs.md +1 -1
  266. package/docs/fr/intlayer_with_nextjs_14.md +1 -1
  267. package/docs/fr/intlayer_with_nextjs_15.md +1 -1
  268. package/docs/fr/intlayer_with_nextjs_16.md +1 -1
  269. package/docs/fr/intlayer_with_nextjs_no_locale_path.md +1 -1
  270. package/docs/fr/intlayer_with_nuxt.md +1 -1
  271. package/docs/fr/intlayer_with_react_router_v7.md +1 -1
  272. package/docs/fr/intlayer_with_react_router_v7_fs_routes.md +1 -1
  273. package/docs/fr/intlayer_with_tanstack+solid.md +1 -1
  274. package/docs/fr/intlayer_with_tanstack.md +1 -1
  275. package/docs/fr/intlayer_with_vanilla.md +1 -1
  276. package/docs/fr/intlayer_with_vite+lit.md +1 -1
  277. package/docs/fr/intlayer_with_vite+preact.md +1 -1
  278. package/docs/fr/intlayer_with_vite+react.md +1 -1
  279. package/docs/fr/intlayer_with_vite+solid.md +1 -1
  280. package/docs/fr/intlayer_with_vite+svelte.md +1 -1
  281. package/docs/fr/intlayer_with_vite+vanilla.md +1 -1
  282. package/docs/fr/intlayer_with_vite+vue.md +1 -1
  283. package/docs/fr/migration_from_i18next_to_intlayer.md +313 -0
  284. package/docs/fr/migration_from_next-i18next_to_intlayer.md +338 -0
  285. package/docs/fr/migration_from_next-intl_to_intlayer.md +347 -0
  286. package/docs/fr/migration_from_nuxtjs_i18n_to_intlayer.md +311 -0
  287. package/docs/fr/migration_from_react-i18next_to_intlayer.md +367 -0
  288. package/docs/fr/migration_from_vue-i18n_to_intlayer.md +342 -0
  289. package/docs/fr/packages/react-intlayer/index.md +1 -1
  290. package/docs/hi/bundle_optimization.md +253 -105
  291. package/docs/hi/configuration.md +10 -9
  292. package/docs/hi/intlayer_with_adonisjs.md +1 -1
  293. package/docs/hi/intlayer_with_analog.md +1 -1
  294. package/docs/hi/intlayer_with_angular_19.md +1 -1
  295. package/docs/hi/intlayer_with_angular_21.md +1 -1
  296. package/docs/hi/intlayer_with_astro.md +1 -1
  297. package/docs/hi/intlayer_with_astro_lit.md +1 -1
  298. package/docs/hi/intlayer_with_astro_preact.md +1 -1
  299. package/docs/hi/intlayer_with_astro_react.md +1 -1
  300. package/docs/hi/intlayer_with_astro_solid.md +1 -1
  301. package/docs/hi/intlayer_with_astro_svelte.md +1 -1
  302. package/docs/hi/intlayer_with_astro_vanilla.md +1 -1
  303. package/docs/hi/intlayer_with_astro_vue.md +1 -1
  304. package/docs/hi/intlayer_with_create_react_app.md +1 -1
  305. package/docs/hi/intlayer_with_express.md +1 -1
  306. package/docs/hi/intlayer_with_fastify.md +1 -1
  307. package/docs/hi/intlayer_with_hono.md +1 -1
  308. package/docs/hi/intlayer_with_nestjs.md +1 -1
  309. package/docs/hi/intlayer_with_nextjs_14.md +1 -1
  310. package/docs/hi/intlayer_with_nextjs_15.md +1 -1
  311. package/docs/hi/intlayer_with_nextjs_16.md +1 -1
  312. package/docs/hi/intlayer_with_nextjs_no_locale_path.md +1 -1
  313. package/docs/hi/intlayer_with_nuxt.md +1 -1
  314. package/docs/hi/intlayer_with_react_router_v7.md +1 -1
  315. package/docs/hi/intlayer_with_react_router_v7_fs_routes.md +1 -1
  316. package/docs/hi/intlayer_with_tanstack+solid.md +1 -1
  317. package/docs/hi/intlayer_with_tanstack.md +1 -1
  318. package/docs/hi/intlayer_with_vanilla.md +1 -1
  319. package/docs/hi/intlayer_with_vite+lit.md +1 -1
  320. package/docs/hi/intlayer_with_vite+preact.md +1 -1
  321. package/docs/hi/intlayer_with_vite+react.md +1 -1
  322. package/docs/hi/intlayer_with_vite+solid.md +1 -1
  323. package/docs/hi/intlayer_with_vite+svelte.md +1 -1
  324. package/docs/hi/intlayer_with_vite+vanilla.md +1 -1
  325. package/docs/hi/intlayer_with_vite+vue.md +1 -1
  326. package/docs/hi/packages/intlayer/index.md +1 -1
  327. package/docs/id/bundle_optimization.md +258 -110
  328. package/docs/id/configuration.md +10 -9
  329. package/docs/id/intlayer_with_adonisjs.md +1 -1
  330. package/docs/id/intlayer_with_analog.md +1 -1
  331. package/docs/id/intlayer_with_angular_19.md +1 -1
  332. package/docs/id/intlayer_with_angular_21.md +1 -1
  333. package/docs/id/intlayer_with_astro.md +1 -1
  334. package/docs/id/intlayer_with_astro_lit.md +1 -1
  335. package/docs/id/intlayer_with_astro_preact.md +1 -1
  336. package/docs/id/intlayer_with_astro_react.md +1 -1
  337. package/docs/id/intlayer_with_astro_solid.md +1 -1
  338. package/docs/id/intlayer_with_astro_svelte.md +1 -1
  339. package/docs/id/intlayer_with_astro_vanilla.md +1 -1
  340. package/docs/id/intlayer_with_astro_vue.md +1 -1
  341. package/docs/id/intlayer_with_create_react_app.md +1 -1
  342. package/docs/id/intlayer_with_express.md +1 -1
  343. package/docs/id/intlayer_with_fastify.md +1 -1
  344. package/docs/id/intlayer_with_hono.md +1 -1
  345. package/docs/id/intlayer_with_nestjs.md +1 -1
  346. package/docs/id/intlayer_with_nextjs_14.md +1 -1
  347. package/docs/id/intlayer_with_nextjs_15.md +1 -1
  348. package/docs/id/intlayer_with_nextjs_16.md +1 -1
  349. package/docs/id/intlayer_with_nextjs_no_locale_path.md +1 -1
  350. package/docs/id/intlayer_with_nuxt.md +1 -1
  351. package/docs/id/intlayer_with_react_router_v7.md +1 -1
  352. package/docs/id/intlayer_with_react_router_v7_fs_routes.md +1 -1
  353. package/docs/id/intlayer_with_tanstack+solid.md +1 -1
  354. package/docs/id/intlayer_with_tanstack.md +1 -1
  355. package/docs/id/intlayer_with_vanilla.md +1 -1
  356. package/docs/id/intlayer_with_vite+lit.md +1 -1
  357. package/docs/id/intlayer_with_vite+preact.md +1 -1
  358. package/docs/id/intlayer_with_vite+react.md +1 -1
  359. package/docs/id/intlayer_with_vite+solid.md +1 -1
  360. package/docs/id/intlayer_with_vite+svelte.md +1 -1
  361. package/docs/id/intlayer_with_vite+vanilla.md +1 -1
  362. package/docs/id/intlayer_with_vite+vue.md +1 -1
  363. package/docs/it/bundle_optimization.md +249 -103
  364. package/docs/it/configuration.md +10 -9
  365. package/docs/it/intlayer_with_adonisjs.md +1 -1
  366. package/docs/it/intlayer_with_analog.md +1 -1
  367. package/docs/it/intlayer_with_angular_19.md +1 -1
  368. package/docs/it/intlayer_with_angular_21.md +1 -1
  369. package/docs/it/intlayer_with_astro.md +1 -1
  370. package/docs/it/intlayer_with_astro_lit.md +1 -1
  371. package/docs/it/intlayer_with_astro_preact.md +1 -1
  372. package/docs/it/intlayer_with_astro_react.md +1 -1
  373. package/docs/it/intlayer_with_astro_solid.md +1 -1
  374. package/docs/it/intlayer_with_astro_svelte.md +1 -1
  375. package/docs/it/intlayer_with_astro_vanilla.md +1 -1
  376. package/docs/it/intlayer_with_astro_vue.md +1 -1
  377. package/docs/it/intlayer_with_create_react_app.md +1 -1
  378. package/docs/it/intlayer_with_express.md +1 -1
  379. package/docs/it/intlayer_with_fastify.md +1 -1
  380. package/docs/it/intlayer_with_hono.md +1 -1
  381. package/docs/it/intlayer_with_nestjs.md +1 -1
  382. package/docs/it/intlayer_with_nextjs_14.md +1 -1
  383. package/docs/it/intlayer_with_nextjs_15.md +1 -1
  384. package/docs/it/intlayer_with_nextjs_16.md +1 -1
  385. package/docs/it/intlayer_with_nextjs_no_locale_path.md +1 -1
  386. package/docs/it/intlayer_with_nuxt.md +1 -1
  387. package/docs/it/intlayer_with_react_router_v7.md +1 -1
  388. package/docs/it/intlayer_with_react_router_v7_fs_routes.md +1 -1
  389. package/docs/it/intlayer_with_tanstack+solid.md +1 -1
  390. package/docs/it/intlayer_with_tanstack.md +1 -1
  391. package/docs/it/intlayer_with_vanilla.md +1 -1
  392. package/docs/it/intlayer_with_vite+lit.md +1 -1
  393. package/docs/it/intlayer_with_vite+preact.md +1 -1
  394. package/docs/it/intlayer_with_vite+react.md +1 -1
  395. package/docs/it/intlayer_with_vite+solid.md +1 -1
  396. package/docs/it/intlayer_with_vite+svelte.md +1 -1
  397. package/docs/it/intlayer_with_vite+vanilla.md +1 -1
  398. package/docs/it/intlayer_with_vite+vue.md +1 -1
  399. package/docs/it/migration_from_i18next_to_intlayer.md +313 -0
  400. package/docs/it/migration_from_next-i18next_to_intlayer.md +338 -0
  401. package/docs/it/migration_from_next-intl_to_intlayer.md +347 -0
  402. package/docs/it/migration_from_nuxtjs_i18n_to_intlayer.md +311 -0
  403. package/docs/it/migration_from_react-i18next_to_intlayer.md +367 -0
  404. package/docs/it/migration_from_vue-i18n_to_intlayer.md +342 -0
  405. package/docs/ja/bundle_optimization.md +245 -97
  406. package/docs/ja/configuration.md +10 -9
  407. package/docs/ja/intlayer_with_adonisjs.md +1 -1
  408. package/docs/ja/intlayer_with_analog.md +1 -1
  409. package/docs/ja/intlayer_with_angular_19.md +1 -1
  410. package/docs/ja/intlayer_with_angular_21.md +1 -1
  411. package/docs/ja/intlayer_with_astro.md +1 -1
  412. package/docs/ja/intlayer_with_astro_lit.md +1 -1
  413. package/docs/ja/intlayer_with_astro_preact.md +1 -1
  414. package/docs/ja/intlayer_with_astro_react.md +1 -1
  415. package/docs/ja/intlayer_with_astro_solid.md +1 -1
  416. package/docs/ja/intlayer_with_astro_svelte.md +1 -1
  417. package/docs/ja/intlayer_with_astro_vanilla.md +1 -1
  418. package/docs/ja/intlayer_with_astro_vue.md +1 -1
  419. package/docs/ja/intlayer_with_create_react_app.md +1 -1
  420. package/docs/ja/intlayer_with_express.md +1 -1
  421. package/docs/ja/intlayer_with_fastify.md +1 -1
  422. package/docs/ja/intlayer_with_hono.md +1 -1
  423. package/docs/ja/intlayer_with_nestjs.md +1 -1
  424. package/docs/ja/intlayer_with_nextjs_14.md +1 -1
  425. package/docs/ja/intlayer_with_nextjs_15.md +1 -1
  426. package/docs/ja/intlayer_with_nextjs_16.md +1 -1
  427. package/docs/ja/intlayer_with_nextjs_no_locale_path.md +1 -1
  428. package/docs/ja/intlayer_with_nuxt.md +1 -1
  429. package/docs/ja/intlayer_with_react_router_v7_fs_routes.md +1 -1
  430. package/docs/ja/intlayer_with_tanstack+solid.md +1 -1
  431. package/docs/ja/intlayer_with_tanstack.md +1 -1
  432. package/docs/ja/intlayer_with_vanilla.md +1 -1
  433. package/docs/ja/intlayer_with_vite+lit.md +1 -1
  434. package/docs/ja/intlayer_with_vite+solid.md +1 -1
  435. package/docs/ja/intlayer_with_vite+svelte.md +1 -1
  436. package/docs/ja/intlayer_with_vite+vanilla.md +1 -1
  437. package/docs/ja/intlayer_with_vite+vue.md +1 -1
  438. package/docs/ja/migration_from_i18next_to_intlayer.md +313 -0
  439. package/docs/ja/migration_from_next-i18next_to_intlayer.md +338 -0
  440. package/docs/ja/migration_from_next-intl_to_intlayer.md +347 -0
  441. package/docs/ja/migration_from_nuxtjs_i18n_to_intlayer.md +311 -0
  442. package/docs/ja/migration_from_react-i18next_to_intlayer.md +367 -0
  443. package/docs/ja/migration_from_vue-i18n_to_intlayer.md +342 -0
  444. package/docs/ko/bundle_optimization.md +253 -105
  445. package/docs/ko/configuration.md +10 -9
  446. package/docs/ko/intlayer_with_adonisjs.md +1 -1
  447. package/docs/ko/intlayer_with_analog.md +1 -1
  448. package/docs/ko/intlayer_with_angular_19.md +1 -1
  449. package/docs/ko/intlayer_with_angular_21.md +1 -1
  450. package/docs/ko/intlayer_with_astro.md +1 -1
  451. package/docs/ko/intlayer_with_astro_lit.md +1 -1
  452. package/docs/ko/intlayer_with_astro_preact.md +1 -1
  453. package/docs/ko/intlayer_with_astro_react.md +1 -1
  454. package/docs/ko/intlayer_with_astro_solid.md +1 -1
  455. package/docs/ko/intlayer_with_astro_svelte.md +1 -1
  456. package/docs/ko/intlayer_with_astro_vanilla.md +1 -1
  457. package/docs/ko/intlayer_with_astro_vue.md +1 -1
  458. package/docs/ko/intlayer_with_create_react_app.md +1 -1
  459. package/docs/ko/intlayer_with_express.md +1 -1
  460. package/docs/ko/intlayer_with_fastify.md +1 -1
  461. package/docs/ko/intlayer_with_hono.md +1 -1
  462. package/docs/ko/intlayer_with_nestjs.md +1 -1
  463. package/docs/ko/intlayer_with_nextjs_14.md +1 -1
  464. package/docs/ko/intlayer_with_nextjs_15.md +2 -2
  465. package/docs/ko/intlayer_with_nextjs_16.md +1 -1
  466. package/docs/ko/intlayer_with_nextjs_no_locale_path.md +1 -1
  467. package/docs/ko/intlayer_with_nuxt.md +1 -1
  468. package/docs/ko/intlayer_with_react_router_v7.md +1 -1
  469. package/docs/ko/intlayer_with_react_router_v7_fs_routes.md +1 -1
  470. package/docs/ko/intlayer_with_tanstack+solid.md +1 -1
  471. package/docs/ko/intlayer_with_tanstack.md +1 -1
  472. package/docs/ko/intlayer_with_vanilla.md +1 -1
  473. package/docs/ko/intlayer_with_vite+lit.md +1 -1
  474. package/docs/ko/intlayer_with_vite+preact.md +1 -1
  475. package/docs/ko/intlayer_with_vite+react.md +1 -1
  476. package/docs/ko/intlayer_with_vite+solid.md +1 -1
  477. package/docs/ko/intlayer_with_vite+svelte.md +1 -1
  478. package/docs/ko/intlayer_with_vite+vanilla.md +1 -1
  479. package/docs/ko/intlayer_with_vite+vue.md +1 -1
  480. package/docs/ko/migration_from_i18next_to_intlayer.md +313 -0
  481. package/docs/ko/migration_from_next-i18next_to_intlayer.md +338 -0
  482. package/docs/ko/migration_from_next-intl_to_intlayer.md +347 -0
  483. package/docs/ko/migration_from_nuxtjs_i18n_to_intlayer.md +311 -0
  484. package/docs/ko/migration_from_react-i18next_to_intlayer.md +367 -0
  485. package/docs/ko/migration_from_vue-i18n_to_intlayer.md +342 -0
  486. package/docs/nl/bundle_optimization.md +249 -101
  487. package/docs/nl/configuration.md +10 -9
  488. package/docs/nl/intlayer_with_angular_21.md +1 -1
  489. package/docs/nl/intlayer_with_fastify.md +1 -1
  490. package/docs/nl/intlayer_with_hono.md +1 -1
  491. package/docs/nl/intlayer_with_vanilla.md +1 -1
  492. package/docs/nl/intlayer_with_vite+lit.md +1 -1
  493. package/docs/nl/intlayer_with_vite+vanilla.md +1 -1
  494. package/docs/pl/bundle_optimization.md +258 -111
  495. package/docs/pl/configuration.md +10 -9
  496. package/docs/pl/intlayer_with_adonisjs.md +1 -1
  497. package/docs/pl/intlayer_with_analog.md +1 -1
  498. package/docs/pl/intlayer_with_angular_19.md +1 -1
  499. package/docs/pl/intlayer_with_angular_21.md +1 -1
  500. package/docs/pl/intlayer_with_astro.md +1 -1
  501. package/docs/pl/intlayer_with_astro_lit.md +1 -1
  502. package/docs/pl/intlayer_with_astro_preact.md +1 -1
  503. package/docs/pl/intlayer_with_astro_react.md +1 -1
  504. package/docs/pl/intlayer_with_astro_solid.md +1 -1
  505. package/docs/pl/intlayer_with_astro_svelte.md +1 -1
  506. package/docs/pl/intlayer_with_astro_vanilla.md +1 -1
  507. package/docs/pl/intlayer_with_astro_vue.md +1 -1
  508. package/docs/pl/intlayer_with_create_react_app.md +1 -1
  509. package/docs/pl/intlayer_with_express.md +1 -1
  510. package/docs/pl/intlayer_with_fastify.md +1 -1
  511. package/docs/pl/intlayer_with_hono.md +1 -1
  512. package/docs/pl/intlayer_with_nestjs.md +1 -1
  513. package/docs/pl/intlayer_with_nextjs_14.md +1 -1
  514. package/docs/pl/intlayer_with_nextjs_15.md +1 -1
  515. package/docs/pl/intlayer_with_nextjs_16.md +1 -1
  516. package/docs/pl/intlayer_with_nextjs_no_locale_path.md +1 -1
  517. package/docs/pl/intlayer_with_nuxt.md +1 -1
  518. package/docs/pl/intlayer_with_react_router_v7.md +1 -1
  519. package/docs/pl/intlayer_with_react_router_v7_fs_routes.md +1 -1
  520. package/docs/pl/intlayer_with_tanstack+solid.md +1 -1
  521. package/docs/pl/intlayer_with_tanstack.md +1 -1
  522. package/docs/pl/intlayer_with_vanilla.md +1 -1
  523. package/docs/pl/intlayer_with_vite+lit.md +1 -1
  524. package/docs/pl/intlayer_with_vite+preact.md +1 -1
  525. package/docs/pl/intlayer_with_vite+react.md +1 -1
  526. package/docs/pl/intlayer_with_vite+solid.md +1 -1
  527. package/docs/pl/intlayer_with_vite+svelte.md +1 -1
  528. package/docs/pl/intlayer_with_vite+vanilla.md +1 -1
  529. package/docs/pl/intlayer_with_vite+vue.md +1 -1
  530. package/docs/pt/bundle_optimization.md +256 -115
  531. package/docs/pt/configuration.md +10 -9
  532. package/docs/pt/intlayer_with_adonisjs.md +1 -1
  533. package/docs/pt/intlayer_with_analog.md +1 -1
  534. package/docs/pt/intlayer_with_angular_19.md +1 -1
  535. package/docs/pt/intlayer_with_angular_21.md +1 -1
  536. package/docs/pt/intlayer_with_astro.md +1 -1
  537. package/docs/pt/intlayer_with_astro_lit.md +1 -1
  538. package/docs/pt/intlayer_with_astro_preact.md +1 -1
  539. package/docs/pt/intlayer_with_astro_react.md +1 -1
  540. package/docs/pt/intlayer_with_astro_solid.md +1 -1
  541. package/docs/pt/intlayer_with_astro_svelte.md +1 -1
  542. package/docs/pt/intlayer_with_astro_vanilla.md +1 -1
  543. package/docs/pt/intlayer_with_astro_vue.md +1 -1
  544. package/docs/pt/intlayer_with_create_react_app.md +1 -1
  545. package/docs/pt/intlayer_with_express.md +1 -1
  546. package/docs/pt/intlayer_with_fastify.md +1 -1
  547. package/docs/pt/intlayer_with_hono.md +1 -1
  548. package/docs/pt/intlayer_with_nestjs.md +1 -1
  549. package/docs/pt/intlayer_with_nextjs_14.md +1 -1
  550. package/docs/pt/intlayer_with_nextjs_15.md +1 -1
  551. package/docs/pt/intlayer_with_nextjs_16.md +1 -1
  552. package/docs/pt/intlayer_with_nextjs_no_locale_path.md +1 -1
  553. package/docs/pt/intlayer_with_nuxt.md +1 -1
  554. package/docs/pt/intlayer_with_react_router_v7.md +1 -1
  555. package/docs/pt/intlayer_with_react_router_v7_fs_routes.md +1 -1
  556. package/docs/pt/intlayer_with_tanstack+solid.md +1 -1
  557. package/docs/pt/intlayer_with_tanstack.md +1 -1
  558. package/docs/pt/intlayer_with_vanilla.md +1 -1
  559. package/docs/pt/intlayer_with_vite+lit.md +1 -1
  560. package/docs/pt/intlayer_with_vite+preact.md +1 -1
  561. package/docs/pt/intlayer_with_vite+react.md +1 -1
  562. package/docs/pt/intlayer_with_vite+solid.md +1 -1
  563. package/docs/pt/intlayer_with_vite+svelte.md +1 -1
  564. package/docs/pt/intlayer_with_vite+vanilla.md +1 -1
  565. package/docs/pt/intlayer_with_vite+vue.md +1 -1
  566. package/docs/pt/migration_from_i18next_to_intlayer.md +313 -0
  567. package/docs/pt/migration_from_next-i18next_to_intlayer.md +338 -0
  568. package/docs/pt/migration_from_next-intl_to_intlayer.md +347 -0
  569. package/docs/pt/migration_from_nuxtjs_i18n_to_intlayer.md +311 -0
  570. package/docs/pt/migration_from_react-i18next_to_intlayer.md +367 -0
  571. package/docs/pt/migration_from_vue-i18n_to_intlayer.md +342 -0
  572. package/docs/ru/bundle_optimization.md +253 -105
  573. package/docs/ru/configuration.md +10 -9
  574. package/docs/ru/intlayer_with_adonisjs.md +1 -1
  575. package/docs/ru/intlayer_with_analog.md +1 -1
  576. package/docs/ru/intlayer_with_angular_19.md +1 -1
  577. package/docs/ru/intlayer_with_angular_21.md +1 -1
  578. package/docs/ru/intlayer_with_astro.md +1 -1
  579. package/docs/ru/intlayer_with_astro_lit.md +1 -1
  580. package/docs/ru/intlayer_with_astro_preact.md +1 -1
  581. package/docs/ru/intlayer_with_astro_react.md +1 -1
  582. package/docs/ru/intlayer_with_astro_solid.md +1 -1
  583. package/docs/ru/intlayer_with_astro_svelte.md +1 -1
  584. package/docs/ru/intlayer_with_astro_vanilla.md +1 -1
  585. package/docs/ru/intlayer_with_astro_vue.md +1 -1
  586. package/docs/ru/intlayer_with_create_react_app.md +1 -1
  587. package/docs/ru/intlayer_with_express.md +1 -1
  588. package/docs/ru/intlayer_with_fastify.md +1 -1
  589. package/docs/ru/intlayer_with_hono.md +1 -1
  590. package/docs/ru/intlayer_with_nestjs.md +1 -1
  591. package/docs/ru/intlayer_with_nextjs_14.md +1 -1
  592. package/docs/ru/intlayer_with_nextjs_15.md +1 -1
  593. package/docs/ru/intlayer_with_nextjs_16.md +1 -1
  594. package/docs/ru/intlayer_with_nextjs_no_locale_path.md +1 -1
  595. package/docs/ru/intlayer_with_nuxt.md +1 -1
  596. package/docs/ru/intlayer_with_react_router_v7.md +1 -1
  597. package/docs/ru/intlayer_with_react_router_v7_fs_routes.md +1 -1
  598. package/docs/ru/intlayer_with_tanstack+solid.md +1 -1
  599. package/docs/ru/intlayer_with_tanstack.md +1 -1
  600. package/docs/ru/intlayer_with_vanilla.md +1 -1
  601. package/docs/ru/intlayer_with_vite+lit.md +1 -1
  602. package/docs/ru/intlayer_with_vite+preact.md +1 -1
  603. package/docs/ru/intlayer_with_vite+react.md +1 -1
  604. package/docs/ru/intlayer_with_vite+solid.md +1 -1
  605. package/docs/ru/intlayer_with_vite+svelte.md +1 -1
  606. package/docs/ru/intlayer_with_vite+vanilla.md +1 -1
  607. package/docs/ru/intlayer_with_vite+vue.md +1 -1
  608. package/docs/ru/migration_from_i18next_to_intlayer.md +313 -0
  609. package/docs/ru/migration_from_next-i18next_to_intlayer.md +338 -0
  610. package/docs/ru/migration_from_next-intl_to_intlayer.md +347 -0
  611. package/docs/ru/migration_from_nuxtjs_i18n_to_intlayer.md +311 -0
  612. package/docs/ru/migration_from_react-i18next_to_intlayer.md +367 -0
  613. package/docs/ru/migration_from_vue-i18n_to_intlayer.md +342 -0
  614. package/docs/tr/bundle_optimization.md +255 -107
  615. package/docs/tr/configuration.md +10 -9
  616. package/docs/tr/intlayer_with_adonisjs.md +1 -1
  617. package/docs/tr/intlayer_with_analog.md +1 -1
  618. package/docs/tr/intlayer_with_angular_19.md +1 -1
  619. package/docs/tr/intlayer_with_angular_21.md +1 -1
  620. package/docs/tr/intlayer_with_astro.md +1 -1
  621. package/docs/tr/intlayer_with_astro_lit.md +1 -1
  622. package/docs/tr/intlayer_with_astro_preact.md +1 -1
  623. package/docs/tr/intlayer_with_astro_react.md +1 -1
  624. package/docs/tr/intlayer_with_astro_solid.md +1 -1
  625. package/docs/tr/intlayer_with_astro_svelte.md +1 -1
  626. package/docs/tr/intlayer_with_astro_vanilla.md +1 -1
  627. package/docs/tr/intlayer_with_astro_vue.md +1 -1
  628. package/docs/tr/intlayer_with_create_react_app.md +1 -1
  629. package/docs/tr/intlayer_with_express.md +1 -1
  630. package/docs/tr/intlayer_with_fastify.md +1 -1
  631. package/docs/tr/intlayer_with_hono.md +1 -1
  632. package/docs/tr/intlayer_with_nestjs.md +1 -1
  633. package/docs/tr/intlayer_with_nextjs_15.md +1 -1
  634. package/docs/tr/intlayer_with_nextjs_16.md +1 -1
  635. package/docs/tr/intlayer_with_nextjs_no_locale_path.md +1 -1
  636. package/docs/tr/intlayer_with_nuxt.md +1 -1
  637. package/docs/tr/intlayer_with_react_router_v7.md +1 -1
  638. package/docs/tr/intlayer_with_react_router_v7_fs_routes.md +1 -1
  639. package/docs/tr/intlayer_with_tanstack+solid.md +1 -1
  640. package/docs/tr/intlayer_with_tanstack.md +1 -1
  641. package/docs/tr/intlayer_with_vanilla.md +1 -1
  642. package/docs/tr/intlayer_with_vite+lit.md +1 -1
  643. package/docs/tr/intlayer_with_vite+preact.md +1 -1
  644. package/docs/tr/intlayer_with_vite+react.md +1 -1
  645. package/docs/tr/intlayer_with_vite+solid.md +1 -1
  646. package/docs/tr/intlayer_with_vite+svelte.md +1 -1
  647. package/docs/tr/intlayer_with_vite+vanilla.md +1 -1
  648. package/docs/tr/intlayer_with_vite+vue.md +1 -1
  649. package/docs/tr/migration_from_i18next_to_intlayer.md +314 -0
  650. package/docs/tr/migration_from_next-i18next_to_intlayer.md +339 -0
  651. package/docs/tr/migration_from_next-intl_to_intlayer.md +348 -0
  652. package/docs/tr/migration_from_nuxtjs_i18n_to_intlayer.md +312 -0
  653. package/docs/tr/migration_from_react-i18next_to_intlayer.md +368 -0
  654. package/docs/tr/migration_from_vue-i18n_to_intlayer.md +343 -0
  655. package/docs/uk/bundle_optimization.md +250 -102
  656. package/docs/uk/configuration.md +10 -9
  657. package/docs/uk/intlayer_with_adonisjs.md +1 -1
  658. package/docs/uk/intlayer_with_analog.md +1 -1
  659. package/docs/uk/intlayer_with_angular_19.md +1 -1
  660. package/docs/uk/intlayer_with_angular_21.md +1 -1
  661. package/docs/uk/intlayer_with_astro.md +1 -1
  662. package/docs/uk/intlayer_with_astro_lit.md +1 -1
  663. package/docs/uk/intlayer_with_astro_preact.md +1 -1
  664. package/docs/uk/intlayer_with_astro_react.md +1 -1
  665. package/docs/uk/intlayer_with_astro_solid.md +1 -1
  666. package/docs/uk/intlayer_with_astro_svelte.md +1 -1
  667. package/docs/uk/intlayer_with_astro_vanilla.md +1 -1
  668. package/docs/uk/intlayer_with_astro_vue.md +1 -1
  669. package/docs/uk/intlayer_with_create_react_app.md +1 -1
  670. package/docs/uk/intlayer_with_express.md +1 -1
  671. package/docs/uk/intlayer_with_fastify.md +1 -1
  672. package/docs/uk/intlayer_with_hono.md +1 -1
  673. package/docs/uk/intlayer_with_nestjs.md +1 -1
  674. package/docs/uk/intlayer_with_nextjs_14.md +1 -1
  675. package/docs/uk/intlayer_with_nextjs_15.md +1 -1
  676. package/docs/uk/intlayer_with_nextjs_16.md +1 -1
  677. package/docs/uk/intlayer_with_nextjs_no_locale_path.md +1 -1
  678. package/docs/uk/intlayer_with_nuxt.md +1 -1
  679. package/docs/uk/intlayer_with_react_router_v7.md +1 -1
  680. package/docs/uk/intlayer_with_react_router_v7_fs_routes.md +1 -1
  681. package/docs/uk/intlayer_with_tanstack+solid.md +1 -1
  682. package/docs/uk/intlayer_with_tanstack.md +1 -1
  683. package/docs/uk/intlayer_with_vanilla.md +1 -1
  684. package/docs/uk/intlayer_with_vite+lit.md +1 -1
  685. package/docs/uk/intlayer_with_vite+preact.md +1 -1
  686. package/docs/uk/intlayer_with_vite+react.md +1 -1
  687. package/docs/uk/intlayer_with_vite+solid.md +1 -1
  688. package/docs/uk/intlayer_with_vite+svelte.md +1 -1
  689. package/docs/uk/intlayer_with_vite+vanilla.md +1 -1
  690. package/docs/uk/intlayer_with_vite+vue.md +1 -1
  691. package/docs/ur/bundle_optimization.md +257 -109
  692. package/docs/ur/configuration.md +10 -9
  693. package/docs/ur/intlayer_with_angular_21.md +1 -1
  694. package/docs/ur/intlayer_with_fastify.md +1 -1
  695. package/docs/ur/intlayer_with_hono.md +1 -1
  696. package/docs/ur/intlayer_with_vanilla.md +1 -1
  697. package/docs/ur/intlayer_with_vite+lit.md +1 -1
  698. package/docs/ur/intlayer_with_vite+vanilla.md +1 -1
  699. package/docs/vi/bundle_optimization.md +259 -111
  700. package/docs/vi/configuration.md +10 -9
  701. package/docs/vi/intlayer_with_adonisjs.md +1 -1
  702. package/docs/vi/intlayer_with_analog.md +1 -1
  703. package/docs/vi/intlayer_with_angular_19.md +1 -1
  704. package/docs/vi/intlayer_with_angular_21.md +1 -1
  705. package/docs/vi/intlayer_with_astro.md +1 -1
  706. package/docs/vi/intlayer_with_astro_lit.md +1 -1
  707. package/docs/vi/intlayer_with_astro_preact.md +1 -1
  708. package/docs/vi/intlayer_with_astro_react.md +1 -1
  709. package/docs/vi/intlayer_with_astro_solid.md +1 -1
  710. package/docs/vi/intlayer_with_astro_svelte.md +1 -1
  711. package/docs/vi/intlayer_with_astro_vanilla.md +1 -1
  712. package/docs/vi/intlayer_with_astro_vue.md +1 -1
  713. package/docs/vi/intlayer_with_create_react_app.md +1 -1
  714. package/docs/vi/intlayer_with_express.md +1 -1
  715. package/docs/vi/intlayer_with_fastify.md +1 -1
  716. package/docs/vi/intlayer_with_hono.md +1 -1
  717. package/docs/vi/intlayer_with_nestjs.md +1 -1
  718. package/docs/vi/intlayer_with_nextjs_14.md +1 -1
  719. package/docs/vi/intlayer_with_nextjs_15.md +1 -1
  720. package/docs/vi/intlayer_with_nextjs_16.md +1 -1
  721. package/docs/vi/intlayer_with_nextjs_no_locale_path.md +1 -1
  722. package/docs/vi/intlayer_with_nuxt.md +1 -1
  723. package/docs/vi/intlayer_with_react_router_v7.md +1 -1
  724. package/docs/vi/intlayer_with_react_router_v7_fs_routes.md +1 -1
  725. package/docs/vi/intlayer_with_tanstack+solid.md +1 -1
  726. package/docs/vi/intlayer_with_tanstack.md +1 -1
  727. package/docs/vi/intlayer_with_vanilla.md +1 -1
  728. package/docs/vi/intlayer_with_vite+lit.md +1 -1
  729. package/docs/vi/intlayer_with_vite+preact.md +1 -1
  730. package/docs/vi/intlayer_with_vite+react.md +1 -1
  731. package/docs/vi/intlayer_with_vite+solid.md +1 -1
  732. package/docs/vi/intlayer_with_vite+svelte.md +1 -1
  733. package/docs/vi/intlayer_with_vite+vanilla.md +1 -1
  734. package/docs/vi/intlayer_with_vite+vue.md +1 -1
  735. package/docs/zh/bundle_optimization.md +260 -112
  736. package/docs/zh/configuration.md +10 -9
  737. package/docs/zh/intlayer_with_adonisjs.md +1 -1
  738. package/docs/zh/intlayer_with_analog.md +1 -1
  739. package/docs/zh/intlayer_with_angular_19.md +1 -1
  740. package/docs/zh/intlayer_with_angular_21.md +1 -1
  741. package/docs/zh/intlayer_with_astro.md +1 -1
  742. package/docs/zh/intlayer_with_astro_lit.md +1 -1
  743. package/docs/zh/intlayer_with_astro_preact.md +1 -1
  744. package/docs/zh/intlayer_with_astro_react.md +1 -1
  745. package/docs/zh/intlayer_with_astro_solid.md +1 -1
  746. package/docs/zh/intlayer_with_astro_svelte.md +1 -1
  747. package/docs/zh/intlayer_with_astro_vanilla.md +1 -1
  748. package/docs/zh/intlayer_with_astro_vue.md +1 -1
  749. package/docs/zh/intlayer_with_create_react_app.md +1 -1
  750. package/docs/zh/intlayer_with_express.md +1 -1
  751. package/docs/zh/intlayer_with_fastify.md +1 -1
  752. package/docs/zh/intlayer_with_hono.md +1 -1
  753. package/docs/zh/intlayer_with_nestjs.md +1 -1
  754. package/docs/zh/intlayer_with_nextjs_14.md +1 -1
  755. package/docs/zh/intlayer_with_nextjs_15.md +1 -1
  756. package/docs/zh/intlayer_with_nextjs_16.md +1 -1
  757. package/docs/zh/intlayer_with_nextjs_no_locale_path.md +1 -1
  758. package/docs/zh/intlayer_with_nuxt.md +1 -1
  759. package/docs/zh/intlayer_with_react_router_v7.md +1 -1
  760. package/docs/zh/intlayer_with_react_router_v7_fs_routes.md +1 -1
  761. package/docs/zh/intlayer_with_tanstack+solid.md +1 -1
  762. package/docs/zh/intlayer_with_tanstack.md +1 -1
  763. package/docs/zh/intlayer_with_vanilla.md +1 -1
  764. package/docs/zh/intlayer_with_vite+lit.md +1 -1
  765. package/docs/zh/intlayer_with_vite+preact.md +1 -1
  766. package/docs/zh/intlayer_with_vite+react.md +1 -1
  767. package/docs/zh/intlayer_with_vite+solid.md +1 -1
  768. package/docs/zh/intlayer_with_vite+svelte.md +1 -1
  769. package/docs/zh/intlayer_with_vite+vanilla.md +1 -1
  770. package/docs/zh/intlayer_with_vite+vue.md +1 -1
  771. package/docs/zh-TW/bundle_optimization.md +602 -0
  772. package/docs/zh-TW/intlayer_with_angular_21.md +1 -1
  773. package/package.json +8 -8
  774. package/src/generated/docs.entry.ts +120 -0
@@ -1,10 +1,10 @@
1
1
  ---
2
2
  createdAt: 2025-11-25
3
- updatedAt: 2026-04-08
4
- title: 优化 i18n 构建Bundle 大小与性能
5
- description: 通过优化国际化 (i18n) 内容来减小应用程序构建包的大小。学习如何利用 Intlayer 对字典进行 Tree Shaking 和延迟加载。
3
+ updatedAt: 2026-06-07
4
+ title: 优化 i18n 打包体积与性能
5
+ description: 通过优化国际化(i18n)内容来减小应用程序包的大小。了解如何利用 Intlayer 实现字典的 tree shaking 和延迟加载(lazy loading)。
6
6
  keywords:
7
- - 构建包优化
7
+ - 打包优化
8
8
  - 内容自动化
9
9
  - 动态内容
10
10
  - Intlayer
@@ -16,33 +16,36 @@ slugs:
16
16
  - concept
17
17
  - bundle-optimization
18
18
  history:
19
+ - version: 8.12.0
20
+ date: 2026-06-07
21
+ changes: "为 Babel/Webpack 引入了 `intlayerPurgeBabelPlugin` 和 `intlayerMinifyBabelPlugin`,明确了插件管线"
19
22
  - version: 8.7.0
20
23
  date: 2026-04-08
21
- changes: "在构建配置中增加了 `minify` 和 `purge` 选项"
24
+ changes: "向构建配置中添加了 `minify` 和 `purge` 选项"
22
25
  ---
23
26
 
24
- # 优化 i18n 构建Bundle 大小与性能
27
+ # 优化 i18n 打包体积与性能
25
28
 
26
- 依赖 JSON 文件的传统 i18n 解决方案面临的最常见挑战之一是管理内容大小。如果开发人员不手动将内容分离到命名空间中,用户往往为了查看单个页面而下载每个页面甚至每种语言的翻译。
29
+ 依赖 JSON 文件的传统 i18n 解决方案中最常见的挑战之一是管理内容体积。如果开发者没有手动将内容拆分到各个命名空间(namespaces),用户通常会为了查看一个页面而下载所有页面、甚至是所有语言的翻译。
27
30
 
28
- 例如,一个包含 10 个页面并翻译成 10 种语言的应用程序,可能会导致用户下载 100 个页面的内容,即使他们只需要**一页**(当前语言的当前页面)。这会导致带宽浪费和加载速度变慢。
31
+ 例如,一个应用有 10 个页面并被翻译成了 10 种语言,可能导致用户为了这 10 个页面下载所有的内容,尽管他们只想要**一个页面**的内容(当前语言版本的当前页面)。这不仅会造成带宽浪费,也会导致更慢的加载时间。
29
32
 
30
- **Intlayer 通过构建时优化解决了这个问题。** 它分析您的代码以检测每个组件实际使用的字典,并仅将必要的内容重新注入到您的构建包中。
33
+ **Intlayer 通过在构建时(build-time)进行优化来解决这一问题。** 它可以分析你的代码以检测每个组件实际使用了哪些字典,并只将必要的内容注入到你的打包结果(bundle)中。
31
34
 
32
35
  ## 目录
33
36
 
34
37
  <TOC />
35
38
 
36
- ## 扫描您的构建包
39
+ ## 分析你的包大小
37
40
 
38
- 分析构建包是识别“重型”JSON 文件和代码分割机会的第一步。这些工具可以生成应用程序编译后代码的可视化树图 (treemap),让您确切地看到哪些库占用了最多的空间。
41
+ 分析你的打包结果是找出“臃肿”的 JSON 文件和考虑进行代码分割(code-splitting)的首要步骤。这些工具可以生成你应用程序编译代码的树状可视视图(treemap),让你能够清楚地看到究竟是哪些库占据了最多的空间。
39
42
 
40
43
  <Tabs>
41
44
  <Tab value="vite">
42
45
 
43
46
  ### Vite / Rollup
44
47
 
45
- Vite 底层使用 Rollup。`rollup-plugin-visualizer` 插件生成一个交互式 HTML 文件,显示图中每个模块的大小。
48
+ Vite 在底层使用了 Rollup。插件 `rollup-plugin-visualizer` 能够生成一个交互式 HTML 文件,展示依赖图(graph)中每个模块的体积。
46
49
 
47
50
  ```bash
48
51
  npm install -D rollup-plugin-visualizer
@@ -55,7 +58,7 @@ import { visualizer } from "rollup-plugin-visualizer";
55
58
  export default defineConfig({
56
59
  plugins: [
57
60
  visualizer({
58
- open: true, // 在浏览器中自动打开报告
61
+ open: true, // 自动在浏览器中打开报告
59
62
  filename: "stats.html",
60
63
  gzipSize: true,
61
64
  brotliSize: true,
@@ -69,7 +72,7 @@ export default defineConfig({
69
72
 
70
73
  ### Next.js (Turbopack)
71
74
 
72
- 对于使用 App Router 和 Turbopack 的项目,Next.js 提供了一个内置的实验性分析器,不需要额外的依赖。
75
+ 对于使用了 App Router 和 Turbopack 的项目,Next.js 提供了一个内置的实验性分析器,它不需要额外的依赖。
73
76
 
74
77
  ```bash packageManager='npm'
75
78
  npx next experimental-analyze
@@ -92,7 +95,7 @@ bun next experimental-analyze
92
95
 
93
96
  ### Next.js (Webpack)
94
97
 
95
- 如果您在 Next.js 中使用默认的 Webpack 打包器,请使用官方的构建包分析器。通过在构建期间设置环境变量来触发它。
98
+ 如果你在 Next.js 中使用的是默认的 Webpack 打包器,请使用官方的 bundle analyzer。你可以通过在构建期间设置一个环境变量来触发它。
96
99
 
97
100
  ```bash packageManager='npm'
98
101
  npm install -D @next/bundle-analyzer
@@ -116,11 +119,11 @@ const withBundleAnalyzer = require("@next/bundle-analyzer")({
116
119
  });
117
120
 
118
121
  module.exports = withBundleAnalyzer({
119
- // 您的 Next.js 配置
122
+ // 你的 Next.js 配置
120
123
  });
121
124
  ```
122
125
 
123
- **用法:**
126
+ **用法:**
124
127
 
125
128
  ```bash
126
129
  ANALYZE=true npm run build
@@ -129,9 +132,9 @@ ANALYZE=true npm run build
129
132
  </Tab>
130
133
  <Tab value="Webpack (CRA / Angular / etc)">
131
134
 
132
- ### 标准 Webpack
135
+ ### Webpack
133
136
 
134
- 对于 Create React App (ejected)、Angular 或自定义 Webpack 设置,请使用行业标准的 `webpack-bundle-analyzer`。
137
+ 针对 Create React App (ejected)、Angular 或是自定义 Webpack 的设置,使用业界标准的 `webpack-bundle-analyzer`。
135
138
 
136
139
  ```bash packageManager='npm'
137
140
  npm install -D webpack-bundle-analyzer
@@ -166,29 +169,66 @@ export default {
166
169
  </Tab>
167
170
  </Tabs>
168
171
 
169
- ## 工作原理
172
+ ## 它是如何运作的
170
173
 
171
- Intlayer 使用**按组件优化**的方法。与全局 JSON 文件不同,您的内容定义在组件旁边或内部。在构建过程中,Intlayer 会:
174
+ Intlayer 使用一种**基于组件的方法(per-component approach)**。与全局 JSON 文件不同,你的内容会在组件旁边或是组件内部进行定义。在构建流程中,Intlayer 将会:
172
175
 
173
- 1. **分析**您的代码以查找 `useIntlayer` 调用。
174
- 2. **构建**相应的字典内容。
175
- 3. 根据您的配置用优化后的代码**替换** `useIntlayer` 调用。
176
+ 1. **分析**你的代码以寻找 `useIntlayer` 的调用。
177
+ 2. **构建**对应的字典内容。
178
+ 3. **替换** `useIntlayer` 调用为依据你的配置进行优化后的代码。
176
179
 
177
- 这确保了:
180
+ 这样能够确保:
178
181
 
179
- - 如果一个组件没有被引入,它的内容就不会包含在构建包中(Dead Code Elimination)。
180
- - 如果一个组件是延迟加载的,它的内容也会被延迟加载。
182
+ - 如果一个组件未被导入,它的内容将不会包含在打包产物中(Dead Code Elimination / 死代码消除)。
183
+ - 如果一个组件被延迟加载,其内容同样会被延迟加载。
181
184
 
182
- ## 按平台设置
185
+ ## 插件参考
186
+
187
+ Intlayer 的构建优化被划分为若干个职责单一的插件。了解它们各自的用途可以防止在配置它们时产生困惑。
188
+
189
+ ### Babel 插件 (`@intlayer/babel`)
190
+
191
+ 这些被直接运用在基于 Webpack 设置的 `babel.config.js` 当中(比如使用了 Babel 的 Next.js、CRA,或是自定义的 Webpack 等)。
192
+
193
+ | 插件 | 功能说明 |
194
+ | :---------------------------- | :--------------------------------------------------------------------------------------------------- |
195
+ | `intlayerExtractBabelPlugin` | 扫描 `.content.ts` 文件并把编译好的字典写入 `.intlayer/` |
196
+ | `intlayerOptimizeBabelPlugin` | 将 `useIntlayer('key')` 重写为 `useDictionary(hash)` 并注入匹配对应字典的 `import` 语句 |
197
+ | `intlayerPurgeBabelPlugin` | 扫描所有源代码文件,从已编译的 `.intlayer/**/*.json` 字典文件中删除**未被使用的内容字段** |
198
+ | `intlayerMinifyBabelPlugin` | **重命名内容字段的键(keys)** 为简短的字母别名(例如 `title` 变成 `a`),作用范围包括 JSON 与源代码 |
199
+
200
+ > **插件的执行顺序很重要。** 在你的 `babel.config.js` 里,purge 和 minify 的插件必须放置在 optimize 插件**之前**。优化步骤(optimize)会把 `useIntlayer('key')` 替换为模糊的 `useDictionary(hash)`,此举抹除了能够让 purge 和 minify 识别哪些字段被使用过的字典 key 信息。
201
+
202
+ 每一个 Babel 插件都有对应的选项助手(options helper),该助手会在配置加载时读取一遍 `intlayer.config.ts`,并返回预解析的值:
203
+
204
+ | 选项助手 | 配套插件 |
205
+ | :--------------------------- | :---------------------------- |
206
+ | `getExtractPluginOptions()` | `intlayerExtractBabelPlugin` |
207
+ | `getOptimizePluginOptions()` | `intlayerOptimizeBabelPlugin` |
208
+ | `getPurgePluginOptions()` | `intlayerPurgeBabelPlugin` |
209
+ | `getMinifyPluginOptions()` | `intlayerMinifyBabelPlugin` |
210
+
211
+ ### Vite 插件 (`vite-intlayer`)
212
+
213
+ Vite 用户**不需要直接对它们进行配置**。当你在 `vite.config.ts` 里调用 `withIntlayer()` 时,它们会自动生效。只需要在 `intlayer.config.ts` 中设定 `build.purge` 和 `build.minify`,即可开启相应的功能,且不需要额外的插件注册过程。
214
+
215
+ | 内部 Vite 插件 | 等效行为 |
216
+ | :---------------- | :---------------------------------------------------------------------------------- |
217
+ | Usage analyzer | 等同于 `intlayerPurgeBabelPlugin` 的分析步骤 |
218
+ | Dictionary prune | 等同于 `intlayerPurgeBabelPlugin` 的 JSON 写入步骤 |
219
+ | Dictionary minify | 等同于 `intlayerMinifyBabelPlugin` 的 JSON 写入步骤 |
220
+ | Babel transform | 等同于 `intlayerMinifyBabelPlugin` 的代码重命名步骤 + `intlayerOptimizeBabelPlugin` |
221
+
222
+ ## 各平台配置指南
183
223
 
184
224
  <Tabs>
185
225
  <Tab value="nextjs">
186
226
 
187
227
  ### Next.js
188
228
 
189
- Next.js 需要 `@intlayer/swc` 插件来处理转换,因为 Next.js 使用 SWC 进行构建。
229
+ Next.js 需要依靠 `@intlayer/swc` 插件来进行优化步骤(导入重写),因为 Next.js 采用 SWC 作为编译器。
190
230
 
191
- > 该插件默认不安装,因为 SWC 插件对 Next.js 仍处于实验阶段。未来可能会发生变化。
231
+ > 该插件并未默认安装,因为 SWC 插件在 Next.js 当中目前仍处于实验阶段。未来这部分有可能会发生改变。
192
232
 
193
233
  ```bash packageManager="npm"
194
234
  npm install -D @intlayer/swc
@@ -206,21 +246,63 @@ pnpm add -D @intlayer/swc
206
246
  bun add -d @intlayer/swc
207
247
  ```
208
248
 
209
- 安装后,Intlayer 将自动检测并使用该插件。
249
+ 安装完毕后,Intlayer 将会自动侦测并使用该插件。
250
+
251
+ 至于**清除(purge)和最小化(minify)**步骤(即字段移除和字段重命名),请连同 `@intlayer/babel` 一并安装并加入 Babel 插件。由于 Next.js 依靠 SWC 处理代码转化,但仍会评估 `babel.config.js` 以决定插件配置,因此上述 Babel 插件能够在进入 SWC 前作为预处理步骤得以执行。
252
+
253
+ ```bash packageManager="npm"
254
+ npm install -D @intlayer/babel
255
+ ```
256
+
257
+ ```javascript fileName="babel.config.js"
258
+ const {
259
+ intlayerPurgeBabelPlugin,
260
+ intlayerMinifyBabelPlugin,
261
+ getPurgePluginOptions,
262
+ getMinifyPluginOptions,
263
+ } = require("@intlayer/babel");
264
+
265
+ module.exports = {
266
+ presets: ["next/babel"],
267
+ plugins: [
268
+ // Purge: 移除 .intlayer/**/*.json 里未被使用的内容字段
269
+ [intlayerPurgeBabelPlugin, getPurgePluginOptions()],
270
+ // Minify: 对 JSON 以及源代码里的内容字段的键(keys)进行重命名
271
+ [intlayerMinifyBabelPlugin, getMinifyPluginOptions()],
272
+ // 注意: 在这里不需要使用 intlayerOptimizeBabelPlugin,因为
273
+ // @intlayer/swc 已经处理了 useIntlayer → useDictionary 的重写过程。
274
+ ],
275
+ };
276
+ ```
210
277
 
211
278
  </Tab>
212
279
  <Tab value="vite">
213
280
 
214
281
  ### Vite
215
282
 
216
- Vite 使用 `@intlayer/babel` 插件,该插件作为 `vite-intlayer` 的依赖项包含在内。优化默认启用。无需额外操作。
283
+ Vite 使用了包含在 `vite-intlayer` 依赖当中的 `@intlayer/babel` 插件。整个优化管线 —— 包括导入重写、清除和压缩 —— 是默认开启的,且无需任何额外的插件注册。
284
+
285
+ 在 `intlayer.config.ts` 里设定相对应的标志来开启 purge 以及 minify:
286
+
287
+ ```typescript fileName="intlayer.config.ts"
288
+ import type { IntlayerConfig } from "intlayer";
289
+
290
+ const config: IntlayerConfig = {
291
+ build: {
292
+ purge: true, // 将未被使用的字段从打好的 JSON 包中移除
293
+ minify: true, // 将字段名重命名为简短的别名
294
+ },
295
+ };
296
+
297
+ export default config;
298
+ ```
217
299
 
218
300
  </Tab>
219
301
  <Tab value="webpack">
220
302
 
221
- ### Webpack
303
+ ### Webpack (以及配置了 Babel 的 Next.js)
222
304
 
223
- 要在 Webpack 上启用 Intlayer 构建包优化,您需要安装并配置相应的 Babel (`@intlayer/babel`) 或 SWC (`@intlayer/swc`) 插件。
305
+ 安装 `@intlayer/babel`:
224
306
 
225
307
  ```bash packageManager="npm"
226
308
  npm install -D @intlayer/babel
@@ -238,73 +320,101 @@ pnpm add -D @intlayer/babel
238
320
  bun add -d @intlayer/babel
239
321
  ```
240
322
 
241
- ```typescript fileName="babel.config.js"
323
+ `babel.config.js` 里按照正确的顺序添加所有四个插件:
324
+
325
+ ```javascript fileName="babel.config.js"
242
326
  const {
243
- getOptimizePluginOptions,
327
+ intlayerExtractBabelPlugin,
328
+ intlayerPurgeBabelPlugin,
329
+ intlayerMinifyBabelPlugin,
244
330
  intlayerOptimizeBabelPlugin,
331
+ getExtractPluginOptions,
332
+ getPurgePluginOptions,
333
+ getMinifyPluginOptions,
334
+ getOptimizePluginOptions,
245
335
  } = require("@intlayer/babel");
246
336
 
247
337
  module.exports = {
248
- plugins: [[intlayerOptimizeBabelPlugin, getOptimizePluginOptions()]],
338
+ plugins: [
339
+ // Extract: 编译 .content.ts 文件 → .intlayer/**/*.json
340
+ [intlayerExtractBabelPlugin, getExtractPluginOptions()],
341
+
342
+ // Purge: 从 .intlayer/**/*.json 移除不必要的字段
343
+ // (读取 intlayer.config.ts 内的 build.purge 配置)
344
+ [intlayerPurgeBabelPlugin, getPurgePluginOptions()],
345
+
346
+ // Minify: 压缩并重命名 JSON + 源代码里的字段名
347
+ // (读取 intlayer.config.ts 内的 build.minify 配置)
348
+ [intlayerMinifyBabelPlugin, getMinifyPluginOptions()],
349
+
350
+ // Optimize: 重写 useIntlayer('key') → useDictionary(hash)
351
+ // 它必须位于末尾,因为该操作会抹去原本的 dictionary 键名。
352
+ [intlayerOptimizeBabelPlugin, getOptimizePluginOptions()],
353
+ ],
249
354
  };
250
355
  ```
251
356
 
252
357
  </Tab>
253
358
  </Tabs>
254
359
 
255
- ## 配置
360
+ ## 配置选项
256
361
 
257
- 您可以通过 `intlayer.config.ts` 中的 `build` 属性来控制 Intlayer 如何优化您的构建包。
362
+ 你可通过在你的 `intlayer.config.ts` 里的 `build` 属性来控制 Intlayer 怎样去优化你的代码包。
258
363
 
259
364
  ```typescript fileName="intlayer.config.ts"
260
365
  import { Locales, type IntlayerConfig } from "intlayer";
261
366
 
262
367
  const config: IntlayerConfig = {
263
368
  internationalization: {
264
- locales: [Locales.ENGLISH, Locales.FRENCH],
369
+ locales: [Locales.ENGLISH, Locales.CHINESE],
265
370
  defaultLocale: Locales.ENGLISH,
266
371
  },
267
372
  dictionary: {
268
373
  importMode: "dynamic",
269
374
  },
270
375
  build: {
271
- /**
272
- * 压缩字典以减小构建Bundle 大小。
273
- */
274
- minify: true;
275
-
276
- /**
277
- * 清除字典中未使用的键
278
- */
279
- purge: true;
280
-
281
- /**
282
- * 指示构建是否应检查 TypeScript 类型
283
- */
284
- checkTypes: false;
376
+ // 决定在构建时是否直接用直引字典覆盖 useIntlayer() 的调用。
377
+ // undefined = 自动(在生产环境中开启),true = 始终开启,false = 始终关闭。
378
+ optimize: undefined,
379
+
380
+ // 将已编译字典里的字段键名改写为简短的字母名称(例如:title → a)。
381
+ // 这将缩小 JSON 的体积;前提条件是启用了 optimize。
382
+ minify: true,
383
+
384
+ // 将未曾在代码里真正访问过的内容字段移除。
385
+ // 前提条件是启用了 optimize。
386
+ purge: true,
285
387
  },
286
388
  };
287
389
 
288
390
  export default config;
289
391
  ```
290
392
 
291
- > 在绝大多数情况下,建议保持 `optimize` 的默认选项。
393
+ > 在大多数情况之下,推荐为 `optimize` 保留它的默认值(`undefined`)。
292
394
 
293
- > 有关更多详情,请参见配置文档:[配置](https://github.com/aymericzip/intlayer/blob/main/docs/docs/zh/configuration.md)
395
+ > 请参阅配置参考资料以了解所有的选项:[配置说明](https://github.com/aymericzip/intlayer/blob/main/docs/docs/zh/configuration.md)
294
396
 
295
397
  ### 构建选项
296
398
 
297
- `build` 配置对象下提供以下选项:
399
+ | 属性 | 类型 | 默认值 | 详细说明 |
400
+ | :------------- | :--------------------- | :---------- | :------------------------------------------------------------------------------------------------------------------------------------------- |
401
+ | **`optimize`** | `boolean \| undefined` | `undefined` | 用于开启 import 语句的重写。`undefined` = 仅在打包成生产环境模式时生效。当设定为 `false` 的时候,同样会导致 purge 以及 minify 均一并被关闭。 |
402
+ | **`minify`** | `boolean` | `false` | 用于对已编译好的 JSON 档案里的内容键名改写成短的单字母名称。同理也会一并将源代码里相关访问属性同样改名。仅当 `optimize` 为 `false` 时无效。 |
403
+ | **`purge`** | `boolean` | `false` | 用于移除无论如何也不会被调用的且静态的源文件的内容字段,从 JSON 输出中去除掉。仅当 `optimize` 为 `false` 时无效。 |
404
+
405
+ ### 压缩 / Minification (重命名字段键值)
298
406
 
299
- | 属性 | 类型 | 默认值 | 描述 |
300
- | :------------- | :-------- | :---------- | :-------------------------------------------------------------------------------------------------------------------------------------- |
301
- | **`optimize`** | `boolean` | `undefined` | 控制是否启用构建优化。如果为 `true`,Intlayer 使用优化后的注入替换字典调用。如果为 `false`,则禁用优化。建议在生产环境中设置为 `true`。 |
302
- | **`minify`** | `boolean` | `false` | 是否压缩字典以减小构建Bundle 大小。 |
303
- | **`purge`** | `boolean` | `false` | 是否清除字典中未使用的键。 |
407
+ `build.minify` **并非**压缩你的 JavaScript —— 那是你的打包器应该处理的工作。它的工作,是把编译后的字典对应的 JSON 文件的每一个自定义内容的字段,全用短位的字母标识来替代,借此将其体积进行压缩:
304
408
 
305
- ### 压缩 (Minification)
409
+ ```
410
+ // Minify 之前
411
+ { "title": "Hello", "subtitle": "World" }
412
+
413
+ // Minify 之后
414
+ { "a": "Hello", "b": "World" }
415
+ ```
306
416
 
307
- 压缩字典可以删除不必要的空格、注释,并减小 JSON 内容的大小。这对于大型字典尤其有用。
417
+ 该重新命名的方法同样也会应用到那些处于代码里的属性名访问阶段,所以在最终编译好的结果里,`content.title` 便会演变为 `content.a`。它们在运行时的实际表现完全一致。
308
418
 
309
419
  ```typescript fileName="intlayer.config.ts"
310
420
  import type { IntlayerConfig } from "intlayer";
@@ -318,11 +428,13 @@ const config: IntlayerConfig = {
318
428
  export default config;
319
429
  ```
320
430
 
321
- > 注意:如果禁用 `optimize` 或启用了可视化编辑器(因为编辑器需要完整内容以便编辑),则会忽略压缩。
431
+ > 如果在 `optimize` 被设为 `false`、又或是启用了可视化编辑器也就是当 `editor.enabled` 设定为了 `true` 时(由于编辑器需要保留字段名称以便做后续处理),重命名这个操作都将会被跳过。
322
432
 
323
- ### 清除 (Purging)
433
+ > 同理,如果是利用了 `importMode: 'fetch'` 来载入字段时此过程同样不适用。因为它们的内容会以原始命名由后端 API 所提供,对客户端内容随意重命名会破坏客户端与服务端的匹配契约。
324
434
 
325
- 清除确保只有代码中实际使用的键才会包含在最终的字典构建包中。如果您的大型字典包含许多并非在应用程序每个部分都使用的键,这可以显著减小构建包的大小。
435
+ ### 字段清除 / Purging (去掉未被引用的字段内容)
436
+
437
+ `build.purge` 能自动分析究竟哪些字段真真切切地被你的源代码所引用,进而只把实际引用过的数据予以保留,把其他的垃圾数据从编译生成的 JSON 里排除掉。
326
438
 
327
439
  ```typescript fileName="intlayer.config.ts"
328
440
  import type { IntlayerConfig } from "intlayer";
@@ -336,34 +448,50 @@ const config: IntlayerConfig = {
336
448
  export default config;
337
449
  ```
338
450
 
339
- > 注意:如果禁用 `optimize`,则会忽略清除。
451
+ **示例说明:** 我们有一个包含五个不同字段数据的字典,但是代码实际就用到了里边的俩:
452
+
453
+ ```
454
+ // Purge 执行前
455
+ { "title": "…", "subtitle": "…", "cta": "…", "footer": "…", "badge": "…" }
456
+
457
+ // Purge 之后(这里仅仅只用到了 title 与 subtitle)
458
+ { "title": "…", "subtitle": "…" }
459
+ ```
460
+
461
+ > 与前边提到的类似,当 `optimize` 是 `false` 或是开启了可视化编辑器(`editor.enabled` 取值 `true`) 时,它会选择跳过对数据的清除操作。
462
+
463
+ > 当检测到某份代码因为异常无法顺利解析、又或者当把由 `useIntlayer` 输出的值以静态解析器难以预测分析的模式在不同组件中来回丢(比如被打包成对象传入等而未被进行解构)的时候,它同样会跳过,以此保守地保留整部字典的全部信息,避免意外发生。
340
464
 
341
- ### 导入模式 (Import Mode)
465
+ ### 导入模式(Import Mode
342
466
 
343
- 对于包含多个页面和语言的大型应用程序,您的 JSON 文件可能占用构建Bundle 大小的很大一部分。Intlayer 允许您控制字典的加载方式。
467
+ 对于包含多个页面和地区规模比较大的应用程序来说,你的 JSON 可能会占去绝大一部分包(Bundle)的内容。所以,你可以凭借着 `importMode` 这个参数让 Intlayer 来调整对字典内容本身的实际拉取行为。
344
468
 
345
- 导入模式可以在 `intlayer.config.ts` 文件中全局定义默认值。
469
+ ### 全局定义
470
+
471
+ 该参数可以经由你本身的 `intlayer.config.ts` 这个文件在全局进行指定。
346
472
 
347
473
  ```typescript fileName="intlayer.config.ts"
348
474
  import type { IntlayerConfig } from "intlayer";
349
475
 
350
476
  const config: IntlayerConfig = {
351
- build: {
352
- minify: true,
477
+ dictionary: {
478
+ importMode: "dynamic", // 默认为 'static'
353
479
  },
354
480
  };
355
481
 
356
482
  export default config;
357
483
  ```
358
484
 
359
- 也可以在您的 `.content.{{ts|tsx|js|jsx|mjs|cjs|json|jsonc|json5}}` 文件中为每个字典定义。
485
+ ### 为字典独立配置
486
+
487
+ 我们也可以在这其中部分独立词典原本配置内的 `.content.{{ts|tsx|js|jsx|mjs|cjs|json|jsonc|json5|md|mdx|yaml|yml}}` 把该参数改写成另外想要的规则。
360
488
 
361
489
  ```ts
362
490
  import { type Dictionary, t } from "intlayer";
363
491
 
364
492
  const appContent: Dictionary = {
365
493
  key: "app",
366
- importMode: "dynamic", // 覆盖默认导入模式
494
+ importMode: "dynamic", // 将原本的模式改写
367
495
  content: {
368
496
  // ...
369
497
  },
@@ -372,83 +500,103 @@ const appContent: Dictionary = {
372
500
  export default appContent;
373
501
  ```
374
502
 
375
- | 属性 | 类型 | 默认值 | 描述 |
376
- | :--------------- | :--------------------------------- | :--------- | :--------------------------------------------------------------------------- |
377
- | **`importMode`** | `'static'`, `'dynamic'`, `'fetch'` | `'static'` | **已弃用**:请改用 `dictionary.importMode`。确定字典的加载方式(详见下文)。 |
503
+ | 属性 | 取值类型 | 默认设置 | 描述说明 |
504
+ | :--------------- | :--------------------------------- | :--------- | :------------------------------------------------------------------------------------------------- |
505
+ | **`importMode`** | `'static'`, `'dynamic'`, `'fetch'` | `'static'` | **已被弃用**: 建议调整为 `dictionary.importMode`。这决定了应当怎样加载各项字典。(细节参考下文)。 |
378
506
 
379
- `importMode` 设置规定了字典内容如何注入到您的组件中。
380
- 您可以在 `intlayer.config.ts` 文件的 `dictionary` 对象下全局定义它,或者在字典的 `.content.ts` 文件中覆盖它。
507
+ 这处 `importMode` 设置用于指挥组件拉取各项内容的真实手段。要么被指定在了全局 `intlayer.config.ts` 中的 `dictionary` 里,要不便以 `content.ts` 形式来分别定制。
381
508
 
382
- ### 1. 静态模式 (`default`)
509
+ ### 1. 静态模式(Static Mode - `default`)
383
510
 
384
- 在静态模式下,Intlayer `useIntlayer` 替换为 `useDictionary`,并将字典直接注入 JavaScript 构建包中。
511
+ 在这个默认设定下,Intlayer 自动把全部 `useIntlayer` 变成了 `useDictionary` 以做到将所需的翻译数据无缝拼接入 JavaScript 包内。
385
512
 
386
- - **优点:** 即时渲染(同步),水合过程中零额外网络请求。
387
- - **缺点:** 构建包包含该特定组件**所有**可用语言的翻译。
388
- - **最适合:** 单页应用程序 (SPA)。
513
+ - **优势(Pros):** 即时就能被加载(属于同步型),由于没有水合(hydration)从而意味着额外的零请求。
514
+ - **缺点(Cons):** 但这个包同样也就塞满了给该组件用的**各种不同可用语言的对应版本**,这非常占空间。
515
+ - **最佳应用场合:** 单页应用(SPA)。
389
516
 
390
- **转换后的代码示例:**
517
+ **代码在转换之后的图示(举例):**
391
518
 
392
519
  ```tsx
393
- // 您的代码
520
+ // 这是你的原本代码
394
521
  const content = useIntlayer("my-key");
395
522
 
396
- // 优化后的代码(静态)
523
+ // (静态) 优化图解。
524
+ // 仅为了解释说明而列,出于优化实际上的最终输出略有差别
397
525
  const content = useDictionary({
398
526
  key: "my-key",
399
527
  content: {
400
528
  nodeType: "translation",
401
529
  translation: {
402
530
  en: "My title",
403
- fr: "Mon titre",
531
+ zh: "我的标题",
404
532
  },
405
533
  },
406
534
  });
407
535
  ```
408
536
 
409
- ### 2. 动态模式
537
+ ### 2. 动态模式(Dynamic Mode)
410
538
 
411
- 在动态模式下,Intlayer `useIntlayer` 替换为 `useDictionaryAsync`。这使用 `import()`(类似于 Suspense 的机制)来延迟加载当前语言特定的 JSON。
539
+ 在这一设定之下,Intlayer 自动把全部 `useIntlayer` 全给变成了 `useDictionaryAsync`。这个操作能将拉取行文变成动态 `import()`(这和 Suspense 的表现接近),并有针对性地对当地所在的特殊语言去单独异步请求其实际数据。
412
540
 
413
- - **优点:** **语言级别的 Tree Shaking。** 查看英文版本的用户将*仅*下载英文字典,永远不会加载法文字典。
414
- - **缺点:** 在水合过程中每个组件都会触发一次网络请求(资源获取)。
415
- - **最适合:** 大型文本块、文章或支持多种语言且构建Bundle 大小至关重要的应用程序。
541
+ - **优势(Pros):** **支持基于地区语言所实施的代码树抖动分离(Tree shaking)。** 说白了就是,正在浏览英语界面的使用者**仅仅**会只被发送那部分英文对应的词典内容,法文或是其他国家的数据都不会加载。
542
+ - **缺点(Cons):** 这个阶段下,将会让组件因数据要求而针对各项水合需求(hydration)各自产生不同种的调用申请(拉取各部件内容)。
543
+ - **最佳应用场合:** 内容巨大且充斥了长文博客的复杂平台、亦或是本身涵盖了大量的翻译种类因而在包(bundle)体积极为严格的情况下使用。
416
544
 
417
- **转换后的代码示例:**
545
+ **代码在转换之后的图示(举例):**
418
546
 
419
547
  ```tsx
420
- // 您的代码
548
+ // 这是你的原本代码
421
549
  const content = useIntlayer("my-key");
422
550
 
423
- // 优化后的代码(动态)
551
+ // (动态) 优化图解。
552
+ // 仅为了解释说明而列,出于优化实际上的最终输出略有差别
424
553
  const content = useDictionaryAsync({
425
554
  en: () =>
426
555
  import(".intlayer/dynamic_dictionary/my-key/en.json").then(
427
556
  (mod) => mod.default
428
557
  ),
429
- fr: () =>
430
- import(".intlayer/dynamic_dictionary/my-key/fr.json").then(
558
+ zh: () =>
559
+ import(".intlayer/dynamic_dictionary/my-key/zh.json").then(
431
560
  (mod) => mod.default
432
561
  ),
433
562
  });
434
563
  ```
435
564
 
436
- > 使用 `importMode: 'dynamic'` 时,如果您在单个页面上有 100 个组件使用 `useIntlayer`,浏览器将尝试 100 次单独的获取。为了避免这种请求“瀑布”,请将内容分组到更少的 `.content` 文件中(例如,每个页面部分一个字典),而不是每个原子组件一个。
565
+ > 使用了 `importMode: 'dynamic'` 这个方案之时,如果某一页刚好凑齐了 100 个包含了 `useIntlayer` 内容的部件时,浏览器就有极大的概率朝着服务器丢过去多达 100 种不重样的 fetch 请求。如果意在免于这样的连环「瀑布效应」,尝试尽可能去少写单个的独立 `.content` (尝试着每几块凑一起合并起来比如每一个大的分块区共享其内容字典,而非是切得那么碎,比如连每一个单小按钮都设单独请求。)如果把多个带有单独名字 `.content` 内容给附加上相同的 Key 名称,程序依然能够很轻易将这些零散碎落的数据融合成单独庞大且统一的一本完整的字典对象里去。
566
+
567
+ ### 3. Fetch 模式(Fetch Mode)
568
+
569
+ 行为跟 Dynamic 有所重叠,不过最优先则是朝 Intlayer Live Sync API 请求其词典内容。假如获取数据时遭到拦截或者内容不属于实时的数据内容体系的话,接下来便将其作为兜底顺延递回之前的动切请求。
437
570
 
438
- ### 3. 获取模式 (Fetch Mode)
571
+ **代码在转换之后的图示(举例):**
439
572
 
440
- 行为类似于动态模式,但首先尝试从 Intlayer Live Sync API 获取字典。如果 API 调用失败或内容未标记为实时更新,则会回退到动态导入。
573
+ ```tsx
574
+ // 这是你的原本代码
575
+ const content = useIntlayer("my-key");
576
+
577
+ // 能够将它(Fetch)看成这类实现
578
+ const content = useDictionaryAsync({
579
+ en: () =>
580
+ fetch("https://intlayer.my-domain.com/dictionary/my-key/en").then((res) =>
581
+ res.json()
582
+ ),
583
+ zh: () =>
584
+ fetch("https://intlayer.my-domain.com/dictionary/my-key/zh").then((res) =>
585
+ res.json()
586
+ ),
587
+ });
588
+ ```
441
589
 
442
- > 有关更多详情,请参见 CMS 文档:[CMS](https://github.com/aymericzip/intlayer/blob/main/docs/docs/zh/intlayer_CMS.md)
590
+ > 如果还需要获得对于 CMS 获取方面的认知的话:可以去查看 [CMS 说明](https://github.com/aymericzip/intlayer/blob/main/docs/docs/zh/intlayer_CMS.md)
443
591
 
444
- > 在获取模式下,不能使用清除和压缩。
592
+ > 此模式同样会一如既往地因为 JSON 内容会直接借由后端直接输送而不遭受 purge 跟 minify 等等这几类数据剔除方案的干扰。
445
593
 
446
- ## 总结:静态 vs 动态
594
+ ## 概要: 静态 动态
447
595
 
448
- | 特性 | 静态模式 | 动态模式 |
449
- | :--------------------- | :------------------------- | :----------------------- |
450
- | **JS 构建Bundle 大小** | 较大(包含组件的所有语言) | 最小(仅代码,无内容) |
451
- | **初始加载** | 即时(内容在构建包中) | 轻微延迟(获取 JSON|
452
- | **网络请求** | 0 次额外请求 | 每个字典 1 次请求 |
453
- | **Tree Shaking** | 组件级 | 组件级 + 语言级 |
454
- | **最佳用例** | UI 组件、小型应用 | 文本较多的页面、多种语言 |
596
+ | 模式特征 | 静态模式(Static Mode) | 动态模式(Dynamic Mode) |
597
+ | :------------------------- | :----------------------------------------------------------- | :---------------------------------------- |
598
+ | **JS 产生的 Bundle 体积** | 庞大(包含了供各个不同组件使用时调用的其他全部外语语系信息) | 小巧(内容直接为空、只有代码框架) |
599
+ | **最初加载所需时间** | 极速(毕竟那些所需信息一开始都已经存在于包(Bundle)里面了) | 略需等待(拉取 JSON 所需消耗时间) |
600
+ | **附带发生的网络请求** | 无,无需任何等待直接 0 | 取决字典请求次数(一次 Key 取出就是一回) |
601
+ | **树抖动(Tree Shaking)** | 按单一组件的级别而做分割 | 依组件级别外加依据地区与语种去实施拆分 |
602
+ | **最佳应用与方案环境** | 普通交互式元件内容或单一界面的轻型程序等 | 极其充满内容的纯文区块或极其繁多的语系 |
@@ -682,15 +682,16 @@ routing: {
682
682
 
683
683
  在 cookie 中使用存储时,可以设置额外属性:
684
684
 
685
- | 字段 | 说明 | 类型 |
686
- | ---------- | ---------------------------------------- | ----------------------------------------------------- |
687
- | `name` | Cookie 名称。默认值:`'INTLAYER_LOCALE'` | `string` |
688
- | `domain` | Cookie 域。默认值:`undefined` | `string` |
689
- | `path` | Cookie 路径。默认值:`undefined` | `string` |
690
- | `secure` | 需要 HTTPS。默认值:`undefined` | `boolean` |
691
- | `httpOnly` | HTTP-only 标志。默认值:`undefined` | `boolean` |
692
- | `sameSite` | SameSite 策略。 | `'strict'` &#124; <br/> `'lax'` &#124; <br/> `'none'` |
693
- | `expires` | 过期日期或天数。默认值:`undefined` | `Date` &#124; <br/> `number` |
685
+ | 字段 | 说明 | 类型 |
686
+ | ---------- | -------------------------------------------------------------------------------------- | ----------------------------------------------------- |
687
+ | `name` | Cookie 名称。默认值:`'INTLAYER_LOCALE'` | `string` |
688
+ | `domain` | Cookie 域。默认值:`undefined` | `string` |
689
+ | `path` | Cookie 路径。默认值:`undefined` | `string` |
690
+ | `secure` | 需要 HTTPS。默认值:`undefined` | `boolean` |
691
+ | `httpOnly` | HTTP-only 标志。默认值:`undefined` | `boolean` |
692
+ | `sameSite` | SameSite 策略。 | `'strict'` &#124; <br/> `'lax'` &#124; <br/> `'none'` |
693
+ | `expires` | 数字表示自创建以来的天数;日期(或ISO日期字符串)是绝对的过期日期。默认值:`undefined` | `Date` &#124; <br/> `number` &#124; <br/> `string` |
694
+ | `maxAge` | 创建后的秒级生存时间。优先级高于 `expires`。默认值:`undefined` | `number` |
694
695
 
695
696
  #### 存储属性 (Storage Attributes)
696
697