@intlayer/docs 6.1.6-canary.0 → 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 (242) hide show
  1. package/blog/en/next-i18next_vs_next-intl_vs_intlayer.md +71 -80
  2. package/dist/cjs/generated/docs.entry.cjs +16 -0
  3. package/dist/cjs/generated/docs.entry.cjs.map +1 -1
  4. package/dist/esm/generated/docs.entry.mjs +16 -0
  5. package/dist/esm/generated/docs.entry.mjs.map +1 -1
  6. package/dist/types/generated/docs.entry.d.ts +1 -0
  7. package/dist/types/generated/docs.entry.d.ts.map +1 -1
  8. package/docs/ar/intlayer_with_angular.md +2 -2
  9. package/docs/ar/intlayer_with_astro.md +246 -0
  10. package/docs/ar/intlayer_with_create_react_app.md +3 -2
  11. package/docs/ar/intlayer_with_express.md +2 -2
  12. package/docs/ar/intlayer_with_nestjs.md +2 -2
  13. package/docs/ar/intlayer_with_nextjs_14.md +2 -2
  14. package/docs/ar/intlayer_with_nextjs_15.md +2 -2
  15. package/docs/ar/intlayer_with_nextjs_page_router.md +2 -2
  16. package/docs/ar/intlayer_with_nuxt.md +2 -2
  17. package/docs/ar/intlayer_with_react_native+expo.md +11 -20
  18. package/docs/ar/intlayer_with_react_router_v7.md +195 -241
  19. package/docs/ar/intlayer_with_tanstack.md +198 -272
  20. package/docs/ar/intlayer_with_vite+preact.md +9 -9
  21. package/docs/ar/intlayer_with_vite+react.md +7 -7
  22. package/docs/ar/intlayer_with_vite+vue.md +9 -9
  23. package/docs/de/intlayer_with_angular.md +2 -2
  24. package/docs/de/intlayer_with_astro.md +246 -0
  25. package/docs/de/intlayer_with_create_react_app.md +2 -2
  26. package/docs/de/intlayer_with_express.md +2 -2
  27. package/docs/de/intlayer_with_nestjs.md +2 -2
  28. package/docs/de/intlayer_with_nextjs_14.md +2 -2
  29. package/docs/de/intlayer_with_nextjs_15.md +2 -2
  30. package/docs/de/intlayer_with_nextjs_page_router.md +2 -2
  31. package/docs/de/intlayer_with_nuxt.md +2 -2
  32. package/docs/de/intlayer_with_react_native+expo.md +11 -20
  33. package/docs/de/intlayer_with_react_router_v7.md +193 -242
  34. package/docs/de/intlayer_with_tanstack.md +194 -266
  35. package/docs/de/intlayer_with_vite+preact.md +9 -9
  36. package/docs/de/intlayer_with_vite+react.md +9 -9
  37. package/docs/de/intlayer_with_vite+vue.md +11 -11
  38. package/docs/de/packages/vite-intlayer/index.md +3 -3
  39. package/docs/en/how_works_intlayer.md +1 -1
  40. package/docs/en/index.md +1 -1
  41. package/docs/en/intlayer_cli.md +1 -1
  42. package/docs/en/intlayer_with_angular.md +4 -4
  43. package/docs/en/intlayer_with_astro.md +246 -0
  44. package/docs/en/intlayer_with_create_react_app.md +4 -4
  45. package/docs/en/intlayer_with_express.md +3 -3
  46. package/docs/en/intlayer_with_lynx+react.md +1 -1
  47. package/docs/en/intlayer_with_nestjs.md +2 -2
  48. package/docs/en/intlayer_with_nextjs_14.md +13 -4
  49. package/docs/en/intlayer_with_nextjs_15.md +13 -4
  50. package/docs/en/intlayer_with_nextjs_page_router.md +5 -5
  51. package/docs/en/intlayer_with_nuxt.md +4 -4
  52. package/docs/en/intlayer_with_react_native+expo.md +46 -24
  53. package/docs/en/intlayer_with_react_router_v7.md +164 -211
  54. package/docs/en/intlayer_with_tanstack.md +166 -241
  55. package/docs/en/intlayer_with_vite+preact.md +12 -12
  56. package/docs/en/intlayer_with_vite+react.md +12 -12
  57. package/docs/en/intlayer_with_vite+solid.md +2 -2
  58. package/docs/en/intlayer_with_vite+svelte.md +2 -2
  59. package/docs/en/intlayer_with_vite+vue.md +12 -12
  60. package/docs/en/introduction.md +1 -1
  61. package/docs/en/packages/next-intlayer/useDictionary.md +1 -1
  62. package/docs/en/packages/next-intlayer/useIntlayer.md +1 -1
  63. package/docs/en/packages/react-intlayer/useDictionary.md +1 -1
  64. package/docs/en/packages/react-intlayer/useI18n.md +1 -1
  65. package/docs/en/packages/react-intlayer/useIntlayer.md +1 -1
  66. package/docs/en/releases/v6.md +1 -0
  67. package/docs/en/roadmap.md +1 -1
  68. package/docs/en-GB/intlayer_with_angular.md +3 -3
  69. package/docs/en-GB/intlayer_with_astro.md +246 -0
  70. package/docs/en-GB/intlayer_with_create_react_app.md +5 -4
  71. package/docs/en-GB/intlayer_with_express.md +2 -2
  72. package/docs/en-GB/intlayer_with_nestjs.md +2 -2
  73. package/docs/en-GB/intlayer_with_nextjs_14.md +4 -4
  74. package/docs/en-GB/intlayer_with_nextjs_15.md +2 -2
  75. package/docs/en-GB/intlayer_with_nextjs_page_router.md +2 -2
  76. package/docs/en-GB/intlayer_with_nuxt.md +2 -2
  77. package/docs/en-GB/intlayer_with_react_native+expo.md +11 -20
  78. package/docs/en-GB/intlayer_with_react_router_v7.md +171 -220
  79. package/docs/en-GB/intlayer_with_tanstack.md +174 -248
  80. package/docs/en-GB/intlayer_with_vite+preact.md +9 -9
  81. package/docs/en-GB/intlayer_with_vite+react.md +9 -9
  82. package/docs/en-GB/intlayer_with_vite+vue.md +11 -11
  83. package/docs/en-GB/packages/next-intlayer/useIntlayer.md +1 -1
  84. package/docs/en-GB/packages/react-intlayer/useIntlayer.md +1 -1
  85. package/docs/es/intlayer_with_angular.md +2 -2
  86. package/docs/es/intlayer_with_astro.md +246 -0
  87. package/docs/es/intlayer_with_create_react_app.md +3 -2
  88. package/docs/es/intlayer_with_express.md +2 -2
  89. package/docs/es/intlayer_with_nextjs_14.md +2 -2
  90. package/docs/es/intlayer_with_nextjs_15.md +2 -2
  91. package/docs/es/intlayer_with_react_native+expo.md +11 -20
  92. package/docs/es/intlayer_with_react_router_v7.md +188 -232
  93. package/docs/es/intlayer_with_tanstack.md +203 -273
  94. package/docs/es/intlayer_with_vite+preact.md +7 -7
  95. package/docs/es/intlayer_with_vite+react.md +7 -7
  96. package/docs/es/intlayer_with_vite+vue.md +9 -9
  97. package/docs/fr/intlayer_with_angular.md +2 -2
  98. package/docs/fr/intlayer_with_astro.md +246 -0
  99. package/docs/fr/intlayer_with_create_react_app.md +3 -2
  100. package/docs/fr/intlayer_with_express.md +2 -2
  101. package/docs/fr/intlayer_with_nestjs.md +2 -2
  102. package/docs/fr/intlayer_with_nextjs_14.md +2 -2
  103. package/docs/fr/intlayer_with_react_native+expo.md +11 -20
  104. package/docs/fr/intlayer_with_react_router_v7.md +188 -248
  105. package/docs/fr/intlayer_with_tanstack.md +192 -265
  106. package/docs/fr/intlayer_with_vite+preact.md +7 -7
  107. package/docs/fr/intlayer_with_vite+react.md +7 -7
  108. package/docs/fr/intlayer_with_vite+vue.md +9 -9
  109. package/docs/hi/intlayer_cli.md +1 -4
  110. package/docs/hi/intlayer_with_angular.md +2 -2
  111. package/docs/hi/intlayer_with_astro.md +246 -0
  112. package/docs/hi/intlayer_with_create_react_app.md +2 -2
  113. package/docs/hi/intlayer_with_express.md +2 -2
  114. package/docs/hi/intlayer_with_nestjs.md +2 -2
  115. package/docs/hi/intlayer_with_nextjs_14.md +2 -2
  116. package/docs/hi/intlayer_with_nextjs_15.md +2 -2
  117. package/docs/hi/intlayer_with_nextjs_page_router.md +2 -2
  118. package/docs/hi/intlayer_with_nuxt.md +2 -2
  119. package/docs/hi/intlayer_with_react_native+expo.md +11 -20
  120. package/docs/hi/intlayer_with_react_router_v7.md +199 -243
  121. package/docs/hi/intlayer_with_tanstack.md +210 -285
  122. package/docs/hi/intlayer_with_vite+preact.md +9 -9
  123. package/docs/hi/intlayer_with_vite+react.md +9 -9
  124. package/docs/hi/intlayer_with_vite+solid.md +1 -1
  125. package/docs/hi/intlayer_with_vite+vue.md +11 -11
  126. package/docs/it/intlayer_with_angular.md +2 -2
  127. package/docs/it/intlayer_with_astro.md +246 -0
  128. package/docs/it/intlayer_with_create_react_app.md +3 -2
  129. package/docs/it/intlayer_with_express.md +2 -2
  130. package/docs/it/intlayer_with_nestjs.md +2 -2
  131. package/docs/it/intlayer_with_nextjs_14.md +2 -2
  132. package/docs/it/intlayer_with_nextjs_15.md +2 -2
  133. package/docs/it/intlayer_with_nextjs_page_router.md +2 -2
  134. package/docs/it/intlayer_with_nuxt.md +2 -2
  135. package/docs/it/intlayer_with_react_native+expo.md +11 -21
  136. package/docs/it/intlayer_with_react_router_v7.md +195 -242
  137. package/docs/it/intlayer_with_tanstack.md +203 -267
  138. package/docs/it/intlayer_with_vite+preact.md +9 -9
  139. package/docs/it/intlayer_with_vite+react.md +13 -11
  140. package/docs/it/intlayer_with_vite+vue.md +11 -11
  141. package/docs/ja/intlayer_with_angular.md +2 -2
  142. package/docs/ja/intlayer_with_astro.md +246 -0
  143. package/docs/ja/intlayer_with_create_react_app.md +3 -2
  144. package/docs/ja/intlayer_with_express.md +2 -2
  145. package/docs/ja/intlayer_with_nestjs.md +2 -2
  146. package/docs/ja/intlayer_with_nextjs_14.md +2 -2
  147. package/docs/ja/intlayer_with_nextjs_15.md +2 -2
  148. package/docs/ja/intlayer_with_nextjs_page_router.md +2 -2
  149. package/docs/ja/intlayer_with_nuxt.md +2 -2
  150. package/docs/ja/intlayer_with_react_native+expo.md +18 -29
  151. package/docs/ja/intlayer_with_react_router_v7.md +204 -250
  152. package/docs/ja/intlayer_with_tanstack.md +218 -286
  153. package/docs/ja/intlayer_with_vite+preact.md +9 -9
  154. package/docs/ja/intlayer_with_vite+react.md +11 -11
  155. package/docs/ja/intlayer_with_vite+vue.md +11 -11
  156. package/docs/ko/intlayer_with_angular.md +2 -2
  157. package/docs/ko/intlayer_with_astro.md +246 -0
  158. package/docs/ko/intlayer_with_create_react_app.md +3 -2
  159. package/docs/ko/intlayer_with_express.md +2 -2
  160. package/docs/ko/intlayer_with_nestjs.md +2 -2
  161. package/docs/ko/intlayer_with_nextjs_14.md +2 -2
  162. package/docs/ko/intlayer_with_nextjs_15.md +2 -2
  163. package/docs/ko/intlayer_with_nextjs_page_router.md +2 -2
  164. package/docs/ko/intlayer_with_nuxt.md +2 -2
  165. package/docs/ko/intlayer_with_react_native+expo.md +19 -28
  166. package/docs/ko/intlayer_with_react_router_v7.md +190 -244
  167. package/docs/ko/intlayer_with_tanstack.md +200 -270
  168. package/docs/ko/intlayer_with_vite+preact.md +9 -9
  169. package/docs/ko/intlayer_with_vite+react.md +9 -9
  170. package/docs/ko/intlayer_with_vite+vue.md +11 -11
  171. package/docs/pt/intlayer_with_angular.md +2 -2
  172. package/docs/pt/intlayer_with_astro.md +246 -0
  173. package/docs/pt/intlayer_with_create_react_app.md +3 -2
  174. package/docs/pt/intlayer_with_express.md +2 -2
  175. package/docs/pt/intlayer_with_nestjs.md +2 -2
  176. package/docs/pt/intlayer_with_nextjs_14.md +2 -2
  177. package/docs/pt/intlayer_with_nextjs_15.md +2 -2
  178. package/docs/pt/intlayer_with_nextjs_page_router.md +2 -2
  179. package/docs/pt/intlayer_with_nuxt.md +2 -2
  180. package/docs/pt/intlayer_with_react_native+expo.md +11 -20
  181. package/docs/pt/intlayer_with_react_router_v7.md +7 -13
  182. package/docs/pt/intlayer_with_tanstack.md +183 -258
  183. package/docs/pt/intlayer_with_vite+preact.md +9 -9
  184. package/docs/pt/intlayer_with_vite+react.md +9 -9
  185. package/docs/pt/intlayer_with_vite+vue.md +9 -9
  186. package/docs/ru/intlayer_with_angular.md +2 -2
  187. package/docs/ru/intlayer_with_astro.md +246 -0
  188. package/docs/ru/intlayer_with_create_react_app.md +3 -2
  189. package/docs/ru/intlayer_with_express.md +2 -2
  190. package/docs/ru/intlayer_with_nestjs.md +2 -2
  191. package/docs/ru/intlayer_with_nextjs_14.md +2 -2
  192. package/docs/ru/intlayer_with_nextjs_15.md +2 -2
  193. package/docs/ru/intlayer_with_nextjs_page_router.md +2 -2
  194. package/docs/ru/intlayer_with_nuxt.md +2 -2
  195. package/docs/ru/intlayer_with_react_native+expo.md +11 -20
  196. package/docs/ru/intlayer_with_react_router_v7.md +192 -238
  197. package/docs/ru/intlayer_with_tanstack.md +197 -269
  198. package/docs/ru/intlayer_with_vite+preact.md +9 -9
  199. package/docs/ru/intlayer_with_vite+react.md +9 -9
  200. package/docs/ru/intlayer_with_vite+vue.md +11 -11
  201. package/docs/tr/how_works_intlayer.md +1 -1
  202. package/docs/tr/index.md +1 -1
  203. package/docs/tr/intlayer_cli.md +1 -1
  204. package/docs/tr/intlayer_with_angular.md +4 -4
  205. package/docs/tr/intlayer_with_astro.md +246 -0
  206. package/docs/tr/intlayer_with_create_react_app.md +4 -4
  207. package/docs/tr/intlayer_with_express.md +3 -3
  208. package/docs/tr/intlayer_with_lynx+react.md +1 -1
  209. package/docs/tr/intlayer_with_nestjs.md +2 -2
  210. package/docs/tr/intlayer_with_nextjs_14.md +2 -2
  211. package/docs/tr/intlayer_with_nextjs_15.md +4 -4
  212. package/docs/tr/intlayer_with_nextjs_page_router.md +5 -5
  213. package/docs/tr/intlayer_with_nuxt.md +4 -4
  214. package/docs/tr/intlayer_with_react_native+expo.md +12 -21
  215. package/docs/tr/intlayer_with_react_router_v7.md +222 -267
  216. package/docs/tr/intlayer_with_tanstack.md +400 -303
  217. package/docs/tr/intlayer_with_vite+preact.md +12 -12
  218. package/docs/tr/intlayer_with_vite+react.md +12 -12
  219. package/docs/tr/intlayer_with_vite+solid.md +2 -2
  220. package/docs/tr/intlayer_with_vite+svelte.md +2 -2
  221. package/docs/tr/intlayer_with_vite+vue.md +12 -12
  222. package/docs/tr/introduction.md +1 -1
  223. package/docs/tr/packages/react-intlayer/useDictionary.md +1 -1
  224. package/docs/tr/packages/react-intlayer/useI18n.md +1 -1
  225. package/docs/tr/roadmap.md +1 -1
  226. package/docs/zh/intlayer_with_angular.md +2 -2
  227. package/docs/zh/intlayer_with_astro.md +246 -0
  228. package/docs/zh/intlayer_with_create_react_app.md +3 -2
  229. package/docs/zh/intlayer_with_express.md +2 -2
  230. package/docs/zh/intlayer_with_nestjs.md +2 -2
  231. package/docs/zh/intlayer_with_nextjs_14.md +2 -2
  232. package/docs/zh/intlayer_with_nextjs_15.md +2 -2
  233. package/docs/zh/intlayer_with_nextjs_page_router.md +2 -2
  234. package/docs/zh/intlayer_with_nuxt.md +2 -2
  235. package/docs/zh/intlayer_with_react_native+expo.md +19 -28
  236. package/docs/zh/intlayer_with_react_router_v7.md +200 -248
  237. package/docs/zh/intlayer_with_tanstack.md +208 -283
  238. package/docs/zh/intlayer_with_vite+preact.md +9 -9
  239. package/docs/zh/intlayer_with_vite+react.md +9 -9
  240. package/docs/zh/intlayer_with_vite+vue.md +9 -9
  241. package/package.json +11 -11
  242. package/src/generated/docs.entry.ts +16 -0
