@intlayer/docs 8.11.3 → 8.12.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (942) hide show
  1. package/blog/ar/i18n_using_next-i18next.md +60 -20
  2. package/blog/ar/i18n_using_next-intl.md +51 -17
  3. package/blog/de/i18n_using_next-i18next.md +61 -20
  4. package/blog/de/i18n_using_next-intl.md +51 -17
  5. package/blog/en/i18n_using_next-i18next.md +61 -20
  6. package/blog/en/i18n_using_next-intl.md +51 -17
  7. package/blog/en-GB/i18n_using_next-i18next.md +61 -20
  8. package/blog/en-GB/i18n_using_next-intl.md +51 -17
  9. package/blog/es/i18n_using_next-i18next.md +61 -20
  10. package/blog/es/i18n_using_next-intl.md +52 -17
  11. package/blog/fr/i18n_using_next-i18next.md +61 -20
  12. package/blog/fr/i18n_using_next-intl.md +52 -17
  13. package/blog/hi/i18n_using_next-i18next.md +61 -20
  14. package/blog/hi/i18n_using_next-intl.md +51 -17
  15. package/blog/id/i18n_using_next-i18next.md +61 -20
  16. package/blog/id/i18n_using_next-intl.md +51 -17
  17. package/blog/it/i18n_using_next-i18next.md +61 -20
  18. package/blog/it/i18n_using_next-intl.md +51 -17
  19. package/blog/ja/i18n_using_next-i18next.md +61 -20
  20. package/blog/ja/i18n_using_next-intl.md +52 -17
  21. package/blog/ko/i18n_using_next-i18next.md +61 -20
  22. package/blog/ko/i18n_using_next-intl.md +52 -17
  23. package/blog/pl/i18n_using_next-i18next.md +61 -20
  24. package/blog/pl/i18n_using_next-intl.md +51 -17
  25. package/blog/pt/i18n_using_next-i18next.md +61 -20
  26. package/blog/pt/i18n_using_next-intl.md +51 -17
  27. package/blog/ru/i18n_using_next-i18next.md +61 -20
  28. package/blog/ru/i18n_using_next-intl.md +52 -17
  29. package/blog/tr/i18n_using_next-i18next.md +61 -20
  30. package/blog/tr/i18n_using_next-intl.md +51 -17
  31. package/blog/uk/i18n_using_next-i18next.md +61 -20
  32. package/blog/uk/i18n_using_next-intl.md +51 -17
  33. package/blog/vi/i18n_using_next-i18next.md +61 -20
  34. package/blog/vi/i18n_using_next-intl.md +51 -17
  35. package/blog/zh/i18n_using_next-i18next.md +61 -20
  36. package/blog/zh/i18n_using_next-intl.md +52 -17
  37. package/dist/cjs/common.cjs +1 -1
  38. package/dist/cjs/common.cjs.map +1 -1
  39. package/dist/esm/common.mjs +1 -1
  40. package/dist/esm/common.mjs.map +1 -1
  41. package/docs/ar/cli/build.md +1 -1
  42. package/docs/ar/cli/index.md +1 -1
  43. package/docs/ar/intlayer_with_adonisjs.md +2 -2
  44. package/docs/ar/intlayer_with_analog.md +6 -6
  45. package/docs/ar/intlayer_with_angular_19.md +6 -6
  46. package/docs/ar/intlayer_with_angular_21.md +6 -6
  47. package/docs/ar/intlayer_with_astro.md +55 -56
  48. package/docs/ar/intlayer_with_astro_lit.md +58 -58
  49. package/docs/ar/intlayer_with_astro_preact.md +52 -52
  50. package/docs/ar/intlayer_with_astro_react.md +54 -54
  51. package/docs/ar/intlayer_with_astro_solid.md +54 -54
  52. package/docs/ar/intlayer_with_astro_svelte.md +54 -54
  53. package/docs/ar/intlayer_with_astro_vanilla.md +54 -54
  54. package/docs/ar/intlayer_with_astro_vue.md +54 -54
  55. package/docs/ar/intlayer_with_create_react_app.md +5 -6
  56. package/docs/ar/intlayer_with_express.md +2 -2
  57. package/docs/ar/intlayer_with_fastify.md +2 -2
  58. package/docs/ar/intlayer_with_hono.md +2 -2
  59. package/docs/ar/intlayer_with_lynx+react.md +2 -2
  60. package/docs/ar/intlayer_with_nestjs.md +2 -13
  61. package/docs/ar/intlayer_with_next-i18next.md +2 -2
  62. package/docs/ar/intlayer_with_next-intl.md +2 -2
  63. package/docs/ar/intlayer_with_nextjs_14.md +5 -6
  64. package/docs/ar/intlayer_with_nextjs_15.md +5 -6
  65. package/docs/ar/intlayer_with_nextjs_16.md +2 -2
  66. package/docs/ar/intlayer_with_nextjs_compiler.md +37 -39
  67. package/docs/ar/intlayer_with_nextjs_no_locale_path.md +5 -6
  68. package/docs/ar/intlayer_with_nextjs_page_router.md +5 -6
  69. package/docs/ar/intlayer_with_nuxt.md +33 -33
  70. package/docs/ar/intlayer_with_react_native+expo.md +2 -2
  71. package/docs/ar/intlayer_with_react_router_v7.md +2 -2
  72. package/docs/ar/intlayer_with_react_router_v7_fs_routes.md +2 -2
  73. package/docs/ar/intlayer_with_storybook.md +2 -2
  74. package/docs/ar/intlayer_with_svelte_kit.md +15 -15
  75. package/docs/ar/intlayer_with_tanstack+solid.md +6 -6
  76. package/docs/ar/intlayer_with_tanstack.md +13 -13
  77. package/docs/ar/intlayer_with_vanilla.md +5 -6
  78. package/docs/ar/intlayer_with_vite+lit.md +6 -6
  79. package/docs/ar/intlayer_with_vite+preact.md +44 -45
  80. package/docs/ar/intlayer_with_vite+react.md +36 -38
  81. package/docs/ar/intlayer_with_vite+react_compiler.md +5 -6
  82. package/docs/ar/intlayer_with_vite+solid.md +29 -30
  83. package/docs/ar/intlayer_with_vite+svelte.md +16 -17
  84. package/docs/ar/intlayer_with_vite+vanilla.md +5 -6
  85. package/docs/ar/intlayer_with_vite+vue.md +58 -59
  86. package/docs/ar/introduction.md +43 -28
  87. package/docs/ar/lsp.md +1 -1
  88. package/docs/bn/cli/index.md +1 -1
  89. package/docs/bn/intlayer_with_angular_21.md +2 -2
  90. package/docs/bn/intlayer_with_fastify.md +2 -2
  91. package/docs/bn/intlayer_with_hono.md +2 -2
  92. package/docs/bn/intlayer_with_storybook.md +2 -2
  93. package/docs/bn/intlayer_with_vanilla.md +2 -2
  94. package/docs/bn/intlayer_with_vite+lit.md +2 -2
  95. package/docs/bn/intlayer_with_vite+vanilla.md +2 -2
  96. package/docs/bn/introduction.md +43 -28
  97. package/docs/cs/cli/index.md +1 -1
  98. package/docs/cs/interest_of_intlayer.md +8 -0
  99. package/docs/cs/intlayer_with_angular_21.md +6 -6
  100. package/docs/cs/intlayer_with_fastify.md +2 -2
  101. package/docs/cs/intlayer_with_hono.md +2 -2
  102. package/docs/cs/intlayer_with_storybook.md +2 -2
  103. package/docs/cs/intlayer_with_vanilla.md +5 -6
  104. package/docs/cs/intlayer_with_vite+lit.md +6 -6
  105. package/docs/cs/intlayer_with_vite+vanilla.md +5 -6
  106. package/docs/cs/introduction.md +43 -28
  107. package/docs/de/cli/build.md +1 -1
  108. package/docs/de/cli/index.md +1 -1
  109. package/docs/de/interest_of_intlayer.md +8 -0
  110. package/docs/de/intlayer_with_adonisjs.md +2 -2
  111. package/docs/de/intlayer_with_analog.md +13 -6
  112. package/docs/de/intlayer_with_angular_19.md +13 -6
  113. package/docs/de/intlayer_with_angular_21.md +13 -6
  114. package/docs/de/intlayer_with_astro.md +62 -56
  115. package/docs/de/intlayer_with_astro_lit.md +65 -58
  116. package/docs/de/intlayer_with_astro_preact.md +59 -52
  117. package/docs/de/intlayer_with_astro_react.md +61 -54
  118. package/docs/de/intlayer_with_astro_solid.md +61 -54
  119. package/docs/de/intlayer_with_astro_svelte.md +61 -54
  120. package/docs/de/intlayer_with_astro_vanilla.md +61 -54
  121. package/docs/de/intlayer_with_astro_vue.md +61 -54
  122. package/docs/de/intlayer_with_create_react_app.md +5 -6
  123. package/docs/de/intlayer_with_express.md +2 -2
  124. package/docs/de/intlayer_with_fastify.md +2 -2
  125. package/docs/de/intlayer_with_hono.md +2 -2
  126. package/docs/de/intlayer_with_lynx+react.md +9 -2
  127. package/docs/de/intlayer_with_nestjs.md +2 -13
  128. package/docs/de/intlayer_with_next-i18next.md +2 -2
  129. package/docs/de/intlayer_with_next-intl.md +2 -2
  130. package/docs/de/intlayer_with_nextjs_14.md +12 -6
  131. package/docs/de/intlayer_with_nextjs_15.md +12 -6
  132. package/docs/de/intlayer_with_nextjs_16.md +77 -72
  133. package/docs/de/intlayer_with_nextjs_compiler.md +5 -6
  134. package/docs/de/intlayer_with_nextjs_no_locale_path.md +12 -6
  135. package/docs/de/intlayer_with_nextjs_page_router.md +12 -6
  136. package/docs/de/intlayer_with_nuxt.md +40 -33
  137. package/docs/de/intlayer_with_react_native+expo.md +9 -2
  138. package/docs/de/intlayer_with_react_router_v7.md +9 -2
  139. package/docs/de/intlayer_with_react_router_v7_fs_routes.md +9 -2
  140. package/docs/de/intlayer_with_storybook.md +9 -2
  141. package/docs/de/intlayer_with_svelte_kit.md +23 -17
  142. package/docs/de/intlayer_with_tanstack+solid.md +13 -6
  143. package/docs/de/intlayer_with_tanstack.md +13 -6
  144. package/docs/de/intlayer_with_vanilla.md +12 -6
  145. package/docs/de/intlayer_with_vite+lit.md +13 -6
  146. package/docs/de/intlayer_with_vite+preact.md +68 -62
  147. package/docs/de/intlayer_with_vite+react.md +60 -55
  148. package/docs/de/intlayer_with_vite+react_compiler.md +5 -6
  149. package/docs/de/intlayer_with_vite+solid.md +53 -47
  150. package/docs/de/intlayer_with_vite+svelte.md +40 -34
  151. package/docs/de/intlayer_with_vite+vanilla.md +12 -6
  152. package/docs/de/intlayer_with_vite+vue.md +60 -54
  153. package/docs/de/introduction.md +43 -28
  154. package/docs/de/lsp.md +1 -1
  155. package/docs/en/cli/build.md +1 -1
  156. package/docs/en/cli/index.md +1 -1
  157. package/docs/en/interest_of_intlayer.md +8 -0
  158. package/docs/en/intlayer_with_adonisjs.md +2 -2
  159. package/docs/en/intlayer_with_analog.md +13 -6
  160. package/docs/en/intlayer_with_angular_19.md +13 -6
  161. package/docs/en/intlayer_with_angular_21.md +13 -6
  162. package/docs/en/intlayer_with_astro.md +62 -56
  163. package/docs/en/intlayer_with_astro_lit.md +65 -58
  164. package/docs/en/intlayer_with_astro_preact.md +65 -58
  165. package/docs/en/intlayer_with_astro_react.md +61 -54
  166. package/docs/en/intlayer_with_astro_solid.md +61 -54
  167. package/docs/en/intlayer_with_astro_svelte.md +61 -54
  168. package/docs/en/intlayer_with_astro_vanilla.md +61 -54
  169. package/docs/en/intlayer_with_astro_vue.md +61 -54
  170. package/docs/en/intlayer_with_create_react_app.md +12 -6
  171. package/docs/en/intlayer_with_express.md +2 -2
  172. package/docs/en/intlayer_with_fastify.md +2 -2
  173. package/docs/en/intlayer_with_hono.md +2 -2
  174. package/docs/en/intlayer_with_lynx+react.md +9 -2
  175. package/docs/en/intlayer_with_nestjs.md +2 -13
  176. package/docs/en/intlayer_with_next-i18next.md +2 -2
  177. package/docs/en/intlayer_with_next-intl.md +2 -2
  178. package/docs/en/intlayer_with_nextjs_14.md +12 -6
  179. package/docs/en/intlayer_with_nextjs_15.md +12 -6
  180. package/docs/en/intlayer_with_nextjs_16.md +12 -6
  181. package/docs/en/intlayer_with_nextjs_compiler.md +5 -6
  182. package/docs/en/intlayer_with_nextjs_no_locale_path.md +12 -6
  183. package/docs/en/intlayer_with_nextjs_page_router.md +12 -6
  184. package/docs/en/intlayer_with_nuxt.md +40 -33
  185. package/docs/en/intlayer_with_react_native+expo.md +9 -2
  186. package/docs/en/intlayer_with_react_router_v7.md +9 -2
  187. package/docs/en/intlayer_with_react_router_v7_fs_routes.md +9 -2
  188. package/docs/en/intlayer_with_storybook.md +9 -2
  189. package/docs/en/intlayer_with_svelte_kit.md +12 -6
  190. package/docs/en/intlayer_with_tanstack+solid.md +13 -6
  191. package/docs/en/intlayer_with_tanstack.md +13 -6
  192. package/docs/en/intlayer_with_vanilla.md +12 -6
  193. package/docs/en/intlayer_with_vite+lit.md +13 -6
  194. package/docs/en/intlayer_with_vite+preact.md +12 -6
  195. package/docs/en/intlayer_with_vite+react.md +12 -6
  196. package/docs/en/intlayer_with_vite+react_compiler.md +5 -6
  197. package/docs/en/intlayer_with_vite+solid.md +12 -6
  198. package/docs/en/intlayer_with_vite+svelte.md +12 -6
  199. package/docs/en/intlayer_with_vite+vanilla.md +12 -6
  200. package/docs/en/intlayer_with_vite+vue.md +12 -6
  201. package/docs/en/introduction.md +43 -28
  202. package/docs/en/lsp.md +1 -1
  203. package/docs/en-GB/cli/build.md +1 -1
  204. package/docs/en-GB/cli/index.md +1 -1
  205. package/docs/en-GB/interest_of_intlayer.md +8 -0
  206. package/docs/en-GB/intlayer_with_adonisjs.md +2 -2
  207. package/docs/en-GB/intlayer_with_analog.md +13 -6
  208. package/docs/en-GB/intlayer_with_angular_19.md +13 -6
  209. package/docs/en-GB/intlayer_with_angular_21.md +13 -6
  210. package/docs/en-GB/intlayer_with_astro.md +62 -56
  211. package/docs/en-GB/intlayer_with_astro_lit.md +65 -58
  212. package/docs/en-GB/intlayer_with_astro_preact.md +59 -52
  213. package/docs/en-GB/intlayer_with_astro_react.md +61 -54
  214. package/docs/en-GB/intlayer_with_astro_solid.md +61 -54
  215. package/docs/en-GB/intlayer_with_astro_svelte.md +61 -54
  216. package/docs/en-GB/intlayer_with_astro_vanilla.md +61 -54
  217. package/docs/en-GB/intlayer_with_astro_vue.md +61 -54
  218. package/docs/en-GB/intlayer_with_create_react_app.md +5 -6
  219. package/docs/en-GB/intlayer_with_express.md +2 -2
  220. package/docs/en-GB/intlayer_with_fastify.md +2 -2
  221. package/docs/en-GB/intlayer_with_hono.md +2 -2
  222. package/docs/en-GB/intlayer_with_lynx+react.md +9 -2
  223. package/docs/en-GB/intlayer_with_nestjs.md +2 -13
  224. package/docs/en-GB/intlayer_with_next-i18next.md +2 -2
  225. package/docs/en-GB/intlayer_with_next-intl.md +2 -2
  226. package/docs/en-GB/intlayer_with_nextjs_14.md +12 -6
  227. package/docs/en-GB/intlayer_with_nextjs_15.md +12 -6
  228. package/docs/en-GB/intlayer_with_nextjs_16.md +12 -6
  229. package/docs/en-GB/intlayer_with_nextjs_compiler.md +5 -6
  230. package/docs/en-GB/intlayer_with_nextjs_no_locale_path.md +12 -6
  231. package/docs/en-GB/intlayer_with_nextjs_page_router.md +12 -6
  232. package/docs/en-GB/intlayer_with_nuxt.md +40 -33
  233. package/docs/en-GB/intlayer_with_react_native+expo.md +9 -2
  234. package/docs/en-GB/intlayer_with_react_router_v7.md +9 -2
  235. package/docs/en-GB/intlayer_with_react_router_v7_fs_routes.md +9 -2
  236. package/docs/en-GB/intlayer_with_storybook.md +9 -2
  237. package/docs/en-GB/intlayer_with_svelte_kit.md +13 -6
  238. package/docs/en-GB/intlayer_with_tanstack+solid.md +13 -6
  239. package/docs/en-GB/intlayer_with_tanstack.md +13 -6
  240. package/docs/en-GB/intlayer_with_vanilla.md +12 -6
  241. package/docs/en-GB/intlayer_with_vite+lit.md +13 -6
  242. package/docs/en-GB/intlayer_with_vite+preact.md +13 -6
  243. package/docs/en-GB/intlayer_with_vite+react.md +12 -6
  244. package/docs/en-GB/intlayer_with_vite+react_compiler.md +5 -6
  245. package/docs/en-GB/intlayer_with_vite+solid.md +13 -6
  246. package/docs/en-GB/intlayer_with_vite+svelte.md +88 -82
  247. package/docs/en-GB/intlayer_with_vite+vanilla.md +12 -6
  248. package/docs/en-GB/intlayer_with_vite+vue.md +13 -6
  249. package/docs/en-GB/introduction.md +43 -46
  250. package/docs/en-GB/lsp.md +1 -1
  251. package/docs/es/cli/build.md +1 -1
  252. package/docs/es/cli/index.md +1 -1
  253. package/docs/es/interest_of_intlayer.md +8 -0
  254. package/docs/es/intlayer_with_adonisjs.md +2 -2
  255. package/docs/es/intlayer_with_analog.md +13 -6
  256. package/docs/es/intlayer_with_angular_19.md +13 -6
  257. package/docs/es/intlayer_with_angular_21.md +13 -6
  258. package/docs/es/intlayer_with_astro.md +62 -56
  259. package/docs/es/intlayer_with_astro_lit.md +65 -58
  260. package/docs/es/intlayer_with_astro_preact.md +59 -52
  261. package/docs/es/intlayer_with_astro_react.md +61 -54
  262. package/docs/es/intlayer_with_astro_solid.md +61 -54
  263. package/docs/es/intlayer_with_astro_svelte.md +61 -54
  264. package/docs/es/intlayer_with_astro_vanilla.md +61 -54
  265. package/docs/es/intlayer_with_astro_vue.md +61 -54
  266. package/docs/es/intlayer_with_create_react_app.md +5 -6
  267. package/docs/es/intlayer_with_express.md +2 -2
  268. package/docs/es/intlayer_with_fastify.md +2 -2
  269. package/docs/es/intlayer_with_hono.md +2 -2
  270. package/docs/es/intlayer_with_lynx+react.md +9 -2
  271. package/docs/es/intlayer_with_nestjs.md +2 -13
  272. package/docs/es/intlayer_with_next-i18next.md +2 -2
  273. package/docs/es/intlayer_with_next-intl.md +2 -2
  274. package/docs/es/intlayer_with_nextjs_14.md +12 -6
  275. package/docs/es/intlayer_with_nextjs_15.md +12 -6
  276. package/docs/es/intlayer_with_nextjs_16.md +31 -26
  277. package/docs/es/intlayer_with_nextjs_compiler.md +5 -6
  278. package/docs/es/intlayer_with_nextjs_no_locale_path.md +12 -6
  279. package/docs/es/intlayer_with_nextjs_page_router.md +12 -6
  280. package/docs/es/intlayer_with_nuxt.md +40 -33
  281. package/docs/es/intlayer_with_react_native+expo.md +9 -2
  282. package/docs/es/intlayer_with_react_router_v7.md +9 -2
  283. package/docs/es/intlayer_with_react_router_v7_fs_routes.md +9 -2
  284. package/docs/es/intlayer_with_storybook.md +9 -2
  285. package/docs/es/intlayer_with_svelte_kit.md +12 -6
  286. package/docs/es/intlayer_with_tanstack+solid.md +13 -6
  287. package/docs/es/intlayer_with_tanstack.md +13 -6
  288. package/docs/es/intlayer_with_vanilla.md +12 -6
  289. package/docs/es/intlayer_with_vite+lit.md +13 -6
  290. package/docs/es/intlayer_with_vite+preact.md +12 -6
  291. package/docs/es/intlayer_with_vite+react.md +12 -6
  292. package/docs/es/intlayer_with_vite+react_compiler.md +5 -6
  293. package/docs/es/intlayer_with_vite+solid.md +12 -6
  294. package/docs/es/intlayer_with_vite+svelte.md +12 -6
  295. package/docs/es/intlayer_with_vite+vanilla.md +12 -6
  296. package/docs/es/intlayer_with_vite+vue.md +12 -6
  297. package/docs/es/introduction.md +43 -28
  298. package/docs/es/lsp.md +1 -1
  299. package/docs/fr/cli/build.md +1 -1
  300. package/docs/fr/cli/index.md +1 -1
  301. package/docs/fr/interest_of_intlayer.md +8 -0
  302. package/docs/fr/intlayer_with_adonisjs.md +2 -2
  303. package/docs/fr/intlayer_with_analog.md +13 -6
  304. package/docs/fr/intlayer_with_angular_19.md +13 -6
  305. package/docs/fr/intlayer_with_angular_21.md +13 -6
  306. package/docs/fr/intlayer_with_astro.md +63 -57
  307. package/docs/fr/intlayer_with_astro_lit.md +66 -59
  308. package/docs/fr/intlayer_with_astro_preact.md +66 -59
  309. package/docs/fr/intlayer_with_astro_react.md +62 -55
  310. package/docs/fr/intlayer_with_astro_solid.md +62 -55
  311. package/docs/fr/intlayer_with_astro_svelte.md +62 -55
  312. package/docs/fr/intlayer_with_astro_vanilla.md +62 -55
  313. package/docs/fr/intlayer_with_astro_vue.md +62 -55
  314. package/docs/fr/intlayer_with_create_react_app.md +5 -6
  315. package/docs/fr/intlayer_with_express.md +2 -2
  316. package/docs/fr/intlayer_with_fastify.md +2 -2
  317. package/docs/fr/intlayer_with_hono.md +2 -2
  318. package/docs/fr/intlayer_with_lynx+react.md +9 -2
  319. package/docs/fr/intlayer_with_nestjs.md +2 -13
  320. package/docs/fr/intlayer_with_next-i18next.md +2 -2
  321. package/docs/fr/intlayer_with_next-intl.md +2 -2
  322. package/docs/fr/intlayer_with_nextjs_14.md +12 -6
  323. package/docs/fr/intlayer_with_nextjs_15.md +12 -6
  324. package/docs/fr/intlayer_with_nextjs_16.md +12 -6
  325. package/docs/fr/intlayer_with_nextjs_compiler.md +5 -6
  326. package/docs/fr/intlayer_with_nextjs_no_locale_path.md +12 -6
  327. package/docs/fr/intlayer_with_nextjs_page_router.md +12 -6
  328. package/docs/fr/intlayer_with_nuxt.md +40 -33
  329. package/docs/fr/intlayer_with_react_native+expo.md +9 -2
  330. package/docs/fr/intlayer_with_react_router_v7.md +9 -2
  331. package/docs/fr/intlayer_with_react_router_v7_fs_routes.md +9 -2
  332. package/docs/fr/intlayer_with_storybook.md +9 -2
  333. package/docs/fr/intlayer_with_svelte_kit.md +12 -6
  334. package/docs/fr/intlayer_with_tanstack+solid.md +13 -6
  335. package/docs/fr/intlayer_with_tanstack.md +14 -7
  336. package/docs/fr/intlayer_with_vanilla.md +12 -6
  337. package/docs/fr/intlayer_with_vite+lit.md +13 -6
  338. package/docs/fr/intlayer_with_vite+preact.md +12 -6
  339. package/docs/fr/intlayer_with_vite+react.md +12 -6
  340. package/docs/fr/intlayer_with_vite+react_compiler.md +5 -6
  341. package/docs/fr/intlayer_with_vite+solid.md +12 -6
  342. package/docs/fr/intlayer_with_vite+svelte.md +12 -6
  343. package/docs/fr/intlayer_with_vite+vanilla.md +12 -6
  344. package/docs/fr/intlayer_with_vite+vue.md +12 -6
  345. package/docs/fr/introduction.md +43 -28
  346. package/docs/fr/lsp.md +1 -1
  347. package/docs/hi/cli/build.md +1 -1
  348. package/docs/hi/cli/index.md +1 -1
  349. package/docs/hi/intlayer_with_adonisjs.md +2 -2
  350. package/docs/hi/intlayer_with_analog.md +6 -6
  351. package/docs/hi/intlayer_with_angular_19.md +6 -6
  352. package/docs/hi/intlayer_with_angular_21.md +6 -6
  353. package/docs/hi/intlayer_with_astro.md +55 -56
  354. package/docs/hi/intlayer_with_astro_lit.md +58 -58
  355. package/docs/hi/intlayer_with_astro_preact.md +52 -52
  356. package/docs/hi/intlayer_with_astro_react.md +54 -54
  357. package/docs/hi/intlayer_with_astro_solid.md +54 -54
  358. package/docs/hi/intlayer_with_astro_svelte.md +54 -54
  359. package/docs/hi/intlayer_with_astro_vanilla.md +54 -54
  360. package/docs/hi/intlayer_with_astro_vue.md +54 -54
  361. package/docs/hi/intlayer_with_create_react_app.md +5 -6
  362. package/docs/hi/intlayer_with_express.md +2 -2
  363. package/docs/hi/intlayer_with_fastify.md +2 -2
  364. package/docs/hi/intlayer_with_hono.md +2 -2
  365. package/docs/hi/intlayer_with_lynx+react.md +2 -2
  366. package/docs/hi/intlayer_with_nestjs.md +2 -13
  367. package/docs/hi/intlayer_with_next-i18next.md +2 -2
  368. package/docs/hi/intlayer_with_next-intl.md +2 -2
  369. package/docs/hi/intlayer_with_nextjs_14.md +5 -6
  370. package/docs/hi/intlayer_with_nextjs_15.md +5 -6
  371. package/docs/hi/intlayer_with_nextjs_16.md +2 -2
  372. package/docs/hi/intlayer_with_nextjs_compiler.md +52 -54
  373. package/docs/hi/intlayer_with_nextjs_no_locale_path.md +5 -6
  374. package/docs/hi/intlayer_with_nextjs_page_router.md +5 -6
  375. package/docs/hi/intlayer_with_nuxt.md +33 -33
  376. package/docs/hi/intlayer_with_react_native+expo.md +2 -2
  377. package/docs/hi/intlayer_with_react_router_v7.md +2 -2
  378. package/docs/hi/intlayer_with_react_router_v7_fs_routes.md +2 -2
  379. package/docs/hi/intlayer_with_storybook.md +2 -2
  380. package/docs/hi/intlayer_with_svelte_kit.md +16 -17
  381. package/docs/hi/intlayer_with_tanstack+solid.md +6 -6
  382. package/docs/hi/intlayer_with_tanstack.md +6 -6
  383. package/docs/hi/intlayer_with_vanilla.md +5 -6
  384. package/docs/hi/intlayer_with_vite+lit.md +6 -6
  385. package/docs/hi/intlayer_with_vite+preact.md +61 -62
  386. package/docs/hi/intlayer_with_vite+react.md +53 -55
  387. package/docs/hi/intlayer_with_vite+react_compiler.md +5 -6
  388. package/docs/hi/intlayer_with_vite+solid.md +46 -47
  389. package/docs/hi/intlayer_with_vite+svelte.md +33 -34
  390. package/docs/hi/intlayer_with_vite+vanilla.md +5 -6
  391. package/docs/hi/intlayer_with_vite+vue.md +53 -54
  392. package/docs/hi/introduction.md +43 -28
  393. package/docs/hi/lsp.md +1 -1
  394. package/docs/id/cli/build.md +1 -1
  395. package/docs/id/cli/index.md +1 -1
  396. package/docs/id/interest_of_intlayer.md +8 -0
  397. package/docs/id/intlayer_with_adonisjs.md +2 -2
  398. package/docs/id/intlayer_with_analog.md +13 -6
  399. package/docs/id/intlayer_with_angular_19.md +13 -6
  400. package/docs/id/intlayer_with_angular_21.md +13 -6
  401. package/docs/id/intlayer_with_astro.md +62 -56
  402. package/docs/id/intlayer_with_astro_lit.md +65 -58
  403. package/docs/id/intlayer_with_astro_preact.md +59 -52
  404. package/docs/id/intlayer_with_astro_react.md +61 -54
  405. package/docs/id/intlayer_with_astro_solid.md +61 -54
  406. package/docs/id/intlayer_with_astro_svelte.md +61 -54
  407. package/docs/id/intlayer_with_astro_vanilla.md +61 -54
  408. package/docs/id/intlayer_with_astro_vue.md +61 -54
  409. package/docs/id/intlayer_with_create_react_app.md +5 -6
  410. package/docs/id/intlayer_with_express.md +2 -2
  411. package/docs/id/intlayer_with_fastify.md +2 -2
  412. package/docs/id/intlayer_with_hono.md +2 -2
  413. package/docs/id/intlayer_with_lynx+react.md +9 -2
  414. package/docs/id/intlayer_with_nestjs.md +2 -12
  415. package/docs/id/intlayer_with_next-i18next.md +2 -2
  416. package/docs/id/intlayer_with_next-intl.md +2 -2
  417. package/docs/id/intlayer_with_nextjs_14.md +12 -6
  418. package/docs/id/intlayer_with_nextjs_15.md +12 -6
  419. package/docs/id/intlayer_with_nextjs_16.md +9 -2
  420. package/docs/id/intlayer_with_nextjs_compiler.md +74 -77
  421. package/docs/id/intlayer_with_nextjs_no_locale_path.md +12 -6
  422. package/docs/id/intlayer_with_nextjs_page_router.md +12 -6
  423. package/docs/id/intlayer_with_nuxt.md +40 -33
  424. package/docs/id/intlayer_with_react_native+expo.md +9 -2
  425. package/docs/id/intlayer_with_react_router_v7.md +9 -2
  426. package/docs/id/intlayer_with_react_router_v7_fs_routes.md +9 -2
  427. package/docs/id/intlayer_with_storybook.md +9 -2
  428. package/docs/id/intlayer_with_svelte_kit.md +23 -17
  429. package/docs/id/intlayer_with_tanstack+solid.md +13 -6
  430. package/docs/id/intlayer_with_tanstack.md +13 -6
  431. package/docs/id/intlayer_with_vanilla.md +12 -6
  432. package/docs/id/intlayer_with_vite+lit.md +13 -6
  433. package/docs/id/intlayer_with_vite+preact.md +68 -62
  434. package/docs/id/intlayer_with_vite+react.md +60 -55
  435. package/docs/id/intlayer_with_vite+react_compiler.md +5 -6
  436. package/docs/id/intlayer_with_vite+solid.md +53 -47
  437. package/docs/id/intlayer_with_vite+svelte.md +40 -34
  438. package/docs/id/intlayer_with_vite+vanilla.md +12 -6
  439. package/docs/id/intlayer_with_vite+vue.md +60 -54
  440. package/docs/id/introduction.md +43 -28
  441. package/docs/id/lsp.md +1 -1
  442. package/docs/it/cli/build.md +1 -1
  443. package/docs/it/cli/index.md +1 -1
  444. package/docs/it/interest_of_intlayer.md +8 -0
  445. package/docs/it/intlayer_with_adonisjs.md +2 -2
  446. package/docs/it/intlayer_with_analog.md +13 -6
  447. package/docs/it/intlayer_with_angular_19.md +13 -6
  448. package/docs/it/intlayer_with_angular_21.md +13 -6
  449. package/docs/it/intlayer_with_astro.md +62 -56
  450. package/docs/it/intlayer_with_astro_lit.md +65 -58
  451. package/docs/it/intlayer_with_astro_preact.md +59 -52
  452. package/docs/it/intlayer_with_astro_react.md +61 -54
  453. package/docs/it/intlayer_with_astro_solid.md +61 -54
  454. package/docs/it/intlayer_with_astro_svelte.md +61 -54
  455. package/docs/it/intlayer_with_astro_vanilla.md +61 -54
  456. package/docs/it/intlayer_with_astro_vue.md +61 -54
  457. package/docs/it/intlayer_with_create_react_app.md +5 -6
  458. package/docs/it/intlayer_with_express.md +2 -2
  459. package/docs/it/intlayer_with_fastify.md +2 -2
  460. package/docs/it/intlayer_with_hono.md +2 -2
  461. package/docs/it/intlayer_with_lynx+react.md +9 -2
  462. package/docs/it/intlayer_with_nestjs.md +2 -13
  463. package/docs/it/intlayer_with_next-i18next.md +2 -2
  464. package/docs/it/intlayer_with_next-intl.md +2 -2
  465. package/docs/it/intlayer_with_nextjs_14.md +32 -27
  466. package/docs/it/intlayer_with_nextjs_15.md +12 -6
  467. package/docs/it/intlayer_with_nextjs_16.md +9 -2
  468. package/docs/it/intlayer_with_nextjs_compiler.md +52 -54
  469. package/docs/it/intlayer_with_nextjs_no_locale_path.md +12 -6
  470. package/docs/it/intlayer_with_nextjs_page_router.md +12 -6
  471. package/docs/it/intlayer_with_nuxt.md +40 -33
  472. package/docs/it/intlayer_with_react_native+expo.md +9 -2
  473. package/docs/it/intlayer_with_react_router_v7.md +9 -2
  474. package/docs/it/intlayer_with_react_router_v7_fs_routes.md +9 -2
  475. package/docs/it/intlayer_with_storybook.md +9 -2
  476. package/docs/it/intlayer_with_svelte_kit.md +55 -49
  477. package/docs/it/intlayer_with_tanstack+solid.md +13 -6
  478. package/docs/it/intlayer_with_tanstack.md +13 -6
  479. package/docs/it/intlayer_with_vanilla.md +12 -6
  480. package/docs/it/intlayer_with_vite+lit.md +13 -6
  481. package/docs/it/intlayer_with_vite+preact.md +68 -62
  482. package/docs/it/intlayer_with_vite+react.md +60 -55
  483. package/docs/it/intlayer_with_vite+react_compiler.md +5 -6
  484. package/docs/it/intlayer_with_vite+solid.md +53 -47
  485. package/docs/it/intlayer_with_vite+svelte.md +40 -34
  486. package/docs/it/intlayer_with_vite+vanilla.md +12 -6
  487. package/docs/it/intlayer_with_vite+vue.md +82 -76
  488. package/docs/it/introduction.md +43 -28
  489. package/docs/it/lsp.md +1 -1
  490. package/docs/ja/cli/build.md +1 -1
  491. package/docs/ja/cli/index.md +1 -1
  492. package/docs/ja/intlayer_with_adonisjs.md +2 -2
  493. package/docs/ja/intlayer_with_analog.md +6 -6
  494. package/docs/ja/intlayer_with_angular_19.md +6 -6
  495. package/docs/ja/intlayer_with_angular_21.md +6 -6
  496. package/docs/ja/intlayer_with_astro.md +55 -56
  497. package/docs/ja/intlayer_with_astro_lit.md +58 -58
  498. package/docs/ja/intlayer_with_astro_preact.md +58 -58
  499. package/docs/ja/intlayer_with_astro_react.md +54 -54
  500. package/docs/ja/intlayer_with_astro_solid.md +54 -54
  501. package/docs/ja/intlayer_with_astro_svelte.md +54 -54
  502. package/docs/ja/intlayer_with_astro_vanilla.md +54 -54
  503. package/docs/ja/intlayer_with_astro_vue.md +54 -54
  504. package/docs/ja/intlayer_with_create_react_app.md +5 -6
  505. package/docs/ja/intlayer_with_express.md +2 -2
  506. package/docs/ja/intlayer_with_fastify.md +2 -2
  507. package/docs/ja/intlayer_with_hono.md +2 -2
  508. package/docs/ja/intlayer_with_lynx+react.md +2 -2
  509. package/docs/ja/intlayer_with_nestjs.md +2 -13
  510. package/docs/ja/intlayer_with_next-i18next.md +2 -2
  511. package/docs/ja/intlayer_with_next-intl.md +2 -2
  512. package/docs/ja/intlayer_with_nextjs_14.md +5 -6
  513. package/docs/ja/intlayer_with_nextjs_15.md +5 -6
  514. package/docs/ja/intlayer_with_nextjs_16.md +2 -2
  515. package/docs/ja/intlayer_with_nextjs_compiler.md +74 -77
  516. package/docs/ja/intlayer_with_nextjs_no_locale_path.md +5 -6
  517. package/docs/ja/intlayer_with_nextjs_page_router.md +5 -6
  518. package/docs/ja/intlayer_with_nuxt.md +33 -33
  519. package/docs/ja/intlayer_with_react_native+expo.md +2 -2
  520. package/docs/ja/intlayer_with_react_router_v7.md +2 -2
  521. package/docs/ja/intlayer_with_react_router_v7_fs_routes.md +2 -2
  522. package/docs/ja/intlayer_with_storybook.md +2 -2
  523. package/docs/ja/intlayer_with_svelte_kit.md +5 -6
  524. package/docs/ja/intlayer_with_tanstack+solid.md +6 -6
  525. package/docs/ja/intlayer_with_tanstack.md +6 -6
  526. package/docs/ja/intlayer_with_vanilla.md +5 -6
  527. package/docs/ja/intlayer_with_vite+lit.md +6 -6
  528. package/docs/ja/intlayer_with_vite+preact.md +5 -6
  529. package/docs/ja/intlayer_with_vite+react.md +2 -2
  530. package/docs/ja/intlayer_with_vite+react_compiler.md +5 -6
  531. package/docs/ja/intlayer_with_vite+solid.md +46 -47
  532. package/docs/ja/intlayer_with_vite+svelte.md +33 -34
  533. package/docs/ja/intlayer_with_vite+vanilla.md +5 -6
  534. package/docs/ja/intlayer_with_vite+vue.md +53 -54
  535. package/docs/ja/introduction.md +43 -28
  536. package/docs/ja/lsp.md +1 -1
  537. package/docs/ko/cli/build.md +1 -1
  538. package/docs/ko/cli/index.md +1 -1
  539. package/docs/ko/interest_of_intlayer.md +8 -0
  540. package/docs/ko/intlayer_with_adonisjs.md +2 -2
  541. package/docs/ko/intlayer_with_analog.md +9 -2
  542. package/docs/ko/intlayer_with_angular_19.md +9 -2
  543. package/docs/ko/intlayer_with_angular_21.md +9 -2
  544. package/docs/ko/intlayer_with_astro.md +9 -2
  545. package/docs/ko/intlayer_with_astro_lit.md +9 -2
  546. package/docs/ko/intlayer_with_astro_preact.md +9 -2
  547. package/docs/ko/intlayer_with_astro_react.md +9 -2
  548. package/docs/ko/intlayer_with_astro_solid.md +9 -2
  549. package/docs/ko/intlayer_with_astro_svelte.md +9 -2
  550. package/docs/ko/intlayer_with_astro_vanilla.md +9 -2
  551. package/docs/ko/intlayer_with_astro_vue.md +9 -2
  552. package/docs/ko/intlayer_with_create_react_app.md +5 -6
  553. package/docs/ko/intlayer_with_express.md +2 -2
  554. package/docs/ko/intlayer_with_fastify.md +2 -2
  555. package/docs/ko/intlayer_with_hono.md +2 -2
  556. package/docs/ko/intlayer_with_lynx+react.md +9 -2
  557. package/docs/ko/intlayer_with_nestjs.md +2 -13
  558. package/docs/ko/intlayer_with_next-i18next.md +2 -2
  559. package/docs/ko/intlayer_with_next-intl.md +2 -2
  560. package/docs/ko/intlayer_with_nextjs_14.md +9 -2
  561. package/docs/ko/intlayer_with_nextjs_15.md +9 -2
  562. package/docs/ko/intlayer_with_nextjs_16.md +12 -6
  563. package/docs/ko/intlayer_with_nextjs_compiler.md +5 -6
  564. package/docs/ko/intlayer_with_nextjs_no_locale_path.md +12 -6
  565. package/docs/ko/intlayer_with_nextjs_page_router.md +9 -2
  566. package/docs/ko/intlayer_with_nuxt.md +9 -2
  567. package/docs/ko/intlayer_with_react_native+expo.md +9 -2
  568. package/docs/ko/intlayer_with_react_router_v7.md +113 -106
  569. package/docs/ko/intlayer_with_react_router_v7_fs_routes.md +113 -106
  570. package/docs/ko/intlayer_with_storybook.md +9 -2
  571. package/docs/ko/intlayer_with_svelte_kit.md +12 -6
  572. package/docs/ko/intlayer_with_tanstack+solid.md +9 -2
  573. package/docs/ko/intlayer_with_tanstack.md +9 -2
  574. package/docs/ko/intlayer_with_vanilla.md +9 -2
  575. package/docs/ko/intlayer_with_vite+lit.md +9 -2
  576. package/docs/ko/intlayer_with_vite+preact.md +12 -6
  577. package/docs/ko/intlayer_with_vite+react.md +12 -6
  578. package/docs/ko/intlayer_with_vite+react_compiler.md +2 -2
  579. package/docs/ko/intlayer_with_vite+solid.md +12 -6
  580. package/docs/ko/intlayer_with_vite+svelte.md +109 -104
  581. package/docs/ko/intlayer_with_vite+vanilla.md +9 -2
  582. package/docs/ko/intlayer_with_vite+vue.md +12 -6
  583. package/docs/ko/introduction.md +43 -28
  584. package/docs/ko/lsp.md +1 -1
  585. package/docs/nl/cli/index.md +1 -1
  586. package/docs/nl/interest_of_intlayer.md +8 -0
  587. package/docs/nl/intlayer_with_angular_21.md +6 -6
  588. package/docs/nl/intlayer_with_fastify.md +2 -2
  589. package/docs/nl/intlayer_with_hono.md +2 -2
  590. package/docs/nl/intlayer_with_storybook.md +2 -2
  591. package/docs/nl/intlayer_with_vanilla.md +5 -6
  592. package/docs/nl/intlayer_with_vite+lit.md +6 -6
  593. package/docs/nl/intlayer_with_vite+vanilla.md +5 -6
  594. package/docs/nl/introduction.md +43 -28
  595. package/docs/pl/cli/build.md +1 -1
  596. package/docs/pl/cli/index.md +1 -1
  597. package/docs/pl/interest_of_intlayer.md +8 -0
  598. package/docs/pl/intlayer_with_adonisjs.md +2 -2
  599. package/docs/pl/intlayer_with_analog.md +6 -6
  600. package/docs/pl/intlayer_with_angular_19.md +6 -6
  601. package/docs/pl/intlayer_with_angular_21.md +6 -6
  602. package/docs/pl/intlayer_with_astro.md +55 -56
  603. package/docs/pl/intlayer_with_astro_lit.md +58 -58
  604. package/docs/pl/intlayer_with_astro_preact.md +52 -52
  605. package/docs/pl/intlayer_with_astro_react.md +54 -54
  606. package/docs/pl/intlayer_with_astro_solid.md +54 -54
  607. package/docs/pl/intlayer_with_astro_svelte.md +54 -54
  608. package/docs/pl/intlayer_with_astro_vanilla.md +54 -54
  609. package/docs/pl/intlayer_with_astro_vue.md +54 -54
  610. package/docs/pl/intlayer_with_create_react_app.md +5 -6
  611. package/docs/pl/intlayer_with_express.md +2 -2
  612. package/docs/pl/intlayer_with_fastify.md +2 -2
  613. package/docs/pl/intlayer_with_hono.md +2 -2
  614. package/docs/pl/intlayer_with_lynx+react.md +2 -2
  615. package/docs/pl/intlayer_with_nestjs.md +2 -12
  616. package/docs/pl/intlayer_with_next-i18next.md +2 -2
  617. package/docs/pl/intlayer_with_next-intl.md +2 -2
  618. package/docs/pl/intlayer_with_nextjs_14.md +5 -6
  619. package/docs/pl/intlayer_with_nextjs_15.md +5 -6
  620. package/docs/pl/intlayer_with_nextjs_16.md +70 -72
  621. package/docs/pl/intlayer_with_nextjs_compiler.md +52 -54
  622. package/docs/pl/intlayer_with_nextjs_no_locale_path.md +5 -6
  623. package/docs/pl/intlayer_with_nextjs_page_router.md +5 -6
  624. package/docs/pl/intlayer_with_nuxt.md +33 -33
  625. package/docs/pl/intlayer_with_react_native+expo.md +2 -2
  626. package/docs/pl/intlayer_with_react_router_v7.md +2 -2
  627. package/docs/pl/intlayer_with_react_router_v7_fs_routes.md +2 -2
  628. package/docs/pl/intlayer_with_storybook.md +2 -2
  629. package/docs/pl/intlayer_with_svelte_kit.md +16 -17
  630. package/docs/pl/intlayer_with_tanstack+solid.md +6 -6
  631. package/docs/pl/intlayer_with_tanstack.md +6 -6
  632. package/docs/pl/intlayer_with_vanilla.md +5 -6
  633. package/docs/pl/intlayer_with_vite+lit.md +6 -6
  634. package/docs/pl/intlayer_with_vite+preact.md +61 -62
  635. package/docs/pl/intlayer_with_vite+react.md +53 -55
  636. package/docs/pl/intlayer_with_vite+react_compiler.md +5 -6
  637. package/docs/pl/intlayer_with_vite+solid.md +46 -47
  638. package/docs/pl/intlayer_with_vite+svelte.md +33 -34
  639. package/docs/pl/intlayer_with_vite+vanilla.md +5 -6
  640. package/docs/pl/intlayer_with_vite+vue.md +75 -76
  641. package/docs/pl/introduction.md +43 -28
  642. package/docs/pl/lsp.md +1 -1
  643. package/docs/pt/cli/build.md +1 -1
  644. package/docs/pt/cli/index.md +1 -1
  645. package/docs/pt/interest_of_intlayer.md +8 -0
  646. package/docs/pt/intlayer_with_adonisjs.md +2 -2
  647. package/docs/pt/intlayer_with_analog.md +13 -6
  648. package/docs/pt/intlayer_with_angular_19.md +13 -6
  649. package/docs/pt/intlayer_with_angular_21.md +13 -6
  650. package/docs/pt/intlayer_with_astro.md +62 -56
  651. package/docs/pt/intlayer_with_astro_lit.md +65 -58
  652. package/docs/pt/intlayer_with_astro_preact.md +59 -52
  653. package/docs/pt/intlayer_with_astro_react.md +61 -54
  654. package/docs/pt/intlayer_with_astro_solid.md +61 -54
  655. package/docs/pt/intlayer_with_astro_svelte.md +61 -54
  656. package/docs/pt/intlayer_with_astro_vanilla.md +61 -54
  657. package/docs/pt/intlayer_with_astro_vue.md +61 -54
  658. package/docs/pt/intlayer_with_create_react_app.md +5 -6
  659. package/docs/pt/intlayer_with_express.md +2 -2
  660. package/docs/pt/intlayer_with_fastify.md +2 -2
  661. package/docs/pt/intlayer_with_hono.md +2 -2
  662. package/docs/pt/intlayer_with_lynx+react.md +9 -2
  663. package/docs/pt/intlayer_with_nestjs.md +2 -13
  664. package/docs/pt/intlayer_with_next-i18next.md +2 -2
  665. package/docs/pt/intlayer_with_next-intl.md +2 -2
  666. package/docs/pt/intlayer_with_nextjs_14.md +12 -6
  667. package/docs/pt/intlayer_with_nextjs_15.md +12 -6
  668. package/docs/pt/intlayer_with_nextjs_16.md +31 -26
  669. package/docs/pt/intlayer_with_nextjs_compiler.md +5 -6
  670. package/docs/pt/intlayer_with_nextjs_no_locale_path.md +12 -6
  671. package/docs/pt/intlayer_with_nextjs_page_router.md +12 -6
  672. package/docs/pt/intlayer_with_nuxt.md +40 -33
  673. package/docs/pt/intlayer_with_react_native+expo.md +9 -2
  674. package/docs/pt/intlayer_with_react_router_v7.md +9 -2
  675. package/docs/pt/intlayer_with_react_router_v7_fs_routes.md +9 -2
  676. package/docs/pt/intlayer_with_storybook.md +9 -2
  677. package/docs/pt/intlayer_with_svelte_kit.md +55 -49
  678. package/docs/pt/intlayer_with_tanstack+solid.md +13 -6
  679. package/docs/pt/intlayer_with_tanstack.md +13 -6
  680. package/docs/pt/intlayer_with_vanilla.md +12 -6
  681. package/docs/pt/intlayer_with_vite+lit.md +13 -6
  682. package/docs/pt/intlayer_with_vite+preact.md +12 -6
  683. package/docs/pt/intlayer_with_vite+react.md +12 -6
  684. package/docs/pt/intlayer_with_vite+react_compiler.md +5 -6
  685. package/docs/pt/intlayer_with_vite+solid.md +12 -6
  686. package/docs/pt/intlayer_with_vite+svelte.md +40 -34
  687. package/docs/pt/intlayer_with_vite+vanilla.md +12 -6
  688. package/docs/pt/intlayer_with_vite+vue.md +12 -6
  689. package/docs/pt/introduction.md +43 -28
  690. package/docs/pt/lsp.md +1 -1
  691. package/docs/ru/cli/build.md +1 -1
  692. package/docs/ru/cli/index.md +1 -1
  693. package/docs/ru/interest_of_intlayer.md +8 -0
  694. package/docs/ru/intlayer_with_adonisjs.md +2 -2
  695. package/docs/ru/intlayer_with_analog.md +13 -6
  696. package/docs/ru/intlayer_with_angular_19.md +13 -6
  697. package/docs/ru/intlayer_with_angular_21.md +13 -6
  698. package/docs/ru/intlayer_with_astro.md +62 -56
  699. package/docs/ru/intlayer_with_astro_lit.md +65 -58
  700. package/docs/ru/intlayer_with_astro_preact.md +65 -58
  701. package/docs/ru/intlayer_with_astro_react.md +61 -54
  702. package/docs/ru/intlayer_with_astro_solid.md +61 -54
  703. package/docs/ru/intlayer_with_astro_svelte.md +61 -54
  704. package/docs/ru/intlayer_with_astro_vanilla.md +61 -54
  705. package/docs/ru/intlayer_with_astro_vue.md +61 -54
  706. package/docs/ru/intlayer_with_create_react_app.md +5 -6
  707. package/docs/ru/intlayer_with_express.md +2 -2
  708. package/docs/ru/intlayer_with_fastify.md +2 -2
  709. package/docs/ru/intlayer_with_hono.md +2 -2
  710. package/docs/ru/intlayer_with_lynx+react.md +9 -2
  711. package/docs/ru/intlayer_with_nestjs.md +2 -13
  712. package/docs/ru/intlayer_with_next-i18next.md +2 -2
  713. package/docs/ru/intlayer_with_next-intl.md +2 -2
  714. package/docs/ru/intlayer_with_nextjs_14.md +12 -6
  715. package/docs/ru/intlayer_with_nextjs_15.md +12 -6
  716. package/docs/ru/intlayer_with_nextjs_16.md +77 -72
  717. package/docs/ru/intlayer_with_nextjs_compiler.md +52 -54
  718. package/docs/ru/intlayer_with_nextjs_no_locale_path.md +12 -6
  719. package/docs/ru/intlayer_with_nextjs_page_router.md +12 -6
  720. package/docs/ru/intlayer_with_nuxt.md +40 -33
  721. package/docs/ru/intlayer_with_react_native+expo.md +9 -2
  722. package/docs/ru/intlayer_with_react_router_v7.md +9 -2
  723. package/docs/ru/intlayer_with_react_router_v7_fs_routes.md +9 -2
  724. package/docs/ru/intlayer_with_storybook.md +9 -2
  725. package/docs/ru/intlayer_with_svelte_kit.md +23 -17
  726. package/docs/ru/intlayer_with_tanstack+solid.md +13 -6
  727. package/docs/ru/intlayer_with_tanstack.md +13 -6
  728. package/docs/ru/intlayer_with_vanilla.md +12 -6
  729. package/docs/ru/intlayer_with_vite+lit.md +13 -6
  730. package/docs/ru/intlayer_with_vite+preact.md +68 -62
  731. package/docs/ru/intlayer_with_vite+react.md +59 -54
  732. package/docs/ru/intlayer_with_vite+react_compiler.md +5 -6
  733. package/docs/ru/intlayer_with_vite+solid.md +53 -47
  734. package/docs/ru/intlayer_with_vite+svelte.md +40 -34
  735. package/docs/ru/intlayer_with_vite+vanilla.md +12 -6
  736. package/docs/ru/intlayer_with_vite+vue.md +60 -54
  737. package/docs/ru/introduction.md +43 -28
  738. package/docs/ru/lsp.md +1 -1
  739. package/docs/tr/cli/build.md +1 -1
  740. package/docs/tr/cli/index.md +1 -1
  741. package/docs/tr/interest_of_intlayer.md +8 -0
  742. package/docs/tr/intlayer_with_adonisjs.md +2 -2
  743. package/docs/tr/intlayer_with_analog.md +13 -6
  744. package/docs/tr/intlayer_with_angular_19.md +13 -6
  745. package/docs/tr/intlayer_with_angular_21.md +13 -6
  746. package/docs/tr/intlayer_with_astro.md +62 -56
  747. package/docs/tr/intlayer_with_astro_lit.md +73 -66
  748. package/docs/tr/intlayer_with_astro_preact.md +67 -60
  749. package/docs/tr/intlayer_with_astro_react.md +69 -62
  750. package/docs/tr/intlayer_with_astro_solid.md +69 -62
  751. package/docs/tr/intlayer_with_astro_svelte.md +69 -62
  752. package/docs/tr/intlayer_with_astro_vanilla.md +69 -62
  753. package/docs/tr/intlayer_with_astro_vue.md +61 -54
  754. package/docs/tr/intlayer_with_create_react_app.md +5 -6
  755. package/docs/tr/intlayer_with_express.md +2 -2
  756. package/docs/tr/intlayer_with_fastify.md +2 -2
  757. package/docs/tr/intlayer_with_hono.md +2 -2
  758. package/docs/tr/intlayer_with_lynx+react.md +9 -2
  759. package/docs/tr/intlayer_with_nestjs.md +2 -13
  760. package/docs/tr/intlayer_with_next-i18next.md +2 -2
  761. package/docs/tr/intlayer_with_next-intl.md +2 -2
  762. package/docs/tr/intlayer_with_nextjs_14.md +5 -6
  763. package/docs/tr/intlayer_with_nextjs_15.md +12 -6
  764. package/docs/tr/intlayer_with_nextjs_16.md +77 -72
  765. package/docs/tr/intlayer_with_nextjs_compiler.md +74 -77
  766. package/docs/tr/intlayer_with_nextjs_no_locale_path.md +12 -6
  767. package/docs/tr/intlayer_with_nextjs_page_router.md +12 -6
  768. package/docs/tr/intlayer_with_nuxt.md +40 -33
  769. package/docs/tr/intlayer_with_react_native+expo.md +9 -2
  770. package/docs/tr/intlayer_with_react_router_v7.md +9 -2
  771. package/docs/tr/intlayer_with_react_router_v7_fs_routes.md +9 -2
  772. package/docs/tr/intlayer_with_storybook.md +9 -2
  773. package/docs/tr/intlayer_with_svelte_kit.md +23 -17
  774. package/docs/tr/intlayer_with_tanstack+solid.md +13 -6
  775. package/docs/tr/intlayer_with_tanstack.md +13 -6
  776. package/docs/tr/intlayer_with_vanilla.md +12 -6
  777. package/docs/tr/intlayer_with_vite+lit.md +13 -6
  778. package/docs/tr/intlayer_with_vite+preact.md +68 -62
  779. package/docs/tr/intlayer_with_vite+react.md +60 -55
  780. package/docs/tr/intlayer_with_vite+react_compiler.md +5 -6
  781. package/docs/tr/intlayer_with_vite+solid.md +53 -47
  782. package/docs/tr/intlayer_with_vite+svelte.md +40 -34
  783. package/docs/tr/intlayer_with_vite+vanilla.md +12 -6
  784. package/docs/tr/intlayer_with_vite+vue.md +60 -54
  785. package/docs/tr/introduction.md +43 -28
  786. package/docs/tr/lsp.md +1 -1
  787. package/docs/uk/cli/build.md +1 -1
  788. package/docs/uk/cli/index.md +1 -1
  789. package/docs/uk/interest_of_intlayer.md +8 -0
  790. package/docs/uk/intlayer_with_adonisjs.md +2 -2
  791. package/docs/uk/intlayer_with_analog.md +13 -6
  792. package/docs/uk/intlayer_with_angular_19.md +13 -6
  793. package/docs/uk/intlayer_with_angular_21.md +13 -6
  794. package/docs/uk/intlayer_with_astro.md +62 -56
  795. package/docs/uk/intlayer_with_astro_lit.md +65 -58
  796. package/docs/uk/intlayer_with_astro_preact.md +59 -52
  797. package/docs/uk/intlayer_with_astro_react.md +61 -54
  798. package/docs/uk/intlayer_with_astro_solid.md +61 -54
  799. package/docs/uk/intlayer_with_astro_svelte.md +61 -54
  800. package/docs/uk/intlayer_with_astro_vanilla.md +61 -54
  801. package/docs/uk/intlayer_with_astro_vue.md +61 -54
  802. package/docs/uk/intlayer_with_create_react_app.md +5 -6
  803. package/docs/uk/intlayer_with_express.md +2 -2
  804. package/docs/uk/intlayer_with_fastify.md +2 -2
  805. package/docs/uk/intlayer_with_hono.md +2 -2
  806. package/docs/uk/intlayer_with_lynx+react.md +9 -2
  807. package/docs/uk/intlayer_with_nestjs.md +2 -12
  808. package/docs/uk/intlayer_with_next-i18next.md +2 -2
  809. package/docs/uk/intlayer_with_next-intl.md +2 -2
  810. package/docs/uk/intlayer_with_nextjs_14.md +12 -6
  811. package/docs/uk/intlayer_with_nextjs_15.md +12 -6
  812. package/docs/uk/intlayer_with_nextjs_16.md +77 -72
  813. package/docs/uk/intlayer_with_nextjs_compiler.md +74 -77
  814. package/docs/uk/intlayer_with_nextjs_no_locale_path.md +12 -6
  815. package/docs/uk/intlayer_with_nextjs_page_router.md +12 -6
  816. package/docs/uk/intlayer_with_nuxt.md +40 -33
  817. package/docs/uk/intlayer_with_react_native+expo.md +9 -2
  818. package/docs/uk/intlayer_with_react_router_v7.md +9 -2
  819. package/docs/uk/intlayer_with_react_router_v7_fs_routes.md +9 -2
  820. package/docs/uk/intlayer_with_storybook.md +9 -2
  821. package/docs/uk/intlayer_with_svelte_kit.md +23 -17
  822. package/docs/uk/intlayer_with_tanstack+solid.md +13 -6
  823. package/docs/uk/intlayer_with_tanstack.md +13 -6
  824. package/docs/uk/intlayer_with_vanilla.md +12 -6
  825. package/docs/uk/intlayer_with_vite+lit.md +13 -6
  826. package/docs/uk/intlayer_with_vite+preact.md +68 -62
  827. package/docs/uk/intlayer_with_vite+react.md +60 -55
  828. package/docs/uk/intlayer_with_vite+react_compiler.md +5 -6
  829. package/docs/uk/intlayer_with_vite+solid.md +53 -47
  830. package/docs/uk/intlayer_with_vite+svelte.md +40 -34
  831. package/docs/uk/intlayer_with_vite+vanilla.md +12 -6
  832. package/docs/uk/intlayer_with_vite+vue.md +60 -54
  833. package/docs/uk/introduction.md +43 -28
  834. package/docs/uk/lsp.md +1 -1
  835. package/docs/ur/cli/index.md +1 -1
  836. package/docs/ur/intlayer_with_angular_21.md +6 -6
  837. package/docs/ur/intlayer_with_fastify.md +2 -2
  838. package/docs/ur/intlayer_with_hono.md +2 -2
  839. package/docs/ur/intlayer_with_storybook.md +2 -2
  840. package/docs/ur/intlayer_with_vanilla.md +5 -6
  841. package/docs/ur/intlayer_with_vite+lit.md +6 -6
  842. package/docs/ur/intlayer_with_vite+vanilla.md +5 -6
  843. package/docs/ur/introduction.md +43 -28
  844. package/docs/vi/cli/build.md +1 -1
  845. package/docs/vi/cli/index.md +1 -1
  846. package/docs/vi/interest_of_intlayer.md +8 -0
  847. package/docs/vi/intlayer_with_adonisjs.md +2 -2
  848. package/docs/vi/intlayer_with_analog.md +13 -6
  849. package/docs/vi/intlayer_with_angular_19.md +13 -6
  850. package/docs/vi/intlayer_with_angular_21.md +13 -6
  851. package/docs/vi/intlayer_with_astro.md +62 -56
  852. package/docs/vi/intlayer_with_astro_lit.md +65 -58
  853. package/docs/vi/intlayer_with_astro_preact.md +59 -52
  854. package/docs/vi/intlayer_with_astro_react.md +61 -54
  855. package/docs/vi/intlayer_with_astro_solid.md +61 -54
  856. package/docs/vi/intlayer_with_astro_svelte.md +61 -54
  857. package/docs/vi/intlayer_with_astro_vanilla.md +61 -54
  858. package/docs/vi/intlayer_with_astro_vue.md +61 -54
  859. package/docs/vi/intlayer_with_create_react_app.md +5 -6
  860. package/docs/vi/intlayer_with_express.md +2 -2
  861. package/docs/vi/intlayer_with_fastify.md +2 -2
  862. package/docs/vi/intlayer_with_hono.md +2 -2
  863. package/docs/vi/intlayer_with_lynx+react.md +9 -2
  864. package/docs/vi/intlayer_with_nestjs.md +2 -12
  865. package/docs/vi/intlayer_with_next-i18next.md +2 -2
  866. package/docs/vi/intlayer_with_next-intl.md +2 -2
  867. package/docs/vi/intlayer_with_nextjs_14.md +12 -6
  868. package/docs/vi/intlayer_with_nextjs_15.md +9 -2
  869. package/docs/vi/intlayer_with_nextjs_16.md +77 -72
  870. package/docs/vi/intlayer_with_nextjs_compiler.md +74 -77
  871. package/docs/vi/intlayer_with_nextjs_no_locale_path.md +12 -6
  872. package/docs/vi/intlayer_with_nextjs_page_router.md +12 -6
  873. package/docs/vi/intlayer_with_nuxt.md +40 -33
  874. package/docs/vi/intlayer_with_react_native+expo.md +9 -2
  875. package/docs/vi/intlayer_with_react_router_v7.md +9 -2
  876. package/docs/vi/intlayer_with_react_router_v7_fs_routes.md +9 -2
  877. package/docs/vi/intlayer_with_storybook.md +9 -2
  878. package/docs/vi/intlayer_with_svelte_kit.md +23 -17
  879. package/docs/vi/intlayer_with_tanstack+solid.md +13 -6
  880. package/docs/vi/intlayer_with_tanstack.md +13 -6
  881. package/docs/vi/intlayer_with_vanilla.md +12 -6
  882. package/docs/vi/intlayer_with_vite+lit.md +13 -6
  883. package/docs/vi/intlayer_with_vite+preact.md +68 -62
  884. package/docs/vi/intlayer_with_vite+react.md +60 -55
  885. package/docs/vi/intlayer_with_vite+react_compiler.md +5 -6
  886. package/docs/vi/intlayer_with_vite+solid.md +53 -47
  887. package/docs/vi/intlayer_with_vite+svelte.md +42 -36
  888. package/docs/vi/intlayer_with_vite+vanilla.md +12 -6
  889. package/docs/vi/intlayer_with_vite+vue.md +60 -54
  890. package/docs/vi/introduction.md +43 -28
  891. package/docs/vi/lsp.md +1 -1
  892. package/docs/zh/cli/build.md +1 -1
  893. package/docs/zh/cli/index.md +1 -1
  894. package/docs/zh/intlayer_with_adonisjs.md +2 -2
  895. package/docs/zh/intlayer_with_analog.md +2 -2
  896. package/docs/zh/intlayer_with_angular_19.md +2 -2
  897. package/docs/zh/intlayer_with_angular_21.md +6 -6
  898. package/docs/zh/intlayer_with_astro.md +2 -2
  899. package/docs/zh/intlayer_with_astro_lit.md +2 -2
  900. package/docs/zh/intlayer_with_astro_preact.md +2 -2
  901. package/docs/zh/intlayer_with_astro_react.md +2 -2
  902. package/docs/zh/intlayer_with_astro_solid.md +2 -2
  903. package/docs/zh/intlayer_with_astro_svelte.md +2 -2
  904. package/docs/zh/intlayer_with_astro_vanilla.md +2 -2
  905. package/docs/zh/intlayer_with_astro_vue.md +2 -2
  906. package/docs/zh/intlayer_with_create_react_app.md +2 -2
  907. package/docs/zh/intlayer_with_express.md +2 -2
  908. package/docs/zh/intlayer_with_fastify.md +2 -2
  909. package/docs/zh/intlayer_with_hono.md +2 -2
  910. package/docs/zh/intlayer_with_lynx+react.md +2 -2
  911. package/docs/zh/intlayer_with_nestjs.md +2 -13
  912. package/docs/zh/intlayer_with_next-i18next.md +2 -2
  913. package/docs/zh/intlayer_with_next-intl.md +2 -2
  914. package/docs/zh/intlayer_with_nextjs_14.md +5 -6
  915. package/docs/zh/intlayer_with_nextjs_15.md +5 -6
  916. package/docs/zh/intlayer_with_nextjs_16.md +5 -6
  917. package/docs/zh/intlayer_with_nextjs_compiler.md +157 -161
  918. package/docs/zh/intlayer_with_nextjs_no_locale_path.md +92 -94
  919. package/docs/zh/intlayer_with_nextjs_page_router.md +5 -6
  920. package/docs/zh/intlayer_with_nuxt.md +33 -33
  921. package/docs/zh/intlayer_with_react_native+expo.md +2 -2
  922. package/docs/zh/intlayer_with_react_router_v7.md +2 -2
  923. package/docs/zh/intlayer_with_react_router_v7_fs_routes.md +2 -2
  924. package/docs/zh/intlayer_with_storybook.md +2 -2
  925. package/docs/zh/intlayer_with_svelte_kit.md +228 -229
  926. package/docs/zh/intlayer_with_tanstack+solid.md +2 -2
  927. package/docs/zh/intlayer_with_tanstack.md +2 -2
  928. package/docs/zh/intlayer_with_vanilla.md +2 -2
  929. package/docs/zh/intlayer_with_vite+lit.md +2 -2
  930. package/docs/zh/intlayer_with_vite+preact.md +102 -104
  931. package/docs/zh/intlayer_with_vite+react.md +53 -55
  932. package/docs/zh/intlayer_with_vite+react_compiler.md +2 -2
  933. package/docs/zh/intlayer_with_vite+solid.md +46 -47
  934. package/docs/zh/intlayer_with_vite+svelte.md +33 -34
  935. package/docs/zh/intlayer_with_vite+vanilla.md +2 -2
  936. package/docs/zh/intlayer_with_vite+vue.md +75 -76
  937. package/docs/zh/introduction.md +43 -28
  938. package/docs/zh/lsp.md +1 -1
  939. package/docs/zh-TW/intlayer_with_angular_21.md +6 -6
  940. package/docs/zh-TW/introduction.md +43 -28
  941. package/package.json +7 -7
  942. package/src/common.ts +1 -1
