@intlayer/docs 6.1.5 → 6.1.6

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 (284) hide show
  1. package/blog/ar/next-i18next_vs_next-intl_vs_intlayer.md +404 -173
  2. package/blog/de/next-i18next_vs_next-intl_vs_intlayer.md +262 -113
  3. package/blog/en/intlayer_with_next-i18next.mdx +431 -0
  4. package/blog/en/intlayer_with_next-intl.mdx +335 -0
  5. package/blog/en/next-i18next_vs_next-intl_vs_intlayer.md +463 -209
  6. package/blog/en-GB/next-i18next_vs_next-intl_vs_intlayer.md +38 -28
  7. package/blog/es/next-i18next_vs_next-intl_vs_intlayer.md +185 -71
  8. package/blog/fr/next-i18next_vs_next-intl_vs_intlayer.md +38 -28
  9. package/blog/it/next-i18next_vs_next-intl_vs_intlayer.md +38 -28
  10. package/blog/ja/next-i18next_vs_next-intl_vs_intlayer.md +38 -28
  11. package/blog/ko/next-i18next_vs_next-intl_vs_intlayer.md +38 -28
  12. package/blog/pt/next-i18next_vs_next-intl_vs_intlayer.md +38 -28
  13. package/blog/ru/next-i18next_vs_next-intl_vs_intlayer.md +36 -28
  14. package/blog/tr/next-i18next_vs_next-intl_vs_intlayer.md +2 -0
  15. package/blog/zh/next-i18next_vs_next-intl_vs_intlayer.md +38 -28
  16. package/dist/cjs/generated/docs.entry.cjs +32 -0
  17. package/dist/cjs/generated/docs.entry.cjs.map +1 -1
  18. package/dist/esm/generated/docs.entry.mjs +32 -0
  19. package/dist/esm/generated/docs.entry.mjs.map +1 -1
  20. package/dist/types/generated/docs.entry.d.ts +2 -0
  21. package/dist/types/generated/docs.entry.d.ts.map +1 -1
  22. package/docs/ar/component_i18n.md +186 -0
  23. package/docs/ar/intlayer_with_angular.md +2 -2
  24. package/docs/ar/intlayer_with_astro.md +246 -0
  25. package/docs/ar/intlayer_with_create_react_app.md +3 -2
  26. package/docs/ar/intlayer_with_express.md +2 -2
  27. package/docs/ar/intlayer_with_nestjs.md +2 -2
  28. package/docs/ar/intlayer_with_nextjs_14.md +2 -2
  29. package/docs/ar/intlayer_with_nextjs_15.md +2 -2
  30. package/docs/ar/intlayer_with_nextjs_page_router.md +2 -2
  31. package/docs/ar/intlayer_with_nuxt.md +2 -2
  32. package/docs/ar/intlayer_with_react_native+expo.md +11 -20
  33. package/docs/ar/intlayer_with_react_router_v7.md +195 -241
  34. package/docs/ar/intlayer_with_tanstack.md +198 -272
  35. package/docs/ar/intlayer_with_vite+preact.md +9 -9
  36. package/docs/ar/intlayer_with_vite+react.md +7 -7
  37. package/docs/ar/intlayer_with_vite+vue.md +9 -9
  38. package/docs/ar/vs_code_extension.md +48 -109
  39. package/docs/de/component_i18n.md +186 -0
  40. package/docs/de/intlayer_with_angular.md +2 -2
  41. package/docs/de/intlayer_with_astro.md +246 -0
  42. package/docs/de/intlayer_with_create_react_app.md +2 -2
  43. package/docs/de/intlayer_with_express.md +2 -2
  44. package/docs/de/intlayer_with_nestjs.md +2 -2
  45. package/docs/de/intlayer_with_nextjs_14.md +2 -2
  46. package/docs/de/intlayer_with_nextjs_15.md +2 -2
  47. package/docs/de/intlayer_with_nextjs_page_router.md +2 -2
  48. package/docs/de/intlayer_with_nuxt.md +2 -2
  49. package/docs/de/intlayer_with_react_native+expo.md +11 -20
  50. package/docs/de/intlayer_with_react_router_v7.md +193 -242
  51. package/docs/de/intlayer_with_tanstack.md +194 -266
  52. package/docs/de/intlayer_with_vite+preact.md +9 -9
  53. package/docs/de/intlayer_with_vite+react.md +9 -9
  54. package/docs/de/intlayer_with_vite+vue.md +11 -11
  55. package/docs/de/packages/vite-intlayer/index.md +3 -3
  56. package/docs/de/vs_code_extension.md +46 -107
  57. package/docs/en/component_i18n.md +186 -0
  58. package/docs/en/how_works_intlayer.md +1 -1
  59. package/docs/en/index.md +1 -1
  60. package/docs/en/intlayer_cli.md +1 -1
  61. package/docs/en/intlayer_with_angular.md +4 -4
  62. package/docs/en/intlayer_with_astro.md +246 -0
  63. package/docs/en/intlayer_with_create_react_app.md +4 -4
  64. package/docs/en/intlayer_with_express.md +3 -3
  65. package/docs/en/intlayer_with_lynx+react.md +1 -1
  66. package/docs/en/intlayer_with_nestjs.md +2 -2
  67. package/docs/en/intlayer_with_nextjs_14.md +31 -5
  68. package/docs/en/intlayer_with_nextjs_15.md +31 -5
  69. package/docs/en/intlayer_with_nextjs_page_router.md +5 -5
  70. package/docs/en/intlayer_with_nuxt.md +4 -4
  71. package/docs/en/intlayer_with_react_native+expo.md +46 -24
  72. package/docs/en/intlayer_with_react_router_v7.md +164 -211
  73. package/docs/en/intlayer_with_tanstack.md +166 -241
  74. package/docs/en/intlayer_with_vite+preact.md +12 -12
  75. package/docs/en/intlayer_with_vite+react.md +12 -12
  76. package/docs/en/intlayer_with_vite+solid.md +2 -2
  77. package/docs/en/intlayer_with_vite+svelte.md +2 -2
  78. package/docs/en/intlayer_with_vite+vue.md +12 -12
  79. package/docs/en/introduction.md +1 -1
  80. package/docs/en/packages/next-intlayer/useDictionary.md +1 -1
  81. package/docs/en/packages/next-intlayer/useIntlayer.md +1 -1
  82. package/docs/en/packages/react-intlayer/useDictionary.md +1 -1
  83. package/docs/en/packages/react-intlayer/useI18n.md +1 -1
  84. package/docs/en/packages/react-intlayer/useIntlayer.md +1 -1
  85. package/docs/en/releases/v6.md +1 -0
  86. package/docs/en/roadmap.md +1 -1
  87. package/docs/en/vs_code_extension.md +24 -114
  88. package/docs/en-GB/component_i18n.md +186 -0
  89. package/docs/en-GB/intlayer_with_angular.md +3 -3
  90. package/docs/en-GB/intlayer_with_astro.md +246 -0
  91. package/docs/en-GB/intlayer_with_create_react_app.md +5 -4
  92. package/docs/en-GB/intlayer_with_express.md +2 -2
  93. package/docs/en-GB/intlayer_with_nestjs.md +2 -2
  94. package/docs/en-GB/intlayer_with_nextjs_14.md +4 -4
  95. package/docs/en-GB/intlayer_with_nextjs_15.md +2 -2
  96. package/docs/en-GB/intlayer_with_nextjs_page_router.md +2 -2
  97. package/docs/en-GB/intlayer_with_nuxt.md +2 -2
  98. package/docs/en-GB/intlayer_with_react_native+expo.md +11 -20
  99. package/docs/en-GB/intlayer_with_react_router_v7.md +171 -220
  100. package/docs/en-GB/intlayer_with_tanstack.md +174 -248
  101. package/docs/en-GB/intlayer_with_vite+preact.md +9 -9
  102. package/docs/en-GB/intlayer_with_vite+react.md +9 -9
  103. package/docs/en-GB/intlayer_with_vite+vue.md +11 -11
  104. package/docs/en-GB/packages/next-intlayer/useIntlayer.md +1 -1
  105. package/docs/en-GB/packages/react-intlayer/useIntlayer.md +1 -1
  106. package/docs/en-GB/vs_code_extension.md +42 -103
  107. package/docs/es/component_i18n.md +182 -0
  108. package/docs/es/intlayer_with_angular.md +2 -2
  109. package/docs/es/intlayer_with_astro.md +246 -0
  110. package/docs/es/intlayer_with_create_react_app.md +3 -2
  111. package/docs/es/intlayer_with_express.md +2 -2
  112. package/docs/es/intlayer_with_nextjs_14.md +2 -2
  113. package/docs/es/intlayer_with_nextjs_15.md +2 -2
  114. package/docs/es/intlayer_with_react_native+expo.md +11 -20
  115. package/docs/es/intlayer_with_react_router_v7.md +188 -232
  116. package/docs/es/intlayer_with_tanstack.md +203 -273
  117. package/docs/es/intlayer_with_vite+preact.md +7 -7
  118. package/docs/es/intlayer_with_vite+react.md +7 -7
  119. package/docs/es/intlayer_with_vite+vue.md +9 -9
  120. package/docs/es/vs_code_extension.md +53 -114
  121. package/docs/fr/component_i18n.md +186 -0
  122. package/docs/fr/intlayer_with_angular.md +2 -2
  123. package/docs/fr/intlayer_with_astro.md +246 -0
  124. package/docs/fr/intlayer_with_create_react_app.md +3 -2
  125. package/docs/fr/intlayer_with_express.md +2 -2
  126. package/docs/fr/intlayer_with_nestjs.md +2 -2
  127. package/docs/fr/intlayer_with_nextjs_14.md +2 -2
  128. package/docs/fr/intlayer_with_react_native+expo.md +11 -20
  129. package/docs/fr/intlayer_with_react_router_v7.md +188 -248
  130. package/docs/fr/intlayer_with_tanstack.md +192 -265
  131. package/docs/fr/intlayer_with_vite+preact.md +7 -7
  132. package/docs/fr/intlayer_with_vite+react.md +7 -7
  133. package/docs/fr/intlayer_with_vite+vue.md +9 -9
  134. package/docs/fr/vs_code_extension.md +50 -111
  135. package/docs/hi/component_i18n.md +186 -0
  136. package/docs/hi/intlayer_cli.md +1 -4
  137. package/docs/hi/intlayer_with_angular.md +2 -2
  138. package/docs/hi/intlayer_with_astro.md +246 -0
  139. package/docs/hi/intlayer_with_create_react_app.md +2 -2
  140. package/docs/hi/intlayer_with_express.md +2 -2
  141. package/docs/hi/intlayer_with_nestjs.md +2 -2
  142. package/docs/hi/intlayer_with_nextjs_14.md +2 -2
  143. package/docs/hi/intlayer_with_nextjs_15.md +2 -2
  144. package/docs/hi/intlayer_with_nextjs_page_router.md +2 -2
  145. package/docs/hi/intlayer_with_nuxt.md +2 -2
  146. package/docs/hi/intlayer_with_react_native+expo.md +11 -20
  147. package/docs/hi/intlayer_with_react_router_v7.md +199 -243
  148. package/docs/hi/intlayer_with_tanstack.md +210 -285
  149. package/docs/hi/intlayer_with_vite+preact.md +9 -9
  150. package/docs/hi/intlayer_with_vite+react.md +9 -9
  151. package/docs/hi/intlayer_with_vite+solid.md +1 -1
  152. package/docs/hi/intlayer_with_vite+vue.md +11 -11
  153. package/docs/hi/vs_code_extension.md +49 -110
  154. package/docs/it/component_i18n.md +186 -0
  155. package/docs/it/intlayer_with_angular.md +2 -2
  156. package/docs/it/intlayer_with_astro.md +246 -0
  157. package/docs/it/intlayer_with_create_react_app.md +3 -2
  158. package/docs/it/intlayer_with_express.md +2 -2
  159. package/docs/it/intlayer_with_nestjs.md +2 -2
  160. package/docs/it/intlayer_with_nextjs_14.md +2 -2
  161. package/docs/it/intlayer_with_nextjs_15.md +2 -2
  162. package/docs/it/intlayer_with_nextjs_page_router.md +2 -2
  163. package/docs/it/intlayer_with_nuxt.md +2 -2
  164. package/docs/it/intlayer_with_react_native+expo.md +11 -21
  165. package/docs/it/intlayer_with_react_router_v7.md +195 -242
  166. package/docs/it/intlayer_with_tanstack.md +203 -267
  167. package/docs/it/intlayer_with_vite+preact.md +9 -9
  168. package/docs/it/intlayer_with_vite+react.md +13 -11
  169. package/docs/it/intlayer_with_vite+vue.md +11 -11
  170. package/docs/it/vs_code_extension.md +50 -111
  171. package/docs/ja/component_i18n.md +186 -0
  172. package/docs/ja/intlayer_with_angular.md +2 -2
  173. package/docs/ja/intlayer_with_astro.md +246 -0
  174. package/docs/ja/intlayer_with_create_react_app.md +3 -2
  175. package/docs/ja/intlayer_with_express.md +2 -2
  176. package/docs/ja/intlayer_with_nestjs.md +2 -2
  177. package/docs/ja/intlayer_with_nextjs_14.md +2 -2
  178. package/docs/ja/intlayer_with_nextjs_15.md +2 -2
  179. package/docs/ja/intlayer_with_nextjs_page_router.md +2 -2
  180. package/docs/ja/intlayer_with_nuxt.md +2 -2
  181. package/docs/ja/intlayer_with_react_native+expo.md +18 -29
  182. package/docs/ja/intlayer_with_react_router_v7.md +204 -250
  183. package/docs/ja/intlayer_with_tanstack.md +218 -286
  184. package/docs/ja/intlayer_with_vite+preact.md +9 -9
  185. package/docs/ja/intlayer_with_vite+react.md +11 -11
  186. package/docs/ja/intlayer_with_vite+vue.md +11 -11
  187. package/docs/ja/vs_code_extension.md +50 -111
  188. package/docs/ko/component_i18n.md +186 -0
  189. package/docs/ko/intlayer_with_angular.md +2 -2
  190. package/docs/ko/intlayer_with_astro.md +246 -0
  191. package/docs/ko/intlayer_with_create_react_app.md +3 -2
  192. package/docs/ko/intlayer_with_express.md +2 -2
  193. package/docs/ko/intlayer_with_nestjs.md +2 -2
  194. package/docs/ko/intlayer_with_nextjs_14.md +2 -2
  195. package/docs/ko/intlayer_with_nextjs_15.md +2 -2
  196. package/docs/ko/intlayer_with_nextjs_page_router.md +2 -2
  197. package/docs/ko/intlayer_with_nuxt.md +2 -2
  198. package/docs/ko/intlayer_with_react_native+expo.md +19 -28
  199. package/docs/ko/intlayer_with_react_router_v7.md +190 -244
  200. package/docs/ko/intlayer_with_tanstack.md +200 -270
  201. package/docs/ko/intlayer_with_vite+preact.md +9 -9
  202. package/docs/ko/intlayer_with_vite+react.md +9 -9
  203. package/docs/ko/intlayer_with_vite+vue.md +11 -11
  204. package/docs/ko/vs_code_extension.md +48 -109
  205. package/docs/pt/component_i18n.md +186 -0
  206. package/docs/pt/intlayer_with_angular.md +2 -2
  207. package/docs/pt/intlayer_with_astro.md +246 -0
  208. package/docs/pt/intlayer_with_create_react_app.md +3 -2
  209. package/docs/pt/intlayer_with_express.md +2 -2
  210. package/docs/pt/intlayer_with_nestjs.md +2 -2
  211. package/docs/pt/intlayer_with_nextjs_14.md +2 -2
  212. package/docs/pt/intlayer_with_nextjs_15.md +2 -2
  213. package/docs/pt/intlayer_with_nextjs_page_router.md +2 -2
  214. package/docs/pt/intlayer_with_nuxt.md +2 -2
  215. package/docs/pt/intlayer_with_react_native+expo.md +11 -20
  216. package/docs/pt/intlayer_with_react_router_v7.md +7 -13
  217. package/docs/pt/intlayer_with_tanstack.md +183 -258
  218. package/docs/pt/intlayer_with_vite+preact.md +9 -9
  219. package/docs/pt/intlayer_with_vite+react.md +9 -9
  220. package/docs/pt/intlayer_with_vite+vue.md +9 -9
  221. package/docs/pt/vs_code_extension.md +46 -107
  222. package/docs/ru/component_i18n.md +186 -0
  223. package/docs/ru/intlayer_with_angular.md +2 -2
  224. package/docs/ru/intlayer_with_astro.md +246 -0
  225. package/docs/ru/intlayer_with_create_react_app.md +3 -2
  226. package/docs/ru/intlayer_with_express.md +2 -2
  227. package/docs/ru/intlayer_with_nestjs.md +2 -2
  228. package/docs/ru/intlayer_with_nextjs_14.md +2 -2
  229. package/docs/ru/intlayer_with_nextjs_15.md +2 -2
  230. package/docs/ru/intlayer_with_nextjs_page_router.md +2 -2
  231. package/docs/ru/intlayer_with_nuxt.md +2 -2
  232. package/docs/ru/intlayer_with_react_native+expo.md +11 -20
  233. package/docs/ru/intlayer_with_react_router_v7.md +192 -238
  234. package/docs/ru/intlayer_with_tanstack.md +197 -269
  235. package/docs/ru/intlayer_with_vite+preact.md +9 -9
  236. package/docs/ru/intlayer_with_vite+react.md +9 -9
  237. package/docs/ru/intlayer_with_vite+vue.md +11 -11
  238. package/docs/ru/vs_code_extension.md +48 -109
  239. package/docs/tr/component_i18n.md +186 -0
  240. package/docs/tr/how_works_intlayer.md +1 -1
  241. package/docs/tr/index.md +1 -1
  242. package/docs/tr/intlayer_cli.md +1 -1
  243. package/docs/tr/intlayer_with_angular.md +4 -4
  244. package/docs/tr/intlayer_with_astro.md +246 -0
  245. package/docs/tr/intlayer_with_create_react_app.md +4 -4
  246. package/docs/tr/intlayer_with_express.md +3 -3
  247. package/docs/tr/intlayer_with_lynx+react.md +1 -1
  248. package/docs/tr/intlayer_with_nestjs.md +2 -2
  249. package/docs/tr/intlayer_with_nextjs_14.md +2 -2
  250. package/docs/tr/intlayer_with_nextjs_15.md +4 -4
  251. package/docs/tr/intlayer_with_nextjs_page_router.md +5 -5
  252. package/docs/tr/intlayer_with_nuxt.md +4 -4
  253. package/docs/tr/intlayer_with_react_native+expo.md +12 -21
  254. package/docs/tr/intlayer_with_react_router_v7.md +222 -267
  255. package/docs/tr/intlayer_with_tanstack.md +400 -303
  256. package/docs/tr/intlayer_with_vite+preact.md +12 -12
  257. package/docs/tr/intlayer_with_vite+react.md +12 -12
  258. package/docs/tr/intlayer_with_vite+solid.md +2 -2
  259. package/docs/tr/intlayer_with_vite+svelte.md +2 -2
  260. package/docs/tr/intlayer_with_vite+vue.md +12 -12
  261. package/docs/tr/introduction.md +1 -1
  262. package/docs/tr/packages/react-intlayer/useDictionary.md +1 -1
  263. package/docs/tr/packages/react-intlayer/useI18n.md +1 -1
  264. package/docs/tr/roadmap.md +1 -1
  265. package/docs/tr/vs_code_extension.md +54 -115
  266. package/docs/zh/component_i18n.md +186 -0
  267. package/docs/zh/intlayer_with_angular.md +2 -2
  268. package/docs/zh/intlayer_with_astro.md +246 -0
  269. package/docs/zh/intlayer_with_create_react_app.md +3 -2
  270. package/docs/zh/intlayer_with_express.md +2 -2
  271. package/docs/zh/intlayer_with_nestjs.md +2 -2
  272. package/docs/zh/intlayer_with_nextjs_14.md +2 -2
  273. package/docs/zh/intlayer_with_nextjs_15.md +2 -2
  274. package/docs/zh/intlayer_with_nextjs_page_router.md +2 -2
  275. package/docs/zh/intlayer_with_nuxt.md +2 -2
  276. package/docs/zh/intlayer_with_react_native+expo.md +19 -28
  277. package/docs/zh/intlayer_with_react_router_v7.md +200 -248
  278. package/docs/zh/intlayer_with_tanstack.md +208 -283
  279. package/docs/zh/intlayer_with_vite+preact.md +9 -9
  280. package/docs/zh/intlayer_with_vite+react.md +9 -9
  281. package/docs/zh/intlayer_with_vite+vue.md +9 -9
  282. package/docs/zh/vs_code_extension.md +51 -105
  283. package/package.json +10 -10
  284. package/src/generated/docs.entry.ts +32 -0