@@ -15,13 +15,11 @@ keywords:
15
15
  slugs:
16
16
  - doc
17
17
  - environment
18
- - vite-and-react
19
18
  - tanstack-start
20
- applicationTemplate: https://github.com/AydinTheFirst/tanstack-start-intlayer
21
- author: AydinTheFirst
19
+ applicationTemplate: https://github.com/aymericzip/intlayer-tanstack-start-template
22
20
  ---
23
21
 
24
- # Iniziare con l'internazionalizzazione (i18n) usando Intlayer e Tanstack Start
22
+ # Iniziare con l'internazionalizzazione (i18n) con Intlayer e Tanstack Start
25
23
 
26
24
  Questa guida dimostra come integrare **Intlayer** per un'internazionalizzazione senza soluzione di continuità nei progetti Tanstack Start con routing consapevole della localizzazione, supporto TypeScript e pratiche di sviluppo moderne.
27
25
 
@@ -33,7 +31,7 @@ Con Intlayer, puoi:
33
31
 
34
32
  - **Gestire facilmente le traduzioni** utilizzando dizionari dichiarativi a livello di componente.
35
33
  - **Localizzare dinamicamente i metadata**, le rotte e i contenuti.
36
- - **Garantire il supporto TypeScript** con tipi autogenerati, migliorando l'autocompletamento e il rilevamento degli errori.
34
+ - **Garantire il supporto TypeScript** con tipi generati automaticamente, migliorando l'autocompletamento e il rilevamento degli errori.
37
35
  - **Beneficiare di funzionalità avanzate**, come il rilevamento e il cambio dinamico della localizzazione.