@@ -107,7 +107,9 @@ Dưới đây là cấu trúc dự án mà chúng ta sẽ tạo:
107
107
  └── ServerComponent.tsx
108
108
  ```
109
109
 
110
- ### Bước 1: Cài đặt các phụ thuộc
110
+ <Steps>
111
+
112
+ <Step number={1} title="Cài đặt các phụ thuộc">
111
113
 
112
114
  Cài đặt các gói cần thiết sử dụng npm:
113
115
 
@@ -125,7 +127,9 @@ yarn add next-intl
125
127
 
126
128
  - **next-intl**: Thư viện quốc tế hóa cốt lõi cho Next.js App Router cung cấp các hook, hàm server và provider client để quản lý bản dịch.
127
129
 
128
- ### Bước 2: Cấu hình dự án của bạn
130
+ </Step>
131
+
132
+ <Step number={2} title="Cấu hình dự án của bạn">
129
133
 
130
134
  Tạo một tệp cấu hình định nghĩa các ngôn ngữ được hỗ trợ và thiết lập cấu hình yêu cầu của next-intl. Tệp này đóng vai trò là nguồn duy nhất cho thiết lập i18n của bạn và đảm bảo an toàn kiểu trong toàn bộ ứng dụng của bạn.
131
135
 
@@ -210,7 +214,9 @@ export const { Link, redirect, usePathname, useRouter, getPathname } =
210
214
  export const proxy = createMiddleware(routingOptions);
211
215
  ```