@@ -1,6 +1,6 @@
1
1
  ---
2
2
  createdAt: 2025-09-04
3
- updatedAt: 2025-09-04
3
+ updatedAt: 2025-10-03
4
4
  title: Iniziare con Intlayer in React Router v7
5
5
  description: Scopri come aggiungere l'internazionalizzazione (i18n) alla tua applicazione React Router v7 utilizzando Intlayer. Segui questa guida completa per rendere la tua app multilingue con il routing consapevole della localizzazione.
6
6
  keywords:
@@ -17,11 +17,10 @@ slugs:
17
17
  - environment
18
18
  - vite-and-react
19
19
  - react-router-v7
20
- applicationTemplate: https://github.com/AydinTheFirst/react-router-intlayer
21
- author: AydinTheFirst
20
+ applicationTemplate: https://github.com/aymericzip/intlayer-react-router-v7-template
22
21
  ---
23
22
 
24
- # Iniziare con l'internazionalizzazione (i18n) usando Intlayer e React Router v7
23
+ # Iniziare con l'internazionalizzazione (i18n) con Intlayer e React Router v7
25
24
 
26
25
  Questa guida dimostra come integrare **Intlayer** per un'internazionalizzazione senza soluzione di continuità nei progetti React Router v7 con routing consapevole della localizzazione, supporto TypeScript e pratiche di sviluppo moderne.