38
36
  - **Abilitare il routing consapevole della localizzazione** con il sistema di routing basato su file di Tanstack Start.
39
37
 
@@ -66,7 +64,7 @@ pnpm add vite-intlayer --save-dev
66
64
  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).
67
65
 
68
66
  - **react-intlayer**
69
- Il pacchetto che integra Intlayer con le applicazioni React. Fornisce provider di contesto e hook per l'internazionalizzazione in React.
67
+ Il pacchetto che integra Intlayer con l'applicazione React. Fornisce provider di contesto e hook per l'internazionalizzazione in React.
70
68
 
71
69
  - **vite-intlayer**
72
70
  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.
@@ -75,7 +73,7 @@ pnpm add vite-intlayer --save-dev
75
73
 
76
74
  Crea un file di configurazione per configurare le lingue della tua applicazione:
77
75
 
78
- ```typescript fileName="intlayer.config.ts" codeFormat="typescript"
76
+ ```typescript fileName="intlayer.config.ts"
79
77
  import type { IntlayerConfig } from "intlayer";
80
78
 
81
79
  import { Locales } from "intlayer";
@@ -83,75 +81,27 @@ import { Locales } from "intlayer";
83
81
  const config: IntlayerConfig = {
84
82
  internationalization: {
85
83
  defaultLocale: Locales.ENGLISH,
86
- locales: [
87
- Locales.ENGLISH,
88
- Locales.FRENCH,
89
- Locales.SPANISH,
90
- // Le tue altre lingue
91
- ],
84
+ locales: [Locales.ENGLISH, Locales.FRENCH, Locales.SPANISH],
92
85
  },
93
86
  };