212
216
 
213
- ### Bước 3: Định nghĩa các route địa phương động
217
+ </Step>
218
+
219
+ <Step number={3} title="Định nghĩa các route địa phương động">
214
220
 
215
221
  Thiết lập định tuyến động cho các locale bằng cách tạo thư mục `[locale]` trong thư mục app của bạn. Điều này cho phép Next.js xử lý định tuyến dựa trên locale, trong đó mỗi locale trở thành một phân đoạn URL (ví dụ: `/en/about`, `/fr/about`).
216
222
 
@@ -298,7 +304,9 @@ export default async function AboutPage({
298
304
  }
299
305
  ```
300
306
 
301
- ### Bước 4: Tạo Các Tệp Dịch Thuật Của Bạn
307
+ </Step>
308
+
309
+ <Step number={4} title="Tạo Các Tệp Dịch Thuật Của Bạn">
302
310
 
303
311
  Tạo các tệp JSON cho từng locale và namespace. Cấu trúc này cho phép bạn tổ chức các bản dịch một cách hợp lý và chỉ tải những gì bạn cần cho mỗi trang.
304
312
 
@@ -340,7 +348,9 @@ Việc tổ chức bản dịch theo namespace (ví dụ: `common.json`, `about.
340
348
  }
341
349
  ```
342
350
 
343
- ### Bước 5: Sử Dụng Bản Dịch Trong Các Trang Của Bạn
351
+ </Step>
352
+
353
+ <Step number={5} title="Sử Dụng Bản Dịch Trong Các Trang Của Bạn">
344
354
 
345
355
  Tạo một component trang tải bản dịch trên server và truyền chúng cho cả component server và client. Điều này đảm bảo bản dịch được tải trước khi render và ngăn chặn hiện tượng nhấp nháy nội dung.
346
356
 
@@ -391,7 +401,9 @@ export default async function AboutPage({
391
401
  }
392
402
  ```