27
26
 
@@ -32,7 +31,7 @@ Questa guida dimostra come integrare **Intlayer** per un'internazionalizzazione
32
31
  Con Intlayer, puoi:
33
32
 
34
33
  - **Gestire facilmente le traduzioni** utilizzando dizionari dichiarativi a livello di componente.
35
- - **Localizzare dinamicamente metadati**, rotte e contenuti.
34
+ - **Localizzare dinamicamente i metadata**, le rotte e i contenuti.
36
35
  - **Garantire il supporto TypeScript** con tipi generati automaticamente, migliorando l'autocompletamento e il rilevamento degli errori.
37
36
  - **Beneficiare di funzionalità avanzate**, come il rilevamento e il cambio dinamico della localizzazione.
38
37
  - **Abilitare il routing consapevole della localizzazione** con il sistema di routing basato su configurazione di React Router v7.
@@ -43,7 +42,7 @@ Con Intlayer, puoi:
43
42
 
44
43
  ### Passo 1: Installare le dipendenze
45
44
 
46
- Installa i pacchetti necessari utilizzando il tuo gestore di pacchetti preferito:
45
+ Installa i pacchetti necessari usando il tuo gestore di pacchetti preferito:
47
46
 
48
47
  ```bash packageManager="npm"
49
48
  npm install intlayer react-intlayer
@@ -57,19 +56,17 @@ pnpm add vite-intlayer --save-dev
57
56
 
58
57
  - **intlayer**
59
58
 
60
- - **intlayer**
61
-
62
- Il pacchetto principale che fornisce strumenti di internazionalizzazione per la gestione della configurazione, la traduzione, la [dichiarazione dei contenuti](https://github.com/aymericzip/intlayer/blob/main/docs/docs/it/dictionary/get_started.md), la traspilazione e i [comandi CLI](https://github.com/aymericzip/intlayer/blob/main/docs/docs/it/intlayer_cli.md).
59
+ - **Il pacchetto core** che fornisce strumenti di internazionalizzazione per la gestione della configurazione, la traduzione, la [dichiarazione dei contenuti](https://github.com/aymericzip/intlayer/blob/main/docs/docs/it/dictionary/get_started.md), la traspilazione e i [comandi CLI](https://github.com/aymericzip/intlayer/blob/main/docs/docs/it/intlayer_cli.md).
63
60
 
64
- - **react-intlayer**
61
+ - **react-intlayer**
65
62
  Il pacchetto che integra Intlayer con l'applicazione React. Fornisce provider di contesto e hook per l'internazionalizzazione in React.
66
63
 
67
- - **vite-intlayer**
68
- Include il plugin Vite per integrare Intlayer con il [bundler Vite](https://vite.dev/guide/why.html#why-bundle-for-production), oltre a middleware per rilevare la localizzazione preferita dall'utente, gestire i cookie e gestire il reindirizzamento degli URL.
64
+ - **vite-intlayer**
65
+ Include il plugin Vite per integrare Intlayer con il [bundler Vite](https://vite.dev/guide/why.html#why-bundle-for-production), oltre a middleware per rilevare la locale preferita dall'utente, gestire i cookie e gestire il reindirizzamento degli URL.
69
66
 
70
67
  ### Passo 2: Configurazione del tuo progetto
71
68
 
72
- Crea un file di configurazione per configurare le lingue della tua applicazione:
69
+ Crea un file di configurazione per impostare le lingue della tua applicazione:
73
70
 
74
71
  ```typescript fileName="intlayer.config.ts" codeFormat="typescript"