94
87
 
95
88
  export default config;
96
89
  ```
97
90
 
98
- ```javascript fileName="intlayer.config.mjs" codeFormat="esm"
99
- import { Locales } from "intlayer";
100
-
101
- /** @type {import('intlayer').IntlayerConfig} */
102
- const config = {
103
- internationalization: {
104
- defaultLocale: Locales.ENGLISH,
105
- locales: [
106
- Locales.ENGLISH,
107
- Locales.FRENCH,
108
- Locales.SPANISH,
109
- // Le tue altre lingue
110
- ],
111
- },
112
- };
113
-
114
- export default config;
115
- ```
116
-
117
- ```javascript fileName="intlayer.config.cjs" codeFormat="commonjs"
118
- const { Locales } = require("intlayer");
119
-
120
- /** @type {import('intlayer').IntlayerConfig} */
121
- const config = {
122
- internationalization: {
123
- defaultLocale: Locales.ENGLISH,
124
- locales: [
125
- Locales.ENGLISH,
126
- Locales.FRENCH,
127
- Locales.SPANISH,
128
- // Le tue altre lingue
129
- ],
130
- },
131
- };
132
-
133
- module.exports = config;
134
- ```
135
-
136
- > 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 della configurazione](https://github.com/aymericzip/intlayer/blob/main/docs/docs/it/configuration.md).
91
+ > 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).
137
92
 
138
93
  ### Passo 4: Integra Intlayer nella tua configurazione Vite
139
94
 
140
95
  Aggiungi il plugin intlayer nella tua configurazione:
141
96
 
142
- ```typescript fileName="vite.config.ts" codeFormat="typescript"
97
+ ```typescript fileName="vite.config.ts"
143
98
  import { reactRouter } from "@react-router/dev/vite";
144
99
  import { defineConfig } from "vite";
145
- import { intlayerMiddlewarePlugin, intlayer } from "vite-intlayer";
100
+ import { intlayer } from "vite-intlayer";
146
101
  import tsconfigPaths from "vite-tsconfig-paths";
147
102
 
148
103
  export default defineConfig({
149
- plugins: [
150
- reactRouter(),
151
- tsconfigPaths(),
152
- intlayer(),
153
- intlayerMiddlewarePlugin(),
154
- ],
104
+ plugins: [reactRouter(), tsconfigPaths(), intlayer()],
155
105
  });
156
106
  ```
157
107
 