393
403
 
394
- ### Bước 6: Sử dụng bản dịch trong các component phía client
404
+ </Step>
405
+
406
+ <Step number={6} title="Sử dụng bản dịch trong các component phía client">
395
407
 
396
408
  Các component phía client có thể sử dụng các hook `useTranslations` và `useFormatter` để truy cập các bản dịch và các hàm định dạng. Các hook này đọc dữ liệu từ ngữ cảnh `NextIntlClientProvider`.
397
409
 
@@ -427,7 +439,9 @@ const ClientComponent = () => {
427
439
  };
428
440
  ```
429
441
 
430
- ### Bước 7: Sử dụng Bản dịch trong các Server Components
442
+ </Step>
443
+
444
+ <Step number={7} title="Sử dụng Bản dịch trong các Server Components">
431
445
 
432
446
  Các server component không thể sử dụng React hooks, vì vậy chúng nhận các bản dịch và hàm định dạng thông qua props từ các component cha. Cách tiếp cận này giữ cho các server component đồng bộ và cho phép chúng được lồng bên trong các client component.
433
447
 
@@ -459,9 +473,9 @@ const ServerComponent = ({
459
473
 
460
474
  > Trong trang/layout của bạn, sử dụng `getTranslations` và `getFormatter` từ `next-intl/server` để tính trước các bản dịch và định dạng, sau đó truyền chúng dưới dạng props cho các component server.
461
475
 
462
- ---
476
+ </Step>
463
477
 
464
- ### (Tùy chọn) Bước 8: Thay đổi ngôn ngữ nội dung của bạn
478
+ <Step number={8} title="Thay đổi ngôn ngữ nội dung của bạn" isOptional={true}>
465
479
 
466
480
  Để thay đổi ngôn ngữ nội dung với next-intl, hãy render các liên kết nhận biết locale trỏ đến cùng một pathname trong khi chuyển đổi locale. Provider sẽ tự động viết lại URL, vì vậy bạn chỉ cần nhắm mục tiêu đến route hiện tại.
467
481
 
@@ -533,7 +547,9 @@ export default function LocaleSwitcher() {
533
547
  }
534
548
  ```