75
72
  import { type IntlayerConfig, Locales } from "intlayer";
@@ -77,10 +74,7 @@ import { type IntlayerConfig, Locales } from "intlayer";
77
74
  const config: IntlayerConfig = {
78
75
  internationalization: {
79
76
  defaultLocale: Locales.ENGLISH,
80
- locales: [Locales.ENGLISH, Locales.TURKISH],
81
- },
82
- middleware: {
83
- prefixDefault: true, // Prefissa sempre la lingua predefinita negli URL
77
+ locales: [Locales.ENGLISH, Locales.FRENCH, Locales.SPANISH],
84
78
  },
85
79
  };
86
80
 
@@ -91,13 +85,11 @@ export default config;
91
85
  import { Locales } from "intlayer";
92
86
 
93
87
  /** @type {import('intlayer').IntlayerConfig} */
88
+ // Configurazione per l'internazionalizzazione
94
89
  const config = {
95
90
  internationalization: {
96
91
  defaultLocale: Locales.ENGLISH,
97
- locales: [Locales.ENGLISH, Locales.TURKISH],
98
- },
99
- middleware: {
100
- prefixDefault: true,
92
+ locales: [Locales.ENGLISH, Locales.FRENCH, Locales.SPANISH],
101
93
  },
102
94
  };
103
95
 
@@ -112,82 +104,75 @@ const { Locales } = require("intlayer");
112
104
  const config = {
113
105
  internationalization: {
114
106
  defaultLocale: Locales.ENGLISH, // Lingua predefinita
115
- locales: [Locales.ENGLISH, Locales.TURKISH], // Lingue supportate
116
- },
117
- middleware: {
118
- prefixDefault: true, // Prefissa sempre la lingua predefinita negli URL
107
+ locales: [Locales.ENGLISH, Locales.FRENCH, Locales.SPANISH], // Lingue supportate
119
108
  },
120
109
  };
121
110
 
122
111
  module.exports = config;