@@ -159,14 +109,12 @@ export default defineConfig({
159
109
 
160
110
  ### Passo 5: Crea i Componenti di Layout
161
111
 
162
- Configura il tuo layout principale e i layout specifici per locale:
112
+ Configura il layout principale e i layout specifici per locale:
163
113
 
164
114
  #### Layout Principale
165
115
 
166
- ```tsx fileName="src/routes/{-$locale}/route.tsx" codeFormat="typescript"
167
- // src/routes/{-$locale}/route.tsx
116
+ ```tsx fileName="src/routes/{-$locale}/route.tsx"
168
117
  import { createFileRoute, Navigate, Outlet } from "@tanstack/react-router";
169
- import { configuration } from "intlayer";
170
118
  import { IntlayerProvider, useLocale } from "react-intlayer";
171
119
 
172
120
  import { useI18nHTMLAttributes } from "@/hooks/useI18nHTMLAttributes";
@@ -176,21 +124,22 @@ export const Route = createFileRoute("/{-$locale}")({
176
124
  });
177
125
 
178
126
  function LayoutComponent() {
127
+ const { defaultLocale } = useLocale();
179
128
  const { locale } = Route.useParams();
180
129
 
181
130
  return (
182
- <IntlayerProvider locale={locale}>
131
+ <IntlayerProvider locale={defaultLocale}>
183
132
  <Outlet />
184
133
  </IntlayerProvider>
185
134
  );
186
135
  }
187
136
  ```
188
137
 
189
- ### Passo 6: Dichiarare il Tuo Contenuto
138
+ ### Passo 6: Dichiara il Tuo Contenuto
190
139
 
191
140
  Crea e gestisci le tue dichiarazioni di contenuto per memorizzare le traduzioni:
192
141
 
193
- ```tsx fileName="src/contents/page.content.ts" contentDeclarationFormat="typescript"
142
+ ```tsx fileName="src/contents/page.content.ts"
194
143
  import type { Dictionary } from "intlayer";
195
144
 
196
145
  import { t } from "intlayer";
@@ -199,11 +148,13 @@ const appContent = {
199
148
  content: {
200
149
  links: {
201
150
  about: t({
151
+ it: "Informazioni",
202
152
  en: "About",
203
153
  es: "Acerca de",
204
154
  fr: "À propos",
205
155
  }),
206
156
  home: t({
157
+ it: "Home",
207
158
  en: "Home",
208
159
  es: "Inicio",
209
160
  fr: "Accueil",
@@ -211,13 +162,15 @@ const appContent = {
211
162
  },
212
163
  meta: {
213
164
  description: t({
214
- en: "Questo è un esempio di utilizzo di Intlayer con TanStack Router",
165
+ it: "Questo è un esempio di utilizzo di Intlayer con TanStack Router",
166
+ en: "This is an example of using Intlayer with TanStack Router",
215
167
  es: "Este es un ejemplo de uso de Intlayer con TanStack Router",
216
168
  fr: "Ceci est un exemple d'utilisation d'Intlayer avec TanStack Router",
217
169
  }),
218
170
  },
219
171
  title: t({
220
- en: "Benvenuto in Intlayer + TanStack Router",
172
+ it: "Benvenuto in Intlayer + TanStack Router",
173
+ en: "Welcome to Intlayer + TanStack Router",
221
174
  es: "Bienvenido a Intlayer + TanStack Router",
222
175
  fr: "Bienvenue à Intlayer + TanStack Router",
223
176
  }),
@@ -225,97 +178,130 @@ const appContent = {
225
178
  key: "app",
226
179
  } satisfies Dictionary;
227
180
 
181
+ export default appContent;
182
+ fr: "Bienvenue à Intlayer + TanStack Router",
183
+ }),
184
+ },
185
+ key: "app",
186
+ } satisfies Dictionary;
187
+
228
188
  export default appContent;
229
189
  ```
230
190
 
231
- > Le dichiarazioni di contenuto possono essere definite ovunque nella tua applicazione non appena vengono incluse nella directory `contentDir` (per impostazione predefinita, `./app`). E devono corrispondere all'estensione del file di dichiarazione del contenuto (per impostazione predefinita, `.content.{json,ts,tsx,js,jsx,mjs,mjx,cjs,cjx}`).
191
+ > 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}`).
232
192
 
233
193
  > Per maggiori dettagli, consulta la [documentazione sulla dichiarazione del contenuto](https://github.com/aymericzip/intlayer/blob/main/docs/docs/it/dictionary/get_started.md).
234
194
 
235
- ### Passo 7: Crea Componenti e Hook Sensibili alla Localizzazione
195
+ ### Passo 7: Crea Componenti e Hook Consapevoli della Localizzazione
236
196
 
237
- Crea un componente `LocalizedLink` per una navigazione sensibile alla localizzazione:
197
+ Crea un componente `LocalizedLink` per la navigazione consapevole della localizzazione:
238
198
 
239
- ```tsx fileName="src/components/localized-link.tsx" codeFormat="typescript"
240
- // src/components/localized-link.tsx
241
- // eslint-disable-next-line no-restricted-imports
242
- import { Link, type LinkProps } from "@tanstack/react-router";
243
- import { getLocalizedUrl } from "intlayer";
199
+ ```tsx fileName="src/components/localized-link.tsx"
200
+ import type { FC } from "react";
201
+
202
+ import { Link, type LinkComponentProps } from "@tanstack/react-router";
244
203
  import { useLocale } from "react-intlayer";
245
204
 
205
+ export const LOCALE_ROUTE = "{-$locale}" as const;
206
+
207
+ // Utilità principale
208
+ export type RemoveLocaleParam<T> = T extends string
209
+ ? RemoveLocaleFromString<T>
210
+ : T;
211
+
212
+ export type To = RemoveLocaleParam<LinkComponentProps["to"]>;
213
+
214
+ type CollapseDoubleSlashes<S extends string> =
215
+ S extends `${infer H}//${infer T}` ? CollapseDoubleSlashes<`${H}/${T}`> : S;
216
+
246
217
  type LocalizedLinkProps = {
247
- to: string;
248
- } & Omit<LinkProps, "to">;
218
+ to?: To;
219
+ } & Omit<LinkComponentProps, "to">;
249
220
 
250
- export function LocalizedLink(props: LocalizedLinkProps) {
251
- const { locale } = useLocale();
221
+ // Helper
222
+ type RemoveAll<
223
+ S extends string,
224
+ Sub extends string,
225
+ > = S extends `${infer H}${Sub}${infer T}` ? RemoveAll<`${H}${T}`, Sub> : S;
252
226
 
253
- const isExternal = (to: string) => {
254
- return /^(https?:)?\/\//.test(to);
255
- };
227
+ type RemoveLocaleFromString<S extends string> = CollapseDoubleSlashes<
228
+ RemoveAll<S, typeof LOCALE_ROUTE>
229
+ >;
256
230
 
257
- const to = isExternal(props.to)
258
- ? props.to
259
- : getLocalizedUrl(props.to, locale);
231
+ export const LocalizedLink: FC<LocalizedLinkProps> = (props) => {
232
+ const { locale } = useLocale();
260
233
 
261
- return <Link {...props} to={to as LinkProps["to"]} />;
262
- }
234
+ return (
235
+ <Link
236
+ {...props}
237
+ params={{
238
+ locale,
239
+ ...(typeof props?.params === "object" ? props?.params : {}),
240
+ }}
241
+ to={`/${LOCALE_ROUTE}${props.to}` as LinkComponentProps["to"]}
242
+ />
243
+ );
244
+ };
263
245
  ```
264
246
 
265
- Crea un hook `useLocalizedNavigate` per la navigazione programmata:
247
+ Questo componente ha due obiettivi:
266
248
 
267
- ```tsx fileName="src/hooks/useLocalizedNavigate.tsx" codeFormat="typescript"
268
- // src/hooks/useLocalizedNavigate.tsx
269
- // eslint-disable-next-line no-restricted-imports
270
- import { NavigateOptions, useNavigate } from "@tanstack/react-router";
271
- import { getLocalizedUrl } from "intlayer";
272
- import { useLocale } from "react-intlayer";
249
+ - Rimuovere il prefisso `{-$locale}` non necessario dall'URL.
250
+ - Iniettare il parametro locale nell'URL per garantire che l'utente venga reindirizzato direttamente alla rotta localizzata.
251
+
252
+ Successivamente possiamo creare un hook `useLocalizedNavigate` per la navigazione programmatica:
273
253
 