535
549
 
536
- ### (Tùy chọn) Bước 9: Sử dụng component Link đã được bản địa hóa
550
+ </Step>
551
+
552
+ <Step number={9} title="Sử dụng component Link đã được bản địa hóa" isOptional={true}>
537
553
 
538
554
  `next-intl` cung cấp một gói con `next-intl/navigation` chứa một component link đã được bản địa hóa, tự động áp dụng locale đang hoạt động. Chúng tôi đã trích xuất sẵn cho bạn trong file `@/i18n`, vì vậy bạn có thể sử dụng như sau:
539
555
 
@@ -543,7 +559,9 @@ import { Link } from "@/i18n";
543
559
  return <Link href="/about">t("about.title")</Link>;
544
560
  ```
545
561
 
546
- ### (Tùy chọn) Bước 10: Truy cập locale đang hoạt động bên trong Server Actions
562
+ </Step>
563
+
564
+ <Step number={10} title="Truy cập locale đang hoạt động bên trong Server Actions" isOptional={true}>
547
565
 
548
566
  Server Actions có thể đọc locale hiện tại bằng cách sử dụng `next-intl/server`. Điều này hữu ích cho việc gửi email bản địa hóa hoặc lưu trữ tùy chọn ngôn ngữ cùng với dữ liệu được gửi lên.
549
567
 
@@ -566,7 +584,9 @@ export async function handleContactForm(formData: FormData) {
566
584
 
567
585
  > `getLocale` đọc locale được thiết lập bởi proxy `next-intl`, vì vậy nó hoạt động ở bất kỳ đâu trên server: Route Handlers, Server Actions và edge functions.
568
586
 
569
- ### (Tùy chọn) Bước 11: Quốc tế hóa Metadata của bạn
587
+ </Step>
588
+
589
+ <Step number={11} title="Quốc tế hóa Metadata của bạn" isOptional={true}>
570
590
 
571
591
  Việc dịch nội dung là quan trọng, nhưng mục tiêu chính của quốc tế hóa là làm cho trang web của bạn trở nên dễ thấy hơn với thế giới. I18n là một đòn bẩy tuyệt vời để cải thiện khả năng hiển thị trang web của bạn thông qua SEO đúng cách.
572
592
 
@@ -605,7 +625,9 @@ export async function generateMetadata({
605
625
  // ... Phần còn lại của mã trang
606
626
  ```