123
112
  ```
124
113
 
125
- > Attraverso questo file di configurazione, puoi impostare URL localizzati, reindirizzamenti middleware, nomi dei cookie, la posizione e l'estensione delle tue dichiarazioni di contenuto, disabilitare i log di Intlayer nella console e altro ancora. Per un elenco completo dei parametri disponibili, consulta la [documentazione di configurazione](https://github.com/aymericzip/intlayer/blob/main/docs/docs/it/configuration.md).
126
-
127
- ### Passo 3: Configurare le Rotte di React Router v7
128
-
129
- Configura la tua configurazione di routing con rotte consapevoli della localizzazione:
130
-
131
- ```typescript fileName="app/routes.ts" codeFormat="typescript"
132
- import { layout, route, type RouteConfig } from "@react-router/dev/routes";
133
-
134
- export default [
135
- layout("routes/layout.tsx", [
136
- route("/", "routes/page.tsx"), // Pagina radice - reindirizza alla localizzazione
137
- route("/:lang", "routes/[lang]/page.tsx"), // Pagina iniziale localizzata
138
- route("/:lang/about", "routes/[lang]/about/page.tsx"), // Pagina "about" localizzata
139
- ]),
140
- ] satisfies RouteConfig;
141
- ```
114
+ > Attraverso questo file di configurazione, puoi impostare URL localizzati, reindirizzamenti middleware, nomi dei cookie, la posizione e l'estensione delle dichiarazioni di contenuto, disabilitare i log di Intlayer nella console e altro ancora. Per un elenco completo dei parametri disponibili, consulta la [documentazione di configurazione](https://github.com/aymericzip/intlayer/blob/main/docs/docs/it/configuration.md).
142
115
 
143
- ### Passo 4: Integrare Intlayer nella Configurazione di Vite
116
+ ### Passo 3: Integra Intlayer nella tua configurazione Vite
144
117
 
145
118
  Aggiungi il plugin intlayer nella tua configurazione:
146
119
 
147
- ```typescript fileName="vite.config.ts" codeFormat="typescript"
120
+ ```typescript fileName="vite.config.ts"
148
121
  import { reactRouter } from "@react-router/dev/vite";
149
122
  import { defineConfig } from "vite";
150
- import { intlayerMiddlewarePlugin, intlayer } from "vite-intlayer";
123
+ import { intlayer } from "vite-intlayer";
151
124
  import tsconfigPaths from "vite-tsconfig-paths";
152
125
 
153
126
  export default defineConfig({
154
- plugins: [
155
- reactRouter(),
156
- tsconfigPaths(),
157
- intlayer(),
158
- intlayerMiddlewarePlugin(),
159
- ],
127
+ plugins: [reactRouter(), tsconfigPaths(), intlayer()],
160
128
  });
161
129
  ```
162
130
 
163
- > Il plugin Vite `intlayer()` viene utilizzato per integrare Intlayer con Vite. Garantisce la creazione dei file di dichiarazione del contenuto e li monitora in modalità sviluppo. Definisce le variabili d'ambiente di Intlayer all'interno dell'applicazione Vite. Inoltre, fornisce alias per ottimizzare le prestazioni.
131
+ > Il plugin Vite `intlayer()` viene utilizzato per integrare Intlayer con Vite. Garantisce la creazione dei file di dichiarazione dei contenuti e li monitora in modalità sviluppo. Definisce le variabili d'ambiente di Intlayer all'interno dell'applicazione Vite. Inoltre, fornisce alias per ottimizzare le prestazioni.
132
+
133
+ ### Passo 4: Configurare le rotte di React Router v7
164
134
 
165
- ### Passo 5: Creare i Componenti Layout
135
+ Configura la tua configurazione di routing con rotte consapevoli della localizzazione:
136
+
137
+ ```typescript fileName="app/routes.ts"
138
+ import { layout, route, type RouteConfig } from "@react-router/dev/routes";
139
+
140
+ export default [
141
+ layout("routes/layout.tsx", [
142
+ route("/:lang?", "routes/page.tsx"), // Pagina iniziale localizzata
143
+ route("/:lang?/about", "routes/about/page.tsx"), // Pagina "about" localizzata
144
+ ]),
145
+ ] satisfies RouteConfig;
146
+ ```
147
+
148
+ ### Passo 5: Crea i Componenti di Layout
166
149
 
167
150
  Configura il layout principale e i layout specifici per la localizzazione:
168
151
 
169
152
  #### Layout Principale
170
153
 
171
- ```tsx fileName="app/routes/layout.tsx" codeFormat="typescript"
172
- tsx fileName="app/routes/layout.tsx" codeFormat="typescript"
173
- // app/routes/layout.tsx
174
- import { Outlet } from "react-router";
154
+ ```tsx fileName="app/routes/layout.tsx"
175
155
  import { IntlayerProvider } from "react-intlayer";