274
- type LocalizedNavigateOptions = {
275
- to: string;
276
- } & Omit<NavigateOptions, "to">;
254
+ ```tsx fileName="src/hooks/useLocalizedNavigate.tsx"
255
+ import { useLocale } from "react-intlayer";
256
+ import { useNavigate } from "@tanstack/react-router";
257
+ import { LOCALE_ROUTE } from "@/components/localized-link";
258
+ import type { FileRouteTypes } from "@/routeTree.gen";
277
259
 
278
260
  export const useLocalizedNavigate = () => {
279
261
  const navigate = useNavigate();
262
+
280
263
  const { locale } = useLocale();
281
264
 
282
- const isExternal = (to: string) => {
283
- return /^(https?:)?\/\//.test(to);
284
- };
265
+ type StripLocalePrefix<T extends string> = T extends
266
+ | `/${typeof LOCALE_ROUTE}`
267
+ | `/${typeof LOCALE_ROUTE}/`
268
+ ? "/"
269
+ : T extends `/${typeof LOCALE_ROUTE}/${infer Rest}`
270
+ ? `/${Rest}`
271
+ : never;
272
+
273
+ type LocalizedTo = StripLocalePrefix<FileRouteTypes["to"]>;
274
+
275
+ interface LocalizedNavigate {
276
+ (to: LocalizedTo): ReturnType<typeof navigate>;
277
+ (
278
+ opts: { to: LocalizedTo } & Record<string, unknown>
279
+ ): ReturnType<typeof navigate>;
280
+ }
281
+
282
+ const localizedNavigate: LocalizedNavigate = (args: any) => {
283
+ if (typeof args === "string") {
284
+ return navigate({ to: `/${LOCALE_ROUTE}${args}`, params: { locale } });
285
+ }
285
286
 
286
- const localizedNavigate = (options: LocalizedNavigateOptions) => {
287
- const to = isExternal(options.to)
288
- ? options.to
289
- : getLocalizedUrl(options.to, locale);
287
+ const { to, ...rest } = args;
290
288
 
291
- navigate({ ...options, to: to as NavigateOptions["to"] });
289
+ const localedTo = `/${LOCALE_ROUTE}${to}` as any;
290
+
291
+ return navigate({ to: localedTo, params: { locale, ...rest } as any });
292
292
  };
293
293
 
294
294
  return localizedNavigate;
295
295
  };
296
296
  ```
297
297
 
298
- ### Passo 8: Utilizzare Intlayer nelle tue Pagine
298
+ ### Passo 8: Utilizza Intlayer nelle tue Pagine
299
299
 
300
300
  Accedi ai tuoi dizionari di contenuti in tutta l'applicazione:
301
301
 
302
- #### Pagina di Reindirizzamento Radice
303
-
304
- ```tsx fileName="src/routes/page.tsx" codeFormat="typescript"
305
- // src/routes/page.tsx
306
- import { useLocale } from "react-intlayer";
307
- import { Navigate } from "react-router";
308
-
309
- export default function Page() {
310
- const { locale } = useLocale();
311
-
312
- return <Navigate replace to={locale} />;
313
- }
314
- ```
315
-
316
302
  #### Pagina Home Localizzata
317
303
 
318
- ```tsx fileName="src/routes/{-$locale}/index.tsx" codeFormat="typescript"
304
+ ```tsx fileName="src/routes/{-$locale}/index.tsx"
319
305
  import { createFileRoute } from "@tanstack/react-router";
320
306
  import { getIntlayer } from "intlayer";
321
307
  import { useIntlayer } from "react-intlayer";