607
627
 
608
- ### (Tùy chọn) Bước 12: Quốc tế hóa Sitemap của bạn
628
+ </Step>
629
+
630
+ <Step number={12} title="Quốc tế hóa Sitemap của bạn" isOptional={true}>
609
631
 
610
632
  Tạo một sitemap bao gồm tất cả các phiên bản ngôn ngữ (locale) của các trang của bạn. Điều này giúp các công cụ tìm kiếm khám phá và lập chỉ mục tất cả các phiên bản ngôn ngữ của nội dung của bạn.
611
633
 
@@ -659,7 +681,9 @@ export default function sitemap(): MetadataRoute.Sitemap {
659
681
  }
660
682
  ```
661
683
 
662
- ### (Tùy chọn) Bước 13: Quốc tế hóa tệp robots.txt của bạn
684
+ </Step>
685
+
686
+ <Step number={13} title="Quốc tế hóa tệp robots.txt của bạn" isOptional={true}>
663
687
 
664
688
  Tạo một tệp robots.txt xử lý đúng tất cả các phiên bản ngôn ngữ của các tuyến đường được bảo vệ của bạn. Điều này đảm bảo rằng các công cụ tìm kiếm không lập chỉ mục các trang quản trị hoặc bảng điều khiển bằng bất kỳ ngôn ngữ nào.
665
689
 
@@ -692,7 +716,9 @@ export default function robots(): MetadataRoute.Robots {
692
716
  }
693
717
  ```
694
718
 
695
- ### (Tùy chọn) Bước 14: Thiết lập Proxy cho Định tuyến Locale
719
+ </Step>
720
+
721
+ <Step number={14} title="Thiết lập Proxy cho Định tuyến Locale" isOptional={true}>
696
722
 
697
723
  Tạo một proxy để tự động phát hiện locale ưu tiên của người dùng và chuyển hướng họ đến URL có tiền tố locale phù hợp. next-intl cung cấp một hàm proxy tiện lợi xử lý việc này một cách tự động.
698
724
 
@@ -712,7 +738,9 @@ export const config = {
712
738
  };
713
739
  ```
714
740
 
715
- ### (Tùy chọn) Bước 15: Thiết lập kiểu TypeScript cho Locale
741
+ </Step>
742
+
743
+ <Step number={15} title="Thiết lập kiểu TypeScript cho Locale" isOptional={true}>
716
744
 
717
745
  Thiết lập TypeScript sẽ giúp bạn có tính năng tự động hoàn thành và an toàn kiểu cho các khóa của bạn.
718
746
 
@@ -738,7 +766,9 @@ declare module "next-intl" {
738
766
 
739
767
  Đoạn mã này sẽ sử dụng Module Augmentation để thêm locales và messages vào kiểu AppConfig của next-intl.
740
768
 
741
- ### (Tùy chọn) Bước 15: Tự động hóa bản dịch của bạn bằng Intlayer
769
+ </Step>
770
+
771
+ <Step number={16} title="Tự động hóa bản dịch của bạn bằng Intlayer" isOptional={true}>
742
772
 
743
773
  Intlayer là một thư viện **miễn phí** và **mã nguồn mở** được thiết kế để hỗ trợ quá trình bản địa hóa trong ứng dụng của bạn. Trong khi next-intl xử lý việc tải và quản lý bản dịch, Intlayer giúp tự động hóa quy trình làm việc bản dịch.
744
774
 
@@ -763,3 +793,7 @@ Intlayer sẽ cho phép bạn:
763
793
  Intlayer cung cấp một trình chỉnh sửa trực quan miễn phí để chỉnh sửa nội dung của bạn bằng trình chỉnh sửa trực quan. Tìm hiểu thêm về [chỉnh sửa trực quan bản dịch của bạn](https://github.com/aymericzip/intlayer/blob/main/docs/docs/vi/intlayer_visual_editor.md).
764
794
 
765
795
  Và còn nhiều hơn thế nữa. Để khám phá tất cả các tính năng mà Intlayer cung cấp, vui lòng tham khảo [Lợi ích của tài liệu Intlayer](https://github.com/aymericzip/intlayer/blob/main/docs/docs/vi/interest_of_intlayer.md).
796
+
797
+ </Step>
798
+
799
+ </Steps>
@@ -80,6 +80,7 @@ history:
80
80
  title="演示 CodeSandbox - 如何使用 Intlayer 国际化您的应用"
81
81
  sandbox="allow-forms allow-modals allow-popups allow-presentation allow-same-origin allow-scripts"
82
82
  loading="lazy"
83
+ />
83
84
 
84
85
  > 查看 GitHub 上的[应用模板](https://github.com/aymericzip/next-i18next-template)。
85
86
 
@@ -116,7 +117,9 @@ history:
116
117
  └── ServerComponent.tsx
117
118
  ```
118
119
 
119
- ### 第一步:安装依赖
120
+ <Steps>
121
+
122
+ <Step number={1} title="安装依赖">
120
123
 
121
124
  使用 npm 安装必要的包:
122
125
 
@@ -136,7 +139,9 @@ yarn add i18next react-i18next i18next-resources-to-backend
136
139
  - **react-i18next**:i18next 的 React 绑定,提供如 `useTranslation` 的钩子,适用于客户端组件。
137
140
  - **i18next-resources-to-backend**:一个插件,支持动态加载翻译文件,只加载你需要的命名空间。
138
141
 
139
- ### 第2步:配置您的项目
142
+ </Step>
143
+
144
+ <Step number={2} title="配置您的项目">
140
145
 
141
146
  创建一个配置文件来定义您支持的语言环境、默认语言环境以及用于 URL 本地化的辅助函数。该文件作为您的 i18n 设置的唯一可信来源,并确保整个应用程序中的类型安全。
142
147
 
@@ -189,7 +194,9 @@ export function getCookie(locale: Locale) {
189
194
  }
190
195
  ```
191
196
 
192
- ### 第3步:集中管理翻译命名空间
197
+ </Step>
198
+
199
+ <Step number={3} title="集中管理翻译命名空间">
193
200
 
194
201
  为您的应用程序公开的每个命名空间创建一个单一的可信来源。重用此列表可以保持服务器、客户端和工具代码的同步,并为翻译辅助工具解锁强类型支持。
195
202
 
@@ -199,7 +206,9 @@ export const namespaces = ["common", "about"] as const;
199
206
  export type Namespace = (typeof namespaces)[number];
200
207
  ```
201
208
 
202
- ### 第4步:使用 TypeScript 强类型化翻译键
209
+ </Step>
210
+
211
+ <Step number={4} title="使用 TypeScript 强类型化翻译键">
203
212
 
204
213
  扩展 `i18next` 指向您的规范语言文件(通常是英文)。TypeScript 会推断每个命名空间的有效键,因此对 `t()` 的调用会进行端到端的检查。
205
214
 
@@ -237,7 +246,9 @@ const { t } = useTranslation("about");
237
246
  export type AboutTranslator = TFunction<"about">;
238
247
  ```
239
248
 
240
- ### 第五步:设置服务器端 i18n 初始化
249
+ </Step>
250
+
251
+ <Step number={5} title="设置服务器端 i18n 初始化">
241
252
 
242
253
  创建一个服务器端初始化函数,用于加载服务器组件的翻译。该函数为服务器端渲染创建一个独立的 i18next 实例,确保在渲染之前加载翻译内容。
243
254
 
@@ -292,7 +303,9 @@ export async function initI18next(
292
303
  }
293
304
  ```
294
305
 
295
- ### 第6步:创建客户端i18n提供者
306
+ </Step>
307
+
308
+ <Step number={6} title="创建客户端i18n提供者">
296
309
 
297
310
  创建一个客户端组件提供者,将你的应用包裹在i18next上下文中。该提供者接收从服务器预加载的翻译,防止未翻译内容闪烁(FOUC)并避免重复请求。
298
311
 