156
+ import { Outlet } from "react-router";
157
+
158
+ import type { Route } from "./+types/layout";
159
+
160
+ export default function RootLayout({ params }: Route.ComponentProps) {
161
+ const { locale } = params;
176
162
 
177
- export default function RootLayout() {
178
163
  return (
179
- <IntlayerProvider>
164
+ <IntlayerProvider locale={locale}>
180
165
  <Outlet />
181
166
  </IntlayerProvider>
182
167
  );
183
168
  }
184
169
  ```
185
170
 
186
- ### Passo 6: Dichiara il Tuo Contenuto
171
+ ### Passo 6: Dichiarare il Tuo Contenuto
187
172
 
188
173
  Crea e gestisci le tue dichiarazioni di contenuto per memorizzare le traduzioni:
189
174
 
190
- ```tsx fileName="app/routes/[lang]/page.content.ts" contentDeclarationFormat="typescript"
175
+ ```tsx fileName="app/routes/[lang]/page.content.ts"
191
176
  import { t, type Dictionary } from "intlayer";
192
177
 
193
178
  const pageContent = {
@@ -195,19 +180,23 @@ const pageContent = {
195
180
  content: {
196
181
  title: t({
197
182
  en: "Welcome to React Router v7 + Intlayer",
198
- tr: "React Router v7 + Intlayer'a Hoş Geldiniz",
183
+ es: "Bienvenido a React Router v7 + Intlayer",
184
+ fr: "Bienvenue sur React Router v7 + Intlayer",
199
185
  }),
200
186
  description: t({
201
187
  en: "Build multilingual applications with ease using React Router v7 and Intlayer.",
202
- tr: "React Router v7 e Intlayer per creare facilmente applicazioni multilingue.",
188
+ es: "Cree aplicaciones multilingües fácilmente usando React Router v7 y Intlayer.",
189
+ fr: "Créez des applications multilingues facilement avec React Router v7 et Intlayer.",
203
190
  }),
204
191
  aboutLink: t({
205
- en: "Scopri di noi",
206
- tr: "Hakkımızda Öğrenin",
192
+ en: "Learn About Us",
193
+ es: "Aprender Sobre Nosotros",
194
+ fr: "En savoir plus sur nous",
207
195
  }),
208
196
  homeLink: t({
209
197
  en: "Home",
210
- tr: "Ana Sayfa",
198
+ es: "Inicio",
199
+ fr: "Accueil",
211
200
  }),
212
201
  },
213
202
  } satisfies Dictionary;
@@ -215,104 +204,92 @@ const pageContent = {
215
204
  export default pageContent;
216
205
  ```
217
206
 
218
- > Le tue dichiarazioni di contenuto possono essere definite ovunque nella tua applicazione non appena sono incluse nella directory `contentDir` (di default, `./app`). E devono corrispondere all'estensione del file di dichiarazione del contenuto (di default, `.content.{json,ts,tsx,js,jsx,mjs,mjx,cjs,cjx}`).
207
+ > Le tue dichiarazioni di contenuto possono essere definite ovunque nella tua applicazione non appena vengono incluse nella directory `contentDir` (per default, `./app`). E devono corrispondere all'estensione del file di dichiarazione del contenuto (per default, `.content.{json,ts,tsx,js,jsx,mjs,mjx,cjs,cjx}`).
219
208
 
220
209
  > Per maggiori dettagli, consulta la [documentazione sulla dichiarazione del contenuto](https://github.com/aymericzip/intlayer/blob/main/docs/docs/it/dictionary/get_started.md).
221
210
 
222
211
  ### Passo 7: Crea Componenti Consapevoli della Locale
223
212
 
224
- Crea un componente `LocalizedLink` per una navigazione consapevole della localizzazione:
213
+ Crea un componente `LocalizedLink` per una navigazione consapevole della locale:
225
214
 
226
- ```tsx fileName="app/components/localized-link.tsx" codeFormat="typescript"
227
- // app/components/localized-link.tsx
228
- import { getLocalizedUrl } from "intlayer";
229
- import { useLocale } from "react-intlayer";
230
- import React from "react";
231
- import { Link, useLocation } from "react-router";
215
+ ```tsx fileName="app/components/localized-link.tsx"
216
+ import type { FC } from "react";
232
217
 
233
- type RouterLinkProps = React.ComponentProps<typeof Link>;
234
-
235
- export default function LocalizedLink({ to, ...props }: RouterLinkProps) {
236
- const { locale } = useLocale();
237
- const location = useLocation();
218
+ import { getLocalizedUrl, type LocalesValues } from "intlayer";
219
+ import { useLocale } from "react-intlayer";
220
+ import { Link, type LinkProps, type To } from "react-router";
238
221
 
239
- const isExternal = (path: string) =>
240
- /^([a-z][a-z0-9+.-]*:)?\/\//i.test(path) || path.startsWith("mailto:");
222
+ const isExternalLink = (to: string) => /^(https?:)?\/\//.test(to);
241
223
 
224
+ // Funzione per localizzare l'URL in base alla lingua
225
+ export const locacalizeTo = (to: To, locale: LocalesValues): To => {
242
226
  if (typeof to === "string") {
243
- if (to.startsWith("/") && !isExternal(to)) {
244
- return <Link to={getLocalizedUrl(to, locale)} {...props} />;
227
+ if (isExternalLink(to)) {
228
+ return to;
245
229
  }
246
- return <Link to={to} {...props} />;
230
+
231
+ return getLocalizedUrl(to, locale);
247
232
  }
248
233
 
249
- if (to && typeof to === "object") {
250
- const pathname = (to as { pathname?: string }).pathname;
251
- if (pathname && pathname.startsWith("/") && !isExternal(pathname)) {
252
- return (
253
- <Link
254
- to={{ ...to, pathname: getLocalizedUrl(pathname, locale) }}
255
- {...props}
256
- />
257
- );
258
- }
259
- return <Link to={to} {...props} />;
234
+ if (isExternalLink(to.pathname ?? "")) {
235
+ return to;
260
236
  }
261
237
 
262
- return (
263
- <Link
264
- to={getLocalizedUrl(location.pathname + location.search, locale)}
265
- {...props}
266
- />
267
- );
268
- }
269
- ```
238
+ return {
239
+ ...to,
240
+ pathname: getLocalizedUrl(to.pathname ?? "", locale),
241
+ };
242
+ };
270
243
 
271
- ### Passo 8: Utilizza Intlayer nelle Tue Pagine
244
+ // Componente per link localizzati
245
+ export const LocalizedLink: FC<LinkProps> = (props) => {
246
+ const { locale } = useLocale();
272
247
 
273
- Accedi ai tuoi dizionari di contenuti in tutta l'applicazione:
248
+ return <Link {...props} to={locacalizeTo(props.to, locale)} />;
249
+ };
250
+ ```
274
251
 
275
- #### Pagina di Reindirizzamento Root
252
+ Nel caso in cui desideri navigare verso le rotte localizzate, puoi utilizzare l'hook `useLocalizedNavigate`:
276
253
 
277
- ```tsx fileName="app/routes/page.tsx" codeFormat="typescript"
278
- // app/routes/page.tsx
279
- import { useLocale } from "react-intlayer";
280
- import { Navigate } from "react-router";
254
+ ```tsx fileName="app/hooks/useLocalizedNavigate.ts"
255
+ import { useLocale } from "intlayer";
256
+ import { type NavigateOptions, type To, useNavigate } from "react-router";
281
257
 
282
- export default function Page() {
258
+ import { locacalizeTo } from "~/components/localized-link";
259
+
260
+ export const useLocalizedNavigate = () => {
261
+ const navigate = useNavigate();
283
262
  const { locale } = useLocale();
284
263
 
285
- return <Navigate replace to={locale} />;
286
- }
264
+ const localizedNavigate = (to: To, options?: NavigateOptions) => {
265
+ const localedTo = locacalizeTo(to, locale);
266
+
267
+ navigate(localedTo, options);
268
+ };
269
+
270
+ return localizedNavigate;
271
+ };
287
272
  ```
288
273
 
274
+ ### Passo 8: Utilizza Intlayer nelle tue Pagine
275
+
276
+ Accedi ai tuoi dizionari di contenuti in tutta l'applicazione:
277
+
289
278
  #### Pagina Home Localizzata
290
279
 
291
- ```tsx fileName="app/routes/[lang]/page.tsx" codeFormat="typescript"
280
+ ```tsx fileName="app/routes/[lang]/page.tsx"
292
281
  import { useIntlayer } from "react-intlayer";
293
- import LocalizedLink from "~/components/localized-link";
282
+ import { LocalizedLink } from "~/components/localized-link";
294
283
 
295
284
  export default function Page() {
296
- const content = useIntlayer("page");
285
+ const { title, description, aboutLink } = useIntlayer("page");
297
286
 
298
287
  return (
299
- <div style={{ padding: "2rem", textAlign: "center" }}>
300
- <h1>{content.title}</h1>
301
- <p>{content.description}</p>
302
- <nav style={{ marginTop: "2rem" }}>
303
- <LocalizedLink
304
- to="/about"
305
- style={{
306
- display: "inline-block",
307
- padding: "0.5rem 1rem",
308
- backgroundColor: "#007bff",
309
- color: "white",
310
- textDecoration: "none",
311
- borderRadius: "4px",
312
- }}
313
- >
314
- {content.aboutLink}
315
- </LocalizedLink>
288
+ <div>
289
+ <h1>{title}</h1>
290
+ <p>{description}</p>
291
+ <nav>
292
+ <LocalizedLink to="/about">{aboutLink}</LocalizedLink>
316
293
  </nav>
317
294
  </div>
318
295
  );
@@ -321,57 +298,71 @@ export default function Page() {
321
298
 
322
299
  > Per saperne di più sull'hook `useIntlayer`, consulta la [documentazione](https://github.com/aymericzip/intlayer/blob/main/docs/docs/it/packages/react-intlayer/useIntlayer.md).
323
300
 
324
- ### Passo 9: Crea un componente per il selettore di lingua
301
+ ### Passo 9: Crea un Componente per il Selettore di Lingua
325
302
 
326
303
  Crea un componente per permettere agli utenti di cambiare lingua:
327
304
 
328
- ```tsx fileName="app/components/locale-switcher.tsx" codeFormat="typescript"
329
- import { getLocalizedUrl, getLocaleName } from "intlayer";
330
- import { useLocale } from "react-intlayer";
331
- import { useLocation, useNavigate } from "react-router";
305
+ ```tsx fileName="app/components/locale-switcher.tsx"
306
+ import type { FC } from "react";
332
307
 
333
- export default function LocaleSwitcher() {
334
- const { locale, availableLocales, setLocale } = useLocale();
335
- const location = useLocation();
336
- const navigate = useNavigate();
308
+ import {
309
+ getHTMLTextDir,
310
+ getLocaleName,
311
+ getLocalizedUrl,
312
+ getPathWithoutLocale,
313
+ } from "intlayer";
314
+ import { setLocaleCookie, useIntlayer, useLocale } from "react-intlayer";
315
+ import { Link, useLocation } from "react-router";
337
316
 
338
- const handleLocaleChange = (newLocale: string) => {
339
- const localizedUrl = getLocalizedUrl(
340
- location.pathname + location.search,
341
- newLocale
342
- );
343
- setLocale(newLocale);
344
- navigate(localizedUrl);
345
- };
317
+ export const LocaleSwitcher: FC = () => {
318
+ const { localeSwitcherLabel } = useIntlayer("locale-switcher");
319
+ const { pathname } = useLocation();
320
+
321
+ const { availableLocales, locale } = useLocale();
322
+
323
+ const pathWithoutLocale = getPathWithoutLocale(pathname);
346
324
 
347
325
  return (
348
- <div style={{ margin: "1rem 0" }}>
349
- <label htmlFor="locale-select">Scegli la lingua: </label>
350
- <select
351
- id="locale-select"
352
- value={locale}
353
- onChange={(e) => handleLocaleChange(e.target.value)}
354
- style={{ padding: "0.25rem", marginLeft: "0.5rem" }}
355
- >
356
- {availableLocales.map((availableLocale) => (
357
- <option key={availableLocale} value={availableLocale}>
358
- {getLocaleName(availableLocale)}
359
- </option>
360
- ))}
361
- </select>
362
- </div>
326
+ <ol>
327
+ {availableLocales.map((localeItem) => (
328
+ <li key={localeItem}>
329
+ <Link
330
+ aria-current={localeItem === locale ? "page" : undefined}
331
+ aria-label={`${localeSwitcherLabel.value} ${getLocaleName(localeItem)}`}
332
+ onClick={() => setLocaleCookie(localeItem)}
333
+ to={getLocalizedUrl(pathWithoutLocale, localeItem)}
334
+ >
335
+ <span>
336
+ {/* Locale - es. FR */}
337
+ {localeItem}
338
+ </span>
339
+ <span>
340
+ {/* Lingua nella propria Locale - es. Français */}
341
+ {getLocaleName(localeItem, locale)}
342
+ </span>
343
+ <span dir={getHTMLTextDir(localeItem)} lang={localeItem}>
344
+ {/* Lingua nella Locale corrente - es. Francés con la locale corrente impostata su Locales.SPANISH */}
345
+ {getLocaleName(localeItem)}
346
+ </span>
347
+ <span dir="ltr" lang={Locales.ENGLISH}>
348
+ {/* Lingua in inglese - es. French */}
349
+ {getLocaleName(localeItem, Locales.ENGLISH)}
350
+ </span>
351
+ </Link>
352
+ </li>
353
+ ))}
354
+ </ol>
363
355
  );
364
- }
356
+ };
365
357
  ```
366
358
 
367
359
  > Per saperne di più sull'hook `useLocale`, consulta la [documentazione](https://github.com/aymericzip/intlayer/blob/main/docs/docs/it/packages/react-intlayer/useLocale.md).
368
360
 
369
- ### Passo 10: Aggiungere la Gestione degli Attributi HTML (Opzionale)
361
+ ### Passo 10: Aggiungere la gestione degli attributi HTML (Opzionale)
370
362
 
371
363
  Crea un hook per gestire gli attributi lang e dir dell'HTML:
372
364
 
373
- ```tsx fileName="app/hooks/useI18nHTMLAttributes.tsx" codeFormat="typescript"
374
- // app/hooks/useI18nHTMLAttributes.tsx
365
+ ```tsx fileName="app/hooks/useI18nHTMLAttributes.tsx"
375
366
  import { getHTMLTextDir } from "intlayer";
376
367
  import { useEffect } from "react";
377
368
  import { useLocale } from "react-intlayer";
@@ -388,8 +379,7 @@ export const useI18nHTMLAttributes = () => {
388
379
 
389
380
  Quindi usalo nel tuo componente root:
390
381
 
391
- ```tsx fileName="app/root.tsx" codeFormat="typescript"
392
- // app/routes/layout.tsx
382
+ ```tsx fileName="app/routes/layout.tsx"
393
383
  import { Outlet } from "react-router";
394
384
  import { IntlayerProvider } from "react-intlayer";
395
385
 
@@ -406,45 +396,34 @@ export default function RootLayout() {
406
396
  }
407
397
  ```
408
398
 
409
- ### Passo 11: Compila ed Esegui la Tua Applicazione
410
-
411
- Costruisci i dizionari di contenuto e avvia la tua applicazione:
399
+ ### Passo 11: Aggiungere il middleware (Opzionale)
412
400
 
413
- ```bash packageManager="npm"
414
- # Costruisci i dizionari di Intlayer
415
- npm run intlayer:build
401
+ Puoi anche utilizzare `intlayerMiddleware` per aggiungere il routing lato server alla tua applicazione. Questo plugin rileverà automaticamente la lingua corrente basandosi sull'URL e imposterà il cookie della lingua appropriata. Se non viene specificata alcuna lingua, il plugin determinerà la lingua più adatta in base alle preferenze linguistiche del browser dell'utente. Se non viene rilevata alcuna lingua, verrà effettuato un reindirizzamento alla lingua predefinita.
416
402
 
417
- # Avvia il server di sviluppo
418
- npm run dev
419
- ```
403
+ > Nota che per utilizzare `intlayerMiddleware` in produzione, è necessario spostare il pacchetto `vite-intlayer` da `devDependencies` a `dependencies`.
420
404
 
421
- ```bash packageManager="pnpm"
422
- # Costruisci i dizionari di Intlayer
423
- pnpm intlayer:build
405
+ ```typescript {3,7} fileName="vite.config.ts"
406
+ import { defineConfig } from "vite";
407
+ import react from "@vitejs/plugin-react-swc";
408
+ import { intlayer, intlayerMiddleware } from "vite-intlayer";
424
409
 
425
- # Avvia il server di sviluppo
426
- pnpm dev
410
+ // https://vitejs.dev/config/
411
+ export default defineConfig({
412
+ plugins: [react(), intlayer(), intlayerMiddleware()],
413
+ });
427
414
  ```
428
415
 
429
- ```bash packageManager="yarn"
430
- # Costruisci i dizionari di Intlayer
431
- yarn intlayer:build
432
-
433
- # Avvia il server di sviluppo
434
- yarn dev
435
- ```
416
+ ---
436
417
 
437
- ### Passo 12: Configura TypeScript (Opzionale)
418
+ ## Configurare TypeScript
438
419
 
439
- Intlayer utilizza l'augmentazione dei moduli per sfruttare i vantaggi di TypeScript e rendere il tuo codice più robusto.
420
+ Intlayer utilizza l'augmentation dei moduli per sfruttare i vantaggi di TypeScript e rendere il tuo codice più robusto.
440
421
 
441
422
  Assicurati che la tua configurazione di TypeScript includa i tipi generati automaticamente:
442
423
 
443
424
  ```json5 fileName="tsconfig.json"
444
425
  {
445
- compilerOptions: {
446
- // ... le tue configurazioni TypeScript esistenti
447
- },
426
+ // ... le tue configurazioni esistenti
448
427
  include: [
449
428
  // ... i tuoi include esistenti
450
429
  ".intlayer/**/*.ts", // Includi i tipi generati automaticamente
@@ -452,11 +431,13 @@ Assicurati che la tua configurazione di TypeScript includa i tipi generati autom
452
431
  }
453
432
  ```
454
433
 
455
- ### Configurazione Git
434
+ ---
435
+
436
+ ## Configurazione Git
456
437
 
457
- Si consiglia di ignorare i file generati da Intlayer. Questo ti permette di evitare di committarli nel tuo repository Git.
438
+ È consigliato ignorare i file generati da Intlayer. Questo ti permette di evitare di committarli nel tuo repository Git.
458
439
 
459
- Per farlo, puoi aggiungere le seguenti istruzioni al tuo file `.gitignore`:
440
+ Per farlo, puoi aggiungere le seguenti istruzioni nel tuo file `.gitignore`:
460
441
 
461
442
  ```plaintext fileName=".gitignore"
462
443
  # Ignora i file generati da Intlayer
@@ -465,71 +446,43 @@ Per farlo, puoi aggiungere le seguenti istruzioni al tuo file `.gitignore`:
465
446
 
466
447
  ---
467
448
 
468
- ## Distribuzione in Produzione
469
-
470
- Quando distribuisci la tua applicazione:
471
-
472
- 1. **Compila la tua applicazione:**
473
-
474
- ```bash
475
- npm run build
476
- ```
477
-
478
- 2. **Compila i dizionari di Intlayer:**
479
-
480
- ```bash
481
- npm run intlayer:build
482
- ```
483
-
484
- 3. **Sposta `vite-intlayer` nelle dipendenze** se usi il middleware in produzione:
485
- ```bash
486
- npm install vite-intlayer --save
487
- ```
488
-
489
- La tua applicazione supporterà ora:
490
-
491
- - **Struttura URL**: `/en`, `/en/about`, `/tr`, `/tr/about`
492
- - **Rilevamento automatico della lingua** basato sulle preferenze del browser
493
- - **Routing consapevole della lingua** con React Router v7
494
- - **Supporto TypeScript** con tipi generati automaticamente
495
- - **Rendering lato server** con gestione corretta della lingua
496
-
497
449
  ## Estensione VS Code
498
450
 
499
- Per migliorare la tua esperienza di sviluppo con Intlayer, puoi installare la **Estensione ufficiale Intlayer per VS Code**.
451
+ Per migliorare la tua esperienza di sviluppo con Intlayer, puoi installare l'**Estensione ufficiale Intlayer per VS Code**.
500
452
 
501
453
  [Installa dal Marketplace di VS Code](https://marketplace.visualstudio.com/items?itemName=intlayer.intlayer-vs-code-extension)
502
454
 
503
455
  Questa estensione offre:
504
456
 
505
457
  - **Completamento automatico** per le chiavi di traduzione.
506
- - **Rilevamento in tempo reale degli errori** per traduzioni mancanti.
507
- - **Anteprime inline** dei contenuti tradotti.
458
+ - **Rilevamento errori in tempo reale** per traduzioni mancanti.
459
+ - **Anteprime inline** del contenuto tradotto.
508
460
  - **Azioni rapide** per creare e aggiornare facilmente le traduzioni.
509
461
 
510
- Per maggiori dettagli su come utilizzare l'estensione, consulta la [documentazione dell'estensione Intlayer per VS Code](https://intlayer.org/doc/vs-code-extension).
462
+ Per maggiori dettagli su come utilizzare l'estensione, consulta la [documentazione dell'Estensione Intlayer per VS Code](https://intlayer.org/doc/vs-code-extension).
511
463
 
512
464
  ---
513
465
 
514
- ## Vai oltre
466
+ ## Andare Oltre
515
467
 
516
- Per andare oltre, puoi implementare l'[editor visuale](https://github.com/aymericzip/intlayer/blob/main/docs/docs/it/intlayer_visual_editor.md) o esternalizzare i tuoi contenuti utilizzando il [CMS](https://github.com/aymericzip/intlayer/blob/main/docs/docs/it/intlayer_CMS.md).
468
+ Per andare oltre, puoi implementare l[editor visuale](https://github.com/aymericzip/intlayer/blob/main/docs/docs/it/intlayer_visual_editor.md) oppure esternalizzare i tuoi contenuti utilizzando il [CMS](https://github.com/aymericzip/intlayer/blob/main/docs/docs/it/intlayer_CMS.md).
517
469
 
518
470
  ---
519
471
 
520
- ## Riferimenti alla documentazione
472
+ ## Riferimenti alla Documentazione
521
473
 
522
474
  - [Documentazione Intlayer](https://intlayer.org)
523
475
  - [Documentazione React Router v7](https://reactrouter.com/)
524
476
  - [Hook useIntlayer](https://github.com/aymericzip/intlayer/blob/main/docs/docs/it/packages/react-intlayer/useIntlayer.md)
525
- - [useLocale hook](https://github.com/aymericzip/intlayer/blob/main/docs/docs/it/packages/react-intlayer/useLocale.md)
526
- - [Dichiarazione del Contenuto](https://github.com/aymericzip/intlayer/blob/main/docs/docs/it/dictionary/get_started.md)
477
+ - [Hook useLocale](https://github.com/aymericzip/intlayer/blob/main/docs/docs/it/packages/react-intlayer/useLocale.md)
478
+ - [Dichiarazione dei Contenuti](https://github.com/aymericzip/intlayer/blob/main/docs/docs/it/dictionary/get_started.md)
527
479
  - [Configurazione](https://github.com/aymericzip/intlayer/blob/main/docs/docs/it/configuration.md)
528
480
 
529
481
  Questa guida completa fornisce tutto il necessario per integrare Intlayer con React Router v7 per un'applicazione completamente internazionalizzata con routing consapevole della localizzazione e supporto TypeScript.
530
482
 
531
- ## Cronologia della Documentazione
483
+ ## Cronologia della documentazione
532
484
 
533
- | Versione | Data | Modifiche |
534
- | -------- | --------- | ---------------------------- |
535
- | 5.8.2 | 2025-09-4 | Aggiunto per React Router v7 |
485
+ | Versione | Data | Modifiche |
486
+ | -------- | ---------- | ---------------------------- |
487
+ | 6.1.5 | 2025-10-03 | Documentazione aggiornata |
488
+ | 5.8.2 | 2025-09-04 | Aggiunto per React Router v7 |