@@ -344,16 +330,15 @@ function RouteComponent() {
344
330
  const navigate = useLocalizedNavigate();
345
331
 
346
332
  return (
347
- <div className="grid place-items-center h-screen">
348
- <div className="flex flex-col gap-4 items-center text-center">
333
+ <div>
334
+ <div>
349
335
  {content.title}
350
336
  <LocaleSwitcher />
351
- <div className="flex gap-4">
352
- <a href="/">Indice</a>
337
+ <div>
353
338
  <LocalizedLink to="/">{content.links.home}</LocalizedLink>
354
339
  <LocalizedLink to="/about">{content.links.about}</LocalizedLink>
355
340
  </div>
356
- <div className="flex gap-4">
341
+ <div>
357
342
  <button onClick={() => navigate({ to: "/" })}>
358
343
  {content.links.home}
359
344
  </button>
@@ -369,61 +354,69 @@ function RouteComponent() {
369
354
 
370
355
  > 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).
371
356
 
372
- ### Passo 9: Crea un componente Locale Switcher
357
+ ### Passo 9: Crea un Componente per il Cambio di Lingua
373
358
 
374
359
  Crea un componente per permettere agli utenti di cambiare lingua:
375
360
 
376
- ```tsx fileName="src/components/locale-switcher.tsx" codeFormat="typescript"
361
+ ```tsx fileName="src/components/locale-switcher.tsx"
362
+ import type { FC } from "react";
363
+
377
364
  import { useLocation } from "@tanstack/react-router";
378
- import {
379
- getHTMLTextDir,
380
- getLocaleName,
381
- getLocalizedUrl,
382
- Locales,
383
- } from "intlayer";
384
- import { useIntlayer, useLocale } from "react-intlayer";
385
-
386
- export default function LocaleSwitcher() {
387
- const { pathname, searchStr } = useLocation();
388
- const content = useIntlayer("locale-switcher");
389
-
390
- const { availableLocales, locale, setLocale } = useLocale({
391
- onLocaleChange: (newLocale) => {
392
- const pathWithLocale = getLocalizedUrl(pathname + searchStr, newLocale);
393
- location.replace(pathWithLocale);
394
- },
395
- });
365
+ import { getHTMLTextDir, getLocaleName, getPathWithoutLocale } from "intlayer";
366
+ import { setLocaleCookie, useIntlayer, useLocale } from "react-intlayer";
367
+
368
+ import { LocalizedLink, To } from "./localized-link";
369
+
370
+ export const LocaleSwitcher: FC = () => {
371
+ const { localeSwitcherLabel } = useIntlayer("locale-switcher");
372
+ const { pathname } = useLocation();
373
+
374
+ const { availableLocales, locale } = useLocale();
375
+
376
+ const pathWithoutLocale = getPathWithoutLocale(pathname);
396
377
 
397
378
  return (
398
- <select
399
- aria-label={content.label.toString()}
400
- onChange={(e) => setLocale(e.target.value)}
401
- value={locale}
402
- >
403
- {availableLocales.map((localeItem) => (
404
- <option
405
- dir={getHTMLTextDir(localeItem)}
406
- key={localeItem}
407
- lang={localeItem}
408
- value={localeItem}
409
- >
410
- {/* Esempio: Français (Francese) */}
411
- {getLocaleName(localeItem, locale)} (
412
- {getLocaleName(localeItem, Locales.ENGLISH)})
413
- </option>
379
+ <ol>
380
+ {availableLocales.map((localeEl) => (
381
+ <li key={localeEl}>
382
+ <LocalizedLink
383
+ aria-current={localeEl === locale ? "page" : undefined}
384
+ aria-label={`${localeSwitcherLabel.value} ${getLocaleName(localeEl)}`}
385
+ onClick={() => setLocaleCookie(localeEl)}
386
+ params={{ locale: localeEl }}
387
+ to={pathWithoutLocale as To}
388
+ >
389
+ <span>
390
+ {/* Lingua - es. FR */}
391
+ {localeItem}
392
+ </span>
393
+ <span>
394
+ {/* Lingua nella sua stessa lingua - es. Français */}
395
+ {getLocaleName(localeItem, locale)}
396
+ </span>
397
+ <span dir={getHTMLTextDir(localeItem)} lang={localeItem}>
398
+ {/* Lingua nella lingua corrente - es. Francés con la lingua corrente impostata su Locales.SPANISH */}
399
+ {getLocaleName(localeItem)}
400
+ </span>
401
+ <span dir="ltr" lang={Locales.ENGLISH}>
402
+ {/* Lingua in inglese - es. French */}
403
+ {getLocaleName(localeItem, Locales.ENGLISH)}
404
+ </span>
405
+ </LocalizedLink>
406
+ </li>
414
407
  ))}
415
- </select>
408
+ </ol>
416
409
  );
417
- }
410
+ };
418
411
  ```
419
412
 
420
- > 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).
413
+ > Per saperne di più sul hook `useLocale`, consulta la [documentazione](https://github.com/aymericzip/intlayer/blob/main/docs/docs/it/packages/react-intlayer/useLocale.md).
421
414
 
422
- ### Passo 10: Aggiungere la Gestione degli Attributi HTML (Opzionale)
415
+ ### Passo 10: Aggiungere la gestione degli attributi HTML (Opzionale)
423
416
 
424
417
  Crea un hook per gestire gli attributi lang e dir dell'HTML:
425
418
 
426
- ```tsx fileName="src/hooks/useI18nHTMLAttributes.tsx" codeFormat="typescript"
419
+ ```tsx fileName="src/hooks/useI18nHTMLAttributes.tsx"
427
420
  // src/hooks/useI18nHTMLAttributes.tsx
428
421
  import { getHTMLTextDir } from "intlayer";
429
422
  import { useEffect } from "react";
@@ -439,11 +432,10 @@ export const useI18nHTMLAttributes = () => {
439
432
  };
440
433
  ```
441
434
 
442
- Quindi usalo nel tuo componente root:
435
+ Poi usalo nel tuo componente root:
443
436
 
444
- ```tsx fileName="src/routes/{-$locale}/index.tsx" codeFormat="typescript"
437
+ ```tsx fileName="src/routes/{-$locale}/index.tsx"
445
438
  import { createFileRoute, Navigate, Outlet } from "@tanstack/react-router";
446
- import { configuration } from "intlayer";
447
439
  import { IntlayerProvider, useLocale } from "react-intlayer";
448
440
 
449
441
  import { useI18nHTMLAttributes } from "@/hooks/useI18nHTMLAttributes"; // importa il hook
@@ -455,55 +447,54 @@ export const Route = createFileRoute("/{-$locale}")({
455
447
  function LayoutComponent() {
456
448
  useI18nHTMLAttributes(); // aggiungi questa riga
457
449
 
450
+ const { defaultLocale } = useLocale();
458
451
  const { locale } = Route.useParams();
459
452
 
460
453
  return (
461
- <IntlayerProvider locale={locale}>
454
+ <IntlayerProvider locale={locale ?? defaultLocale}>
462
455
  <Outlet />
463
456
  </IntlayerProvider>
464
457
  );
465
458
  }
466
459
  ```
467
460
 
468
- ### Passo 11: Compila ed Esegui la Tua Applicazione
461
+ ---
469
462
 
470
- Compila i dizionari di contenuto ed esegui la tua applicazione:
463
+ ### Passo 11: Aggiungere middleware (Opzionale)
471
464
 
472
- ```bash packageManager="npm"
473
- # Compila i dizionari di Intlayer
474
- npm run intlayer:build
465
+ Puoi anche utilizzare `intlayerMiddleware` per aggiungere il routing lato server alla tua applicazione. Questo plugin rileverà automaticamente la locale corrente basandosi sull'URL e imposterà il cookie della locale appropriata. Se non viene specificata alcuna locale, il plugin determinerà la locale più adatta in base alle preferenze linguistiche del browser dell'utente. Se non viene rilevata alcuna locale, verrà effettuato un reindirizzamento alla locale predefinita.
475
466
 
476
- # Avvia il server di sviluppo
477
- npm run dev
478
- ```
467
+ > Nota che per utilizzare `intlayerMiddleware` in produzione, è necessario spostare il pacchetto `vite-intlayer` da `devDependencies` a `dependencies`.
479
468
 
480
- ```bash packageManager="pnpm"
481
- # Compila i dizionari di Intlayer
482
- pnpm intlayer:build
469
+ ```typescript {3,7} fileName="vite.config.ts"
470
+ import { reactRouter } from "@react-router/dev/vite";
471
+ import tailwindcss from "@tailwindcss/vite";
472
+ import { defineConfig } from "vite";
473
+ import { intlayer, intlayerMiddleware } from "vite-intlayer";
474
+ import tsconfigPaths from "vite-tsconfig-paths";
483
475
 
484
- # Avvia il server di sviluppo
485
- pnpm dev
476
+ export default defineConfig({
477
+ plugins: [
478
+ tailwindcss(),
479
+ reactRouter(),
480
+ tsconfigPaths(),
481
+ intlayer(),
482
+ intlayerMiddleware(),
483
+ ],
484
+ });
486
485
  ```
487
486
 
488
- ```bash packageManager="yarn"
489
- # Compila i dizionari di Intlayer
490
- yarn intlayer:build
491
-
492
- # Avvia il server di sviluppo
493
- yarn dev
494
- ```
487
+ ---
495
488
 
496
- ### Passo 12: Configura TypeScript (Opzionale)
489
+ ### Passo 12: Configurare TypeScript (Opzionale)
497
490
 
498
- Intlayer utilizza l'augmentazione dei moduli per sfruttare i vantaggi di TypeScript e rendere il tuo codice più robusto.
491
+ Intlayer utilizza l'augmentation dei moduli per sfruttare i vantaggi di TypeScript e rendere il tuo codice più robusto.
499
492
 
500
493
  Assicurati che la tua configurazione di TypeScript includa i tipi generati automaticamente:
501
494
 
502
495
  ```json5 fileName="tsconfig.json"
503
496
  {
504
- compilerOptions: {
505
- // ... le tue configurazioni TypeScript esistenti
506
- },
497
+ // ... le tue configurazioni esistenti
507
498
  include: [
508
499
  // ... i tuoi include esistenti
509
500
  ".intlayer/**/*.ts", // Includi i tipi generati automaticamente
@@ -511,11 +502,13 @@ Assicurati che la tua configurazione di TypeScript includa i tipi generati autom
511
502
  }
512
503
  ```
513
504
 
505
+ ---
506
+
514
507
  ### Configurazione Git
515
508
 
516
509
  Si consiglia di ignorare i file generati da Intlayer. Questo ti permette di evitare di committarli nel tuo repository Git.
517
510
 
518
- Per farlo, puoi aggiungere le seguenti istruzioni al tuo file `.gitignore`:
511
+ Per fare ciò, puoi aggiungere le seguenti istruzioni al tuo file `.gitignore`:
519
512
 
520
513
  ```plaintext fileName=".gitignore"
521
514
  # Ignora i file generati da Intlayer
@@ -524,67 +517,9 @@ Per farlo, puoi aggiungere le seguenti istruzioni al tuo file `.gitignore`:
524
517
 
525
518
  ---
526
519
 
527
- ### Passo 13: Crea un Reindirizzamento (Opzionale)
528
-
529
- ```typescript fileName="src/routes/{-$locale}/rotue.tsx" codeFormat="typescript"
530
- function LayoutComponent() {
531
- useI18nHTMLAttributes();
532
-
533
- const { locale } = Route.useParams();
534
- const { locale: selectedLocale } = useLocale();
535
- const { defaultLocale } = configuration.internationalization;
536
- const { prefixDefault } = configuration.middleware;
537
-
538
- // Reindirizza alla lingua predefinita se non è presente alcuna lingua nell'URL quando prefixDefault è true
539
- if (selectedLocale === defaultLocale && !locale && prefixDefault) {
540
- return <Navigate replace to={defaultLocale} />;
541
- }
542
-
543
- // Reindirizza alla lingua selezionata se la lingua nell'URL non corrisponde a quella selezionata
544
- if (selectedLocale !== defaultLocale && !locale) {
545
- return <Navigate replace to={selectedLocale} />;
546
- }
547
-
548
- return (
549
- <IntlayerProvider locale={locale}>
550
- <Outlet />
551
- </IntlayerProvider>
552
- );
553
- }
554
- ```
555
-
556
- ## Distribuzione in Produzione
557
-
558
- Quando distribuisci la tua applicazione:
559
-
560
- 1. **Compila la tua applicazione:**
561
-
562
- ```bash
563
- npm run build
564
- ```
565
-
566
- 2. **Compila i dizionari di Intlayer:**
567
-
568
- ```bash
569
- npm run intlayer:build
570
- ```
571
-
572
- 3. **Sposta `vite-intlayer` nelle dipendenze** se usi il middleware in produzione:
573
- ```bash
574
- npm install vite-intlayer --save
575
- ```
576
-
577
- La tua applicazione supporterà ora:
578
-
579
- - **Struttura URL**: `/en`, `/en/about`, `/tr`, `/tr/about`
580
- - **Rilevamento automatico della lingua** basato sulle preferenze del browser
581
- - **Routing consapevole della lingua** con Tanstack Start
582
- - **Supporto TypeScript** con tipi generati automaticamente
583
- - **Rendering lato server** con gestione corretta della lingua
584
-
585
520
  ## Estensione VS Code
586
521
 
587
- Per migliorare la tua esperienza di sviluppo con Intlayer, puoi installare l'**Estensione Intlayer per VS Code** ufficiale.
522
+ Per migliorare la tua esperienza di sviluppo con Intlayer, puoi installare l'**Estensione ufficiale Intlayer per VS Code**.
588
523
 
589
524
  [Installa dal Marketplace di VS Code](https://marketplace.visualstudio.com/items?itemName=intlayer.intlayer-vs-code-extension)
590
525
 
@@ -592,32 +527,33 @@ Questa estensione offre:
592
527
 
593
528
  - **Completamento automatico** per le chiavi di traduzione.
594
529
  - **Rilevamento errori in tempo reale** per traduzioni mancanti.
595
- - **Anteprime inline** dei contenuti tradotti.
530
+ - **Anteprime inline** del contenuto tradotto.
596
531
  - **Azioni rapide** per creare e aggiornare facilmente le traduzioni.
597
532
 
598
- Per maggiori dettagli su come utilizzare l'estensione, consulta la [documentazione dell'Estensione Intlayer per VS Code](https://intlayer.org/doc/vs-code-extension).
533
+ Per maggiori dettagli su come utilizzare l'estensione, consulta la [documentazione dell'estensione Intlayer per VS Code](https://intlayer.org/doc/vs-code-extension).
599
534
 
600
535
  ---
601
536
 
602
537
  ## Vai oltre
603
538
 
604
- 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).
539
+ 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).
605
540
 
606
541
  ---
607
542
 
608
- ## Riferimenti alla Documentazione
543
+ ## Riferimenti alla documentazione
609
544
 
610
545
  - [Documentazione Intlayer](https://intlayer.org)
611
546
  - [Documentazione Tanstack Start](https://reactrouter.com/)
612
547
  - [Hook useIntlayer](https://github.com/aymericzip/intlayer/blob/main/docs/docs/it/packages/react-intlayer/useIntlayer.md)
613
- - [Hook useLocale](https://github.com/aymericzip/intlayer/blob/main/docs/docs/it/packages/react-intlayer/useLocale.md)
614
- - [Dichiarazione dei Contenuti](https://github.com/aymericzip/intlayer/blob/main/docs/docs/it/dictionary/get_started.md)
548
+ - [useLocale hook](https://github.com/aymericzip/intlayer/blob/main/docs/docs/it/packages/react-intlayer/useLocale.md)
549
+ - [Dichiarazione del Contenuto](https://github.com/aymericzip/intlayer/blob/main/docs/docs/it/dictionary/get_started.md)
615
550
  - [Configurazione](https://github.com/aymericzip/intlayer/blob/main/docs/docs/it/configuration.md)
616
551
 
617
552
  Questa guida completa fornisce tutto il necessario per integrare Intlayer con Tanstack Start per un'applicazione completamente internazionalizzata con routing consapevole della localizzazione e supporto TypeScript.
618
553
 
619
554
  ## Cronologia della Documentazione
620
555
 
621
- | Versione | Data | Modifiche |
622
- | -------- | ---------- | --------------------------- |
623
- | 5.8.1 | 2025-09-09 | Aggiunto per Tanstack Start |
556
+ | Versione | Data | Modifiche |
557
+ | -------- | ---------- | ---------------------------- |
558
+ | 6.5.2 | 2025-10-03 | Aggiornamento documentazione |
559
+ | 5.8.1 | 2025-09-09 | Aggiunto per Tanstack Start |