@@ -375,7 +388,9 @@ export default function I18nProvider({
375
388
  }
376
389
  ```
377
390
 
378
- ### 第7步:定义动态语言路由
391
+ </Step>
392
+
393
+ <Step number={7} title="定义动态语言路由">
379
394
 
380
395
  通过在你的 app 文件夹中创建一个 `[locale]` 目录来设置语言的动态路由。这允许 Next.js 处理基于语言的路由,其中每个语言成为 URL 的一部分(例如 `/en/about`,`/fr/about`)。
381
396
 
@@ -427,7 +442,9 @@ export default function LocaleLayout({
427
442
  }
428
443
  ```
429
444
 
430
- ### 第8步:创建您的翻译文件
445
+ </Step>
446
+
447
+ <Step number={8} title="创建您的翻译文件">
431
448
 
432
449
  为每个 locale 和命名空间创建 JSON 文件。此结构允许您逻辑地组织翻译,并且只加载每个页面所需的内容。
433
450
 
@@ -520,7 +537,9 @@ export default function LocaleLayout({
520
537
  }
521
538
  ```
522
539
 
523
- ### 第9步:在页面中使用翻译
540
+ </Step>
541
+
542
+ <Step number={9} title="在页面中使用翻译">
524
543
 
525
544
  创建一个页面组件,在服务器端初始化 i18next,并将翻译传递给服务器和客户端组件。这确保了在渲染前加载翻译,防止内容闪烁。
526
545
 
@@ -580,7 +599,9 @@ export default async function AboutPage({
580
599
  }
581
600
  ```
582
601
 
583
- ### 第10步:在客户端组件中使用翻译
602
+ </Step>
603
+
604
+ <Step number={10} title="在客户端组件中使用翻译">
584
605
 
585
606
  客户端组件可以使用 `useTranslation` 钩子来访问翻译。该钩子提供对翻译函数和 i18n 实例的访问,允许你翻译内容并访问语言环境信息。
586
607
 
@@ -631,7 +652,9 @@ const ClientComponent = () => {
631
652
  export default ClientComponent;
632
653
  ```
633
654
 
634
- ### 第11步:在服务器组件中使用翻译
655
+ </Step>
656
+
657
+ <Step number={11} title="在服务器组件中使用翻译">
635
658
 
636
659
  服务器组件不能使用 React hooks,因此它们通过 props 从父组件接收翻译内容。这种方式保持了服务器组件的同步性,并允许它们嵌套在客户端组件内部。
637
660
 
@@ -677,9 +700,9 @@ const ServerComponent = ({ t, locale, count }: ServerComponentProps) => {
677
700
  export default ServerComponent;
678
701
  ```
679
702
 
680
- ---
703
+ </Step>
681
704
 
682
- ### (可选)步骤12:更改内容语言
705
+ <Step number={12} title="更改内容语言" isOptional={true}>
683
706
 
684
707
  在 Next.js 中更改内容语言,推荐的方式是使用带有区域设置前缀的 URL 和 Next.js 的链接。下面的示例从路由中读取当前区域设置,从路径名中剥离它,并为每个可用的区域设置渲染一个链接。
685
708
 
@@ -751,7 +774,9 @@ export default function LocaleSwitcher() {
751
774
  }
752
775
  ```
753
776
 
754
- ### (可选)步骤 13:构建本地化的 Link 组件
777
+ </Step>
778
+
779
+ <Step number={13} title="构建本地化的 Link 组件" isOptional={true}>
755
780
 
756
781
  在整个应用中重用本地化的 URL 可以保持导航的一致性并有利于 SEO。将 `next/link` 包装在一个小的辅助函数中,该函数会为内部路由添加当前激活的 locale 前缀,同时保持外部 URL 不变。
757
782
 
@@ -802,7 +827,9 @@ export default function LocalizedLink({
802
827
 
803
828
  > 提示:由于 `LocalizedLink` 是一个即插即用的替代方案,可以通过交换导入并让组件处理特定语言环境的 URL 来逐步迁移。
804
829
 
805
- ### (可选)步骤 14:在服务器操作中访问当前语言环境
830
+ </Step>
831
+
832
+ <Step number={14} title="在服务器操作中访问当前语言环境" isOptional={true}>
806
833
 
807
834
  服务器操作通常需要当前语言环境来处理邮件、日志记录或第三方集成。将代理设置的语言环境 cookie 与 `Accept-Language` 头部结合使用,作为回退方案。
808
835
 
@@ -840,7 +867,9 @@ export async function stuffFromServer(formData: FormData) {
840
867
 
841
868
  > 由于该辅助工具依赖于 Next.js 的 cookies 和 headers,因此它适用于路由处理程序、服务器操作以及其他仅限服务器的上下文。
842
869
 
843
- ### (可选)步骤 15:国际化您的元数据
870
+ </Step>
871
+
872
+ <Step number={15} title="国际化您的元数据" isOptional={true}>
844
873
 
845
874
  翻译内容很重要,但国际化的主要目标是让您的网站在全球范围内更具可见性。I18n 是通过适当的 SEO 提升网站可见性的强大杠杆。
846
875
 
@@ -907,7 +936,9 @@ export default async function AboutPage() {
907
936
  }
908
937
  ```
909
938
 
910
- ### (可选)步骤16:国际化您的网站地图
939
+ </Step>
940
+
941
+ <Step number={16} title="国际化您的网站地图" isOptional={true}>
911
942
 
912
943
  生成包含所有本地版本页面的网站地图。这有助于搜索引擎发现并索引您内容的所有语言版本。
913
944
 
@@ -961,7 +992,9 @@ export default function sitemap(): MetadataRoute.Sitemap {
961
992
  }
962
993
  ```
963
994
 
964
- ### (可选)步骤17:国际化您的robots.txt
995
+ </Step>
996
+
997
+ <Step number={17} title="国际化您的robots.txt" isOptional={true}>
965
998
 
966
999
  创建一个 robots.txt 文件,正确处理所有受保护路由的所有语言版本。这确保搜索引擎不会索引任何语言的管理员或仪表盘页面。
967
1000
 
@@ -992,7 +1025,9 @@ export default function robots(): MetadataRoute.Robots {
992
1025
  }
993
1026
  ```
994
1027
 
995
- ### (可选)步骤18:设置用于区域路由的中间件
1028
+ </Step>
1029
+
1030
+ <Step number={18} title="设置用于区域路由的中间件" isOptional={true}>
996
1031
 
997
1032
  创建一个代理,自动检测用户的首选语言环境,并将其重定向到相应的带有语言前缀的URL。这可以通过显示用户首选语言的内容来提升用户体验。
998
1033
 
@@ -1081,7 +1116,9 @@ export const config = {
1081
1116
  };
1082
1117
  ```
1083
1118
 
1084
- ### (可选)步骤 19:使用 Intlayer 自动化您的翻译
1119
+ </Step>
1120
+
1121
+ <Step number={19} title="使用 Intlayer 自动化您的翻译" isOptional={true}>
1085
1122
 
1086
1123
  Intlayer 是一个**免费**且**开源**的库,旨在协助您应用中的本地化流程。虽然 i18next 负责翻译的加载和管理,Intlayer 则帮助自动化翻译工作流。
1087
1124
 
@@ -1111,3 +1148,7 @@ Intlayer 允许您:
1111
1148
  Intlayer 提供免费的可视化编辑器,使用可视化编辑器编辑您的内容。了解更多关于[可视化编辑您的翻译](https://github.com/aymericzip/intlayer/blob/main/docs/docs/zh/intlayer_visual_editor.md)。
1112
1149
 
1113
1150
  以及更多功能。要发现 Intlayer 提供的所有功能,请参阅[Intlayer 的优势文档](https://github.com/aymericzip/intlayer/blob/main/docs/docs/zh/interest_of_intlayer.md)。
1151
+
1152
+ </Step>
1153
+
1154
+ </Steps>
@@ -71,6 +71,7 @@ history:
71
71
  title="演示 CodeSandbox - 如何使用 Intlayer 实现应用国际化"
72
72
  sandbox="allow-forms allow-modals allow-popups allow-presentation allow-same-origin allow-scripts"
73
73
  loading="lazy"
74
+ />
74
75
 
75
76
  > 查看 GitHub 上的[应用模板](https://github.com/aymericzip/next-intl-template)。
76
77
 
@@ -106,7 +107,9 @@ history:
106
107
  └── ServerComponent.tsx
107
108
  ```
108
109
 
109
- ### 第一步:安装依赖
110
+ <Steps>
111
+
112
+ <Step number={1} title="安装依赖">
110
113
 
111
114
  使用 npm 安装必要的包:
112
115
 
@@ -124,7 +127,9 @@ yarn add next-intl
124
127
 
125
128
  - **next-intl**:Next.js App Router 的核心国际化库,提供用于管理翻译的 hooks、服务器函数和客户端提供者。
126
129
 
127
- ### 第二步:配置项目
130
+ </Step>
131
+
132
+ <Step number={2} title="配置项目">
128
133
 
129
134
  创建一个配置文件,定义你支持的语言环境并设置 next-intl 的请求配置。该文件作为你的国际化设置的唯一可信来源,并确保整个应用中的类型安全。
130
135
 
@@ -209,7 +214,9 @@ export const { Link, redirect, usePathname, useRouter, getPathname } =
209
214
  export const proxy = createMiddleware(routingOptions);
210
215
  ```
211
216
 
212
- ### 第三步:定义动态语言路由
217
+ </Step>
218
+
219
+ <Step number={3} title="定义动态语言路由">
213
220
 
214
221
  通过在您的应用程序文件夹中创建一个 `[locale]` 目录来设置基于语言环境的动态路由。这允许 Next.js 处理基于语言环境的路由,其中每个语言环境成为 URL 的一部分(例如 `/en/about`,`/fr/about`)。
215
222
 
@@ -298,7 +305,9 @@ export default async function AboutPage({
298
305
  }
299
306
  ```
300
307
 
301
- ### 第4步:创建您的翻译文件
308
+ </Step>
309
+
310
+ <Step number={4} title="创建您的翻译文件">
302
311
 
303
312
  为每个语言环境和命名空间创建 JSON 文件。此结构允许您逻辑性地组织翻译内容,并且只加载每个页面所需的内容。
304
313
 
@@ -340,7 +349,9 @@ export default async function AboutPage({
340
349
  }
341
350
  ```
342
351
 
343
- ### 第5步:在页面中使用翻译
352
+ </Step>
353
+
354
+ <Step number={5} title="在页面中使用翻译">
344
355
 
345
356
  创建一个页面组件,在服务器端加载翻译,并将其传递给服务器和客户端组件。这确保了翻译在渲染之前加载,防止内容闪烁。
346
357
 
@@ -391,7 +402,9 @@ export default async function AboutPage({
391
402
  }
392
403
  ```
393
404
 
394
- ### 第6步:在客户端组件中使用翻译
405
+ </Step>
406
+
407
+ <Step number={6} title="在客户端组件中使用翻译">
395
408
 
396
409
  客户端组件可以使用 `useTranslations` 和 `useFormatter` 钩子来访问翻译和格式化函数。这些钩子从 `NextIntlClientProvider` 上下文中读取数据。
397
410
 
@@ -427,7 +440,9 @@ const ClientComponent = () => {
427
440
  };
428
441
  ```
429
442
 
430
- ### 第7步:在服务器组件中使用翻译
443
+ </Step>
444
+
445
+ <Step number={7} title="在服务器组件中使用翻译">
431
446
 
432
447
  服务器组件不能使用 React 钩子,因此它们通过父组件的 props 接收翻译和格式化函数。这种方法保持服务器组件的同步性,并允许它们嵌套在客户端组件内。
433
448
 
@@ -459,9 +474,9 @@ const ServerComponent = ({
459
474
 
460
475
  > 在你的页面或布局中,使用 `next-intl/server` 中的 `getTranslations` 和 `getFormatter` 预先计算翻译和格式化,然后将它们作为 props 传递给服务器组件。
461
476
 
462
- ---
477
+ </Step>
463
478
 
464
- ### (可选)步骤 8:更改内容语言
479
+ <Step number={8} title="更改内容语言" isOptional={true}>
465
480
 
466
481
  要使用 next-intl 更改内容语言,渲染指向相同路径名但切换语言环境的本地化链接。Provider 会自动重写 URL,因此你只需针对当前路由即可。
467
482
 
@@ -533,7 +548,9 @@ export default function LocaleSwitcher() {
533
548
  }
534
549
  ```
535
550
 
536
- ### (可选)步骤 9:使用本地化的 Link 组件
551
+ </Step>
552
+
553
+ <Step number={9} title="使用本地化的 Link 组件" isOptional={true}>
537
554
 
538
555
  `next-intl` 提供了一个子包 `next-intl/navigation`,其中包含一个自动应用当前活动语言环境的本地化链接组件。我们已经在 `@/i18n` 文件中为你提取好了它,所以你可以这样使用:
539
556
 
@@ -543,7 +560,9 @@ import { Link } from "@/i18n";
543
560
  return <Link href="/about">t("about.title")</Link>;
544
561
  ```
545
562
 
546
- ### (可选)步骤 10:在服务器操作中访问活动语言环境
563
+ </Step>
564
+
565
+ <Step number={10} title="在服务器操作中访问活动语言环境" isOptional={true}>
547
566
 
548
567
  服务器操作可以使用 `next-intl/server` 读取当前语言环境。这对于发送本地化邮件或在提交的数据中存储语言偏好非常有用。
549
568
 
@@ -566,7 +585,9 @@ export async function handleContactForm(formData: FormData) {
566
585
 
567
586
  > `getLocale` 会读取由 `next-intl` 代理设置的 locale,因此它可以在服务器的任何地方使用:路由处理程序、服务器操作和边缘函数。
568
587
 
569
- ### (可选)步骤 11:国际化您的元数据
588
+ </Step>
589
+
590
+ <Step number={11} title="国际化您的元数据" isOptional={true}>
570
591
 
571
592
  翻译内容很重要,但国际化的主要目标是让您的网站对全世界更具可见性。I18n 是通过适当的 SEO 显著提升您网站可见性的强大杠杆。
572
593
 
@@ -605,7 +626,9 @@ export async function generateMetadata({
605
626
  // ... 页面其余代码
606
627
  ```
607
628
 
608
- ### (可选)步骤12:国际化您的网站地图
629
+ </Step>
630
+
631
+ <Step number={12} title="国际化您的网站地图" isOptional={true}>
609
632
 
610
633
  生成包含所有页面本地化版本的站点地图。这有助于搜索引擎发现并索引您内容的所有语言版本。
611
634
 
@@ -659,7 +682,9 @@ export default function sitemap(): MetadataRoute.Sitemap {
659
682
  }
660
683
  ```
661
684
 
662
- ### (可选)步骤 13:国际化您的 robots.txt
685
+ </Step>
686
+
687
+ <Step number={13} title="国际化您的 robots.txt" isOptional={true}>
663
688
 
664
689
  创建一个 robots.txt 文件,正确处理所有受保护路由的所有语言版本。这确保搜索引擎不会索引任何语言的管理员或仪表盘页面。
665
690
 
@@ -692,7 +717,9 @@ export default function robots(): MetadataRoute.Robots {
692
717
  }
693
718
  ```
694
719
 
695
- ### (可选)步骤14:为本地化路由设置代理
720
+ </Step>
721
+
722
+ <Step number={14} title="为本地化路由设置代理" isOptional={true}>
696
723
 
697
724
  创建一个代理,自动检测用户的首选语言环境,并将其重定向到相应的带有语言前缀的 URL。next-intl 提供了一个方便的代理函数,可以自动处理此操作。
698
725
 
@@ -712,7 +739,9 @@ export const config = {
712
739
  };
713
740
  ```
714
741
 
715
- ### (可选)步骤 15:为语言环境设置 TypeScript 类型
742
+ </Step>
743
+
744
+ <Step number={15} title="为语言环境设置 TypeScript 类型" isOptional={true}>
716
745
 
717
746
  设置 TypeScript 将帮助您获得键的自动补全和类型安全。
718
747
 
@@ -738,7 +767,9 @@ declare module "next-intl" {
738
767
 
739
768
  此代码将使用模块增强(Module Augmentation)将 locales 和 messages 添加到 next-intl 的 AppConfig 类型中。
740
769
 
741
- ### (可选)步骤 15:使用 Intlayer 自动化您的翻译工作
770
+ </Step>
771
+
772
+ <Step number={16} title="使用 Intlayer 自动化您的翻译工作" isOptional={true}>
742
773
 
743
774
  Intlayer 是一个 **免费** 和 **开源** 的库,旨在协助您的应用程序的本地化过程。虽然 next-intl 负责翻译的加载和管理,Intlayer 则帮助自动化翻译工作流程。
744
775
 
@@ -763,3 +794,7 @@ Intlayer 允许您:
763
794
  Intlayer 提供免费的可视化编辑器,使用可视化编辑器编辑您的内容。了解更多关于[可视化编辑您的翻译](https://github.com/aymericzip/intlayer/blob/main/docs/docs/zh/intlayer_visual_editor.md)的信息。
764
795
 
765
796
  以及更多功能。要发现 Intlayer 提供的所有功能,请参阅[Intlayer 的优势文档](https://github.com/aymericzip/intlayer/blob/main/docs/docs/zh/interest_of_intlayer.md)。
797
+
798
+ </Step>
799
+
800
+ </Steps>
@@ -19,7 +19,7 @@ const getFile = async (files, docKey, locale = defaultLocale) => {
19
19
  if (!files[docKey]) throw new Error(`File ${docKey} not found`);
20
20
  const file = await files[docKey]?.[locale];
21
21
  if (!file) {
22
- const englishFile = await files[docKey][defaultLocale];
22
+ const englishFile = await files[docKey]?.[defaultLocale];
23
23
  if (!englishFile) throw new Error(`File ${docKey} not found`);
24
24
  return englishFile;
25
25
  }
@@ -1 +1 @@
1
- {"version":3,"file":"common.cjs","names":["Locales"],"sources":["../../src/common.ts"],"sourcesContent":["import { join } from 'node:path';\nimport { getLocalizedUrl } from '@intlayer/core/localization';\nimport { getMarkdownMetadata } from '@intlayer/core/transpiler';\nimport * as Locales from '@intlayer/types/locales';\nimport type { LocalesValues } from '@intlayer/types/module_augmentation';\n\nexport const defaultLocale = Locales.ENGLISH;\n\nexport const GITHUB_URL_PREFIX =\n 'https://github.com/aymericzip/intlayer/blob/main/docs';\nexport const URL_PREFIX = 'https://intlayer.org/';\n\nexport const getKeys = <T extends Record<string, any>>(obj: T): (keyof T)[] =>\n Object.keys(obj) as (keyof T)[];\n\nexport const getFiles = async <\n F extends Record<`./${string}`, Record<LocalesValues, Promise<string>>>,\n>(\n files: F,\n lang: LocalesValues = defaultLocale as LocalesValues\n): Promise<Record<string, string>> => {\n const filesEntries = await Promise.all(\n Object.entries(files)\n .map(([key, value]) => [key, value[lang as LocalesValues]])\n .map(async ([key, value]) => [key, await value])\n );\n const filesResult = Object.fromEntries(filesEntries);\n return filesResult;\n};\n\nexport const getFile = async <\n F extends Record<string, Record<LocalesValues, Promise<string>>>,\n>(\n files: F,\n docKey: keyof F,\n locale: LocalesValues = defaultLocale as LocalesValues\n): Promise<string> => {\n const fileRecord = files[docKey];\n\n if (!fileRecord) {\n throw new Error(`File ${docKey as string} not found`);\n }\n\n const file = await files[docKey]?.[locale];\n\n if (!file) {\n const englishFile = await files[docKey][defaultLocale as LocalesValues];\n\n if (!englishFile) {\n throw new Error(`File ${docKey as string} not found`);\n }\n\n return englishFile;\n }\n\n return file;\n};\n\nexport type FileMetadata = {\n docKey: string;\n url: string;\n relativeUrl: string;\n githubUrl: string;\n title: string;\n slugs: string[];\n description: string;\n keywords: string[];\n updatedAt: string;\n createdAt: string;\n author?: string;\n youtubeVideo?: string;\n applicationTemplate?: string;\n applicationShowcase?: string;\n history?: {\n version: string;\n date: string;\n changes: string;\n }[];\n};\n\nexport const formatMetadata = (\n docKey: string,\n file: string,\n locale: LocalesValues = defaultLocale as LocalesValues\n): FileMetadata => {\n const metadata = getMarkdownMetadata(file);\n\n const slugs = (metadata.slugs ?? []).map(String);\n const keywords = (metadata.keywords ?? []).map(String);\n\n const relativeUrl = join('/', ...slugs);\n\n const slicedDocKey = docKey.slice(1);\n\n return {\n ...metadata,\n docKey,\n slugs,\n keywords,\n githubUrl: `${GITHUB_URL_PREFIX}${slicedDocKey}`.replace(\n '/en/',\n `/${locale}/`\n ),\n relativeUrl: getLocalizedUrl(relativeUrl, locale),\n url: getLocalizedUrl(join(URL_PREFIX, relativeUrl), locale),\n } as FileMetadata;\n};\n\nexport const getFileMetadata = async <\n F extends Record<string, Record<LocalesValues, Promise<string>>>,\n R extends FileMetadata,\n>(\n files: F,\n docKey: keyof F,\n locale: LocalesValues = defaultLocale as LocalesValues\n): Promise<R> => {\n const file = await getFile(files, docKey, locale);\n\n return formatMetadata(docKey as string, file, locale) as R;\n};\n\nexport const getFileMetadataRecord = async <\n F extends Record<string, Record<LocalesValues, Promise<string>>>,\n>(\n files: F,\n locale: LocalesValues = defaultLocale as LocalesValues\n): Promise<Record<keyof F, FileMetadata>> => {\n const results = await Promise.allSettled(\n Object.entries(files).map(async ([key]) => {\n const metadata = await getFileMetadata(files, key as keyof F, locale);\n return [key, metadata] as [string, FileMetadata];\n })\n );\n const filesEntries = results\n .filter(\n (r): r is PromiseFulfilledResult<[string, FileMetadata]> =>\n r.status === 'fulfilled'\n )\n .map((r) => r.value);\n const filesResult = Object.fromEntries(filesEntries);\n return filesResult as Record<keyof F, FileMetadata>;\n};\n\nexport const getFileMetadataBySlug = async <\n F extends Record<string, Record<LocalesValues, Promise<string>>>,\n>(\n files: F,\n slugs: string | string[],\n locale: LocalesValues = defaultLocale as LocalesValues,\n strict = false\n) => {\n const slugsArray = Array.isArray(slugs) ? slugs : [slugs];\n const filesMetadata = await getFileMetadataRecord(\n files,\n defaultLocale as LocalesValues\n );\n\n let fileMetadataArray: FileMetadata[] = Object.values(filesMetadata).filter(\n (fileMetadata) =>\n slugsArray.every((slug) => fileMetadata.slugs?.includes(slug))\n );\n\n if (strict) {\n fileMetadataArray = fileMetadataArray.filter(\n (fileMetadata) => fileMetadata.slugs.length === slugsArray.length\n );\n }\n\n if (locale !== defaultLocale) {\n const localizedFileMetadata = await Promise.all(\n fileMetadataArray.map(\n async (fileMetadata) =>\n await getFileMetadata(files, fileMetadata.docKey, locale)\n )\n );\n\n return localizedFileMetadata;\n }\n\n return fileMetadataArray;\n};\n\nexport const getFileBySlug = async <\n F extends Record<string, Record<LocalesValues, Promise<string>>>,\n>(\n files: F,\n slugs: string | string[],\n locale: LocalesValues = defaultLocale as LocalesValues,\n strict = false\n) => {\n const slugsArray = Array.isArray(slugs) ? slugs : [slugs];\n const filesMetadata = await getFileMetadataRecord(\n files,\n defaultLocale as LocalesValues\n );\n\n let fileMetadataArray = Object.values(filesMetadata).filter((fileMetadata) =>\n slugsArray.every((slug) => fileMetadata.slugs?.includes(slug))\n );\n\n if (strict) {\n fileMetadataArray = fileMetadataArray.filter(\n (fileMetadata) => fileMetadata.slugs.length === slugsArray.length\n );\n }\n\n const fileList = await Promise.all(\n fileMetadataArray.map(async (fileMetadata) => {\n const file = await getFile(files, fileMetadata.docKey, locale);\n return file;\n })\n );\n\n return fileList;\n};\n"],"mappings":"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"}
1
+ {"version":3,"file":"common.cjs","names":["Locales"],"sources":["../../src/common.ts"],"sourcesContent":["import { join } from 'node:path';\nimport { getLocalizedUrl } from '@intlayer/core/localization';\nimport { getMarkdownMetadata } from '@intlayer/core/transpiler';\nimport * as Locales from '@intlayer/types/locales';\nimport type { LocalesValues } from '@intlayer/types/module_augmentation';\n\nexport const defaultLocale = Locales.ENGLISH;\n\nexport const GITHUB_URL_PREFIX =\n 'https://github.com/aymericzip/intlayer/blob/main/docs';\nexport const URL_PREFIX = 'https://intlayer.org/';\n\nexport const getKeys = <T extends Record<string, any>>(obj: T): (keyof T)[] =>\n Object.keys(obj) as (keyof T)[];\n\nexport const getFiles = async <\n F extends Record<`./${string}`, Record<LocalesValues, Promise<string>>>,\n>(\n files: F,\n lang: LocalesValues = defaultLocale as LocalesValues\n): Promise<Record<string, string>> => {\n const filesEntries = await Promise.all(\n Object.entries(files)\n .map(([key, value]) => [key, value[lang as LocalesValues]])\n .map(async ([key, value]) => [key, await value])\n );\n const filesResult = Object.fromEntries(filesEntries);\n return filesResult;\n};\n\nexport const getFile = async <\n F extends Record<string, Record<LocalesValues, Promise<string>>>,\n>(\n files: F,\n docKey: keyof F,\n locale: LocalesValues = defaultLocale as LocalesValues\n): Promise<string> => {\n const fileRecord = files[docKey];\n\n if (!fileRecord) {\n throw new Error(`File ${docKey as string} not found`);\n }\n\n const file = await files[docKey]?.[locale];\n\n if (!file) {\n const englishFile = await files[docKey]?.[defaultLocale as LocalesValues];\n\n if (!englishFile) {\n throw new Error(`File ${docKey as string} not found`);\n }\n\n return englishFile;\n }\n\n return file;\n};\n\nexport type FileMetadata = {\n docKey: string;\n url: string;\n relativeUrl: string;\n githubUrl: string;\n title: string;\n slugs: string[];\n description: string;\n keywords: string[];\n updatedAt: string;\n createdAt: string;\n author?: string;\n youtubeVideo?: string;\n applicationTemplate?: string;\n applicationShowcase?: string;\n history?: {\n version: string;\n date: string;\n changes: string;\n }[];\n};\n\nexport const formatMetadata = (\n docKey: string,\n file: string,\n locale: LocalesValues = defaultLocale as LocalesValues\n): FileMetadata => {\n const metadata = getMarkdownMetadata(file);\n\n const slugs = (metadata.slugs ?? []).map(String);\n const keywords = (metadata.keywords ?? []).map(String);\n\n const relativeUrl = join('/', ...slugs);\n\n const slicedDocKey = docKey.slice(1);\n\n return {\n ...metadata,\n docKey,\n slugs,\n keywords,\n githubUrl: `${GITHUB_URL_PREFIX}${slicedDocKey}`.replace(\n '/en/',\n `/${locale}/`\n ),\n relativeUrl: getLocalizedUrl(relativeUrl, locale),\n url: getLocalizedUrl(join(URL_PREFIX, relativeUrl), locale),\n } as FileMetadata;\n};\n\nexport const getFileMetadata = async <\n F extends Record<string, Record<LocalesValues, Promise<string>>>,\n R extends FileMetadata,\n>(\n files: F,\n docKey: keyof F,\n locale: LocalesValues = defaultLocale as LocalesValues\n): Promise<R> => {\n const file = await getFile(files, docKey, locale);\n\n return formatMetadata(docKey as string, file, locale) as R;\n};\n\nexport const getFileMetadataRecord = async <\n F extends Record<string, Record<LocalesValues, Promise<string>>>,\n>(\n files: F,\n locale: LocalesValues = defaultLocale as LocalesValues\n): Promise<Record<keyof F, FileMetadata>> => {\n const results = await Promise.allSettled(\n Object.entries(files).map(async ([key]) => {\n const metadata = await getFileMetadata(files, key as keyof F, locale);\n return [key, metadata] as [string, FileMetadata];\n })\n );\n const filesEntries = results\n .filter(\n (r): r is PromiseFulfilledResult<[string, FileMetadata]> =>\n r.status === 'fulfilled'\n )\n .map((r) => r.value);\n const filesResult = Object.fromEntries(filesEntries);\n return filesResult as Record<keyof F, FileMetadata>;\n};\n\nexport const getFileMetadataBySlug = async <\n F extends Record<string, Record<LocalesValues, Promise<string>>>,\n>(\n files: F,\n slugs: string | string[],\n locale: LocalesValues = defaultLocale as LocalesValues,\n strict = false\n) => {\n const slugsArray = Array.isArray(slugs) ? slugs : [slugs];\n const filesMetadata = await getFileMetadataRecord(\n files,\n defaultLocale as LocalesValues\n );\n\n let fileMetadataArray: FileMetadata[] = Object.values(filesMetadata).filter(\n (fileMetadata) =>\n slugsArray.every((slug) => fileMetadata.slugs?.includes(slug))\n );\n\n if (strict) {\n fileMetadataArray = fileMetadataArray.filter(\n (fileMetadata) => fileMetadata.slugs.length === slugsArray.length\n );\n }\n\n if (locale !== defaultLocale) {\n const localizedFileMetadata = await Promise.all(\n fileMetadataArray.map(\n async (fileMetadata) =>\n await getFileMetadata(files, fileMetadata.docKey, locale)\n )\n );\n\n return localizedFileMetadata;\n }\n\n return fileMetadataArray;\n};\n\nexport const getFileBySlug = async <\n F extends Record<string, Record<LocalesValues, Promise<string>>>,\n>(\n files: F,\n slugs: string | string[],\n locale: LocalesValues = defaultLocale as LocalesValues,\n strict = false\n) => {\n const slugsArray = Array.isArray(slugs) ? slugs : [slugs];\n const filesMetadata = await getFileMetadataRecord(\n files,\n defaultLocale as LocalesValues\n );\n\n let fileMetadataArray = Object.values(filesMetadata).filter((fileMetadata) =>\n slugsArray.every((slug) => fileMetadata.slugs?.includes(slug))\n );\n\n if (strict) {\n fileMetadataArray = fileMetadataArray.filter(\n (fileMetadata) => fileMetadata.slugs.length === slugsArray.length\n );\n }\n\n const fileList = await Promise.all(\n fileMetadataArray.map(async (fileMetadata) => {\n const file = await getFile(files, fileMetadata.docKey, locale);\n return file;\n })\n );\n\n return fileList;\n};\n"],"mappings":"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"}
@@ -16,7 +16,7 @@ const getFile = async (files, docKey, locale = defaultLocale) => {
16
16
  if (!files[docKey]) throw new Error(`File ${docKey} not found`);
17
17
  const file = await files[docKey]?.[locale];
18
18
  if (!file) {
19
- const englishFile = await files[docKey][defaultLocale];
19
+ const englishFile = await files[docKey]?.[defaultLocale];
20
20
  if (!englishFile) throw new Error(`File ${docKey} not found`);
21
21
  return englishFile;
22
22
  }