@intlayer/docs 5.8.1 → 6.0.0-canary.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (378) hide show
  1. package/blog/ar/rag_powered_documentation_assistant.md +282 -0
  2. package/blog/de/rag_powered_documentation_assistant.md +282 -0
  3. package/blog/en/rag_powered_documentation_assistant.md +289 -0
  4. package/blog/en-GB/rag_powered_documentation_assistant.md +284 -0
  5. package/blog/es/rag_powered_documentation_assistant.md +308 -0
  6. package/blog/fr/rag_powered_documentation_assistant.md +308 -0
  7. package/blog/hi/rag_powered_documentation_assistant.md +284 -0
  8. package/blog/it/rag_powered_documentation_assistant.md +284 -0
  9. package/blog/ja/rag_powered_documentation_assistant.md +284 -0
  10. package/blog/ko/rag_powered_documentation_assistant.md +283 -0
  11. package/blog/pt/rag_powered_documentation_assistant.md +284 -0
  12. package/blog/ru/rag_powered_documentation_assistant.md +284 -0
  13. package/blog/tr/index.md +69 -0
  14. package/blog/tr/internationalization_and_SEO.md +273 -0
  15. package/blog/tr/intlayer_with_i18next.md +162 -0
  16. package/blog/tr/intlayer_with_next-i18next.md +367 -0
  17. package/blog/tr/intlayer_with_next-intl.md +392 -0
  18. package/blog/tr/intlayer_with_react-i18next.md +346 -0
  19. package/blog/tr/intlayer_with_react-intl.md +345 -0
  20. package/blog/tr/list_i18n_technologies/CMS/drupal.md +143 -0
  21. package/blog/tr/list_i18n_technologies/CMS/wix.md +167 -0
  22. package/blog/tr/list_i18n_technologies/CMS/wordpress.md +188 -0
  23. package/blog/tr/list_i18n_technologies/frameworks/angular.md +125 -0
  24. package/blog/tr/list_i18n_technologies/frameworks/flutter.md +150 -0
  25. package/blog/tr/list_i18n_technologies/frameworks/react-native.md +217 -0
  26. package/blog/tr/list_i18n_technologies/frameworks/react.md +155 -0
  27. package/blog/tr/list_i18n_technologies/frameworks/svelte.md +129 -0
  28. package/blog/tr/list_i18n_technologies/frameworks/vue.md +130 -0
  29. package/blog/tr/next-i18next_vs_next-intl_vs_intlayer.md +170 -0
  30. package/blog/tr/rag_powered_documentation_assistant.md +284 -0
  31. package/blog/tr/react-i18next_vs_react-intl_vs_intlayer.md +162 -0
  32. package/blog/tr/vue-i18n_vs_intlayer.md +276 -0
  33. package/blog/tr/what_is_internationalization.md +166 -0
  34. package/blog/zh/rag_powered_documentation_assistant.md +284 -0
  35. package/dist/cjs/generated/blog.entry.cjs +212 -0
  36. package/dist/cjs/generated/blog.entry.cjs.map +1 -1
  37. package/dist/cjs/generated/docs.entry.cjs +660 -132
  38. package/dist/cjs/generated/docs.entry.cjs.map +1 -1
  39. package/dist/cjs/generated/frequentQuestions.entry.cjs +84 -0
  40. package/dist/cjs/generated/frequentQuestions.entry.cjs.map +1 -1
  41. package/dist/cjs/generated/legal.entry.cjs +6 -0
  42. package/dist/cjs/generated/legal.entry.cjs.map +1 -1
  43. package/dist/esm/generated/blog.entry.mjs +212 -0
  44. package/dist/esm/generated/blog.entry.mjs.map +1 -1
  45. package/dist/esm/generated/docs.entry.mjs +660 -132
  46. package/dist/esm/generated/docs.entry.mjs.map +1 -1
  47. package/dist/esm/generated/frequentQuestions.entry.mjs +84 -0
  48. package/dist/esm/generated/frequentQuestions.entry.mjs.map +1 -1
  49. package/dist/esm/generated/legal.entry.mjs +6 -0
  50. package/dist/esm/generated/legal.entry.mjs.map +1 -1
  51. package/dist/types/generated/blog.entry.d.ts +1 -0
  52. package/dist/types/generated/blog.entry.d.ts.map +1 -1
  53. package/dist/types/generated/docs.entry.d.ts +5 -2
  54. package/dist/types/generated/docs.entry.d.ts.map +1 -1
  55. package/dist/types/generated/frequentQuestions.entry.d.ts.map +1 -1
  56. package/dist/types/generated/legal.entry.d.ts.map +1 -1
  57. package/docs/ar/autoFill.md +41 -40
  58. package/docs/ar/configuration.md +202 -199
  59. package/docs/ar/dictionary/content_file.md +1059 -0
  60. package/docs/ar/intlayer_CMS.md +4 -4
  61. package/docs/ar/intlayer_with_nestjs.md +271 -0
  62. package/docs/ar/intlayer_with_nextjs_page_router.md +1 -1
  63. package/docs/ar/intlayer_with_react_router_v7.md +533 -0
  64. package/docs/ar/intlayer_with_tanstack.md +465 -299
  65. package/docs/ar/intlayer_with_vite+preact.md +7 -7
  66. package/docs/ar/intlayer_with_vite+react.md +7 -7
  67. package/docs/ar/intlayer_with_vite+vue.md +9 -9
  68. package/docs/ar/packages/vite-intlayer/index.md +3 -3
  69. package/docs/ar/readme.md +261 -0
  70. package/docs/ar/testing.md +199 -0
  71. package/docs/de/autoFill.md +42 -19
  72. package/docs/de/configuration.md +155 -147
  73. package/docs/de/dictionary/content_file.md +1059 -0
  74. package/docs/de/intlayer_CMS.md +4 -5
  75. package/docs/de/intlayer_with_nestjs.md +270 -0
  76. package/docs/de/intlayer_with_nextjs_page_router.md +1 -1
  77. package/docs/de/intlayer_with_react_router_v7.md +537 -0
  78. package/docs/de/intlayer_with_tanstack.md +469 -302
  79. package/docs/de/intlayer_with_vite+preact.md +7 -7
  80. package/docs/de/intlayer_with_vite+react.md +7 -7
  81. package/docs/de/intlayer_with_vite+vue.md +9 -9
  82. package/docs/de/packages/vite-intlayer/index.md +3 -3
  83. package/docs/de/readme.md +261 -0
  84. package/docs/de/testing.md +200 -0
  85. package/docs/en/CI_CD.md +4 -6
  86. package/docs/en/autoFill.md +25 -5
  87. package/docs/en/configuration.md +45 -54
  88. package/docs/en/dictionary/content_file.md +1054 -0
  89. package/docs/en/intlayer_CMS.md +8 -7
  90. package/docs/en/intlayer_cli.md +112 -5
  91. package/docs/en/intlayer_with_nestjs.md +268 -0
  92. package/docs/en/intlayer_with_nextjs_page_router.md +1 -1
  93. package/docs/en/intlayer_with_react_router_v7.md +531 -0
  94. package/docs/en/intlayer_with_tanstack.md +463 -294
  95. package/docs/en/intlayer_with_vite+preact.md +8 -8
  96. package/docs/en/intlayer_with_vite+react.md +8 -8
  97. package/docs/en/intlayer_with_vite+vue.md +8 -8
  98. package/docs/en/packages/intlayer/getLocalizedUrl.md +102 -25
  99. package/docs/en/packages/vite-intlayer/index.md +3 -3
  100. package/docs/en/readme.md +261 -0
  101. package/docs/en/testing.md +200 -0
  102. package/docs/en-GB/autoFill.md +29 -6
  103. package/docs/en-GB/configuration.md +79 -71
  104. package/docs/en-GB/dictionary/content_file.md +1084 -0
  105. package/docs/en-GB/intlayer_CMS.md +4 -5
  106. package/docs/en-GB/intlayer_with_nestjs.md +268 -0
  107. package/docs/en-GB/intlayer_with_nextjs_page_router.md +1 -1
  108. package/docs/en-GB/intlayer_with_react_router_v7.md +533 -0
  109. package/docs/en-GB/intlayer_with_tanstack.md +466 -299
  110. package/docs/en-GB/intlayer_with_vite+preact.md +7 -7
  111. package/docs/en-GB/intlayer_with_vite+react.md +7 -7
  112. package/docs/en-GB/intlayer_with_vite+vue.md +9 -9
  113. package/docs/en-GB/packages/vite-intlayer/index.md +3 -3
  114. package/docs/en-GB/readme.md +261 -0
  115. package/docs/en-GB/testing.md +200 -0
  116. package/docs/es/autoFill.md +45 -23
  117. package/docs/es/configuration.md +171 -167
  118. package/docs/es/dictionary/content_file.md +1088 -0
  119. package/docs/es/intlayer_CMS.md +4 -5
  120. package/docs/es/intlayer_with_nestjs.md +268 -0
  121. package/docs/es/intlayer_with_nextjs_page_router.md +1 -1
  122. package/docs/es/intlayer_with_react_router_v7.md +533 -0
  123. package/docs/es/intlayer_with_tanstack.md +469 -280
  124. package/docs/es/intlayer_with_vite+preact.md +7 -7
  125. package/docs/es/intlayer_with_vite+react.md +7 -7
  126. package/docs/es/intlayer_with_vite+vue.md +9 -9
  127. package/docs/es/packages/vite-intlayer/index.md +3 -3
  128. package/docs/es/readme.md +261 -0
  129. package/docs/es/testing.md +200 -0
  130. package/docs/fr/autoFill.md +47 -24
  131. package/docs/fr/configuration.md +213 -198
  132. package/docs/fr/dictionary/content_file.md +1054 -0
  133. package/docs/fr/intlayer_CMS.md +4 -5
  134. package/docs/fr/intlayer_with_nestjs.md +268 -0
  135. package/docs/fr/intlayer_with_nextjs_page_router.md +1 -1
  136. package/docs/fr/intlayer_with_react_router_v7.md +549 -0
  137. package/docs/fr/intlayer_with_tanstack.md +465 -279
  138. package/docs/fr/intlayer_with_vite+preact.md +7 -7
  139. package/docs/fr/intlayer_with_vite+react.md +7 -7
  140. package/docs/fr/intlayer_with_vite+vue.md +9 -9
  141. package/docs/fr/packages/vite-intlayer/index.md +3 -3
  142. package/docs/fr/readme.md +261 -0
  143. package/docs/fr/testing.md +200 -0
  144. package/docs/hi/autoFill.md +47 -25
  145. package/docs/hi/configuration.md +194 -189
  146. package/docs/hi/dictionary/content_file.md +1056 -0
  147. package/docs/hi/intlayer_CMS.md +4 -5
  148. package/docs/hi/intlayer_with_nestjs.md +269 -0
  149. package/docs/hi/intlayer_with_nextjs_page_router.md +1 -1
  150. package/docs/hi/intlayer_with_react_router_v7.md +533 -0
  151. package/docs/hi/intlayer_with_tanstack.md +467 -282
  152. package/docs/hi/intlayer_with_vite+preact.md +7 -7
  153. package/docs/hi/intlayer_with_vite+react.md +7 -7
  154. package/docs/hi/intlayer_with_vite+vue.md +9 -9
  155. package/docs/hi/packages/vite-intlayer/index.md +3 -3
  156. package/docs/hi/readme.md +261 -0
  157. package/docs/hi/testing.md +200 -0
  158. package/docs/it/autoFill.md +46 -24
  159. package/docs/it/configuration.md +169 -161
  160. package/docs/it/dictionary/content_file.md +1061 -0
  161. package/docs/it/intlayer_CMS.md +4 -5
  162. package/docs/it/intlayer_with_nestjs.md +268 -0
  163. package/docs/it/intlayer_with_nextjs_page_router.md +1 -1
  164. package/docs/it/intlayer_with_react_router_v7.md +535 -0
  165. package/docs/it/intlayer_with_tanstack.md +467 -301
  166. package/docs/it/intlayer_with_vite+preact.md +7 -7
  167. package/docs/it/intlayer_with_vite+react.md +7 -7
  168. package/docs/it/intlayer_with_vite+vue.md +9 -9
  169. package/docs/it/packages/vite-intlayer/index.md +3 -3
  170. package/docs/it/readme.md +261 -0
  171. package/docs/it/testing.md +200 -0
  172. package/docs/ja/autoFill.md +45 -23
  173. package/docs/ja/configuration.md +243 -204
  174. package/docs/ja/dictionary/content_file.md +1064 -0
  175. package/docs/ja/intlayer_CMS.md +4 -5
  176. package/docs/ja/intlayer_with_nestjs.md +268 -0
  177. package/docs/ja/intlayer_with_nextjs_page_router.md +1 -1
  178. package/docs/ja/intlayer_with_react_router_v7.md +534 -0
  179. package/docs/ja/intlayer_with_tanstack.md +467 -303
  180. package/docs/ja/intlayer_with_vite+preact.md +7 -7
  181. package/docs/ja/intlayer_with_vite+react.md +7 -7
  182. package/docs/ja/intlayer_with_vite+vue.md +9 -9
  183. package/docs/ja/packages/vite-intlayer/index.md +3 -3
  184. package/docs/ja/readme.md +263 -0
  185. package/docs/ja/testing.md +200 -0
  186. package/docs/ko/autoFill.md +39 -16
  187. package/docs/ko/configuration.md +217 -197
  188. package/docs/ko/dictionary/content_file.md +1060 -0
  189. package/docs/ko/intlayer_CMS.md +4 -5
  190. package/docs/ko/intlayer_with_nestjs.md +268 -0
  191. package/docs/ko/intlayer_with_nextjs_page_router.md +1 -1
  192. package/docs/ko/intlayer_with_react_router_v7.md +540 -0
  193. package/docs/ko/intlayer_with_tanstack.md +466 -302
  194. package/docs/ko/intlayer_with_vite+preact.md +7 -7
  195. package/docs/ko/intlayer_with_vite+react.md +7 -7
  196. package/docs/ko/intlayer_with_vite+vue.md +9 -9
  197. package/docs/ko/packages/vite-intlayer/index.md +3 -3
  198. package/docs/ko/readme.md +261 -0
  199. package/docs/ko/testing.md +200 -0
  200. package/docs/pt/autoFill.md +39 -15
  201. package/docs/pt/configuration.md +165 -147
  202. package/docs/pt/dictionary/content_file.md +1062 -0
  203. package/docs/pt/intlayer_CMS.md +4 -5
  204. package/docs/pt/intlayer_with_nestjs.md +271 -0
  205. package/docs/pt/intlayer_with_nextjs_page_router.md +1 -1
  206. package/docs/pt/intlayer_with_react_router_v7.md +535 -0
  207. package/docs/pt/intlayer_with_tanstack.md +469 -300
  208. package/docs/pt/intlayer_with_vite+preact.md +7 -7
  209. package/docs/pt/intlayer_with_vite+react.md +7 -7
  210. package/docs/pt/intlayer_with_vite+vue.md +9 -9
  211. package/docs/pt/packages/vite-intlayer/index.md +3 -3
  212. package/docs/pt/readme.md +261 -0
  213. package/docs/pt/testing.md +200 -0
  214. package/docs/ru/autoFill.md +52 -30
  215. package/docs/ru/configuration.md +164 -117
  216. package/docs/ru/dictionary/content_file.md +1064 -0
  217. package/docs/ru/intlayer_CMS.md +4 -4
  218. package/docs/ru/intlayer_with_nestjs.md +270 -0
  219. package/docs/ru/intlayer_with_nextjs_page_router.md +1 -1
  220. package/docs/ru/intlayer_with_react_router_v7.md +534 -0
  221. package/docs/ru/intlayer_with_tanstack.md +470 -305
  222. package/docs/ru/intlayer_with_vite+preact.md +7 -7
  223. package/docs/ru/intlayer_with_vite+react.md +7 -7
  224. package/docs/ru/intlayer_with_vite+vue.md +9 -9
  225. package/docs/ru/packages/vite-intlayer/index.md +3 -3
  226. package/docs/ru/readme.md +261 -0
  227. package/docs/ru/testing.md +202 -0
  228. package/docs/tr/CI_CD.md +198 -0
  229. package/docs/tr/autoFill.md +201 -0
  230. package/docs/tr/configuration.md +585 -0
  231. package/docs/tr/dictionary/condition.md +243 -0
  232. package/docs/tr/dictionary/content_file.md +1055 -0
  233. package/docs/tr/dictionary/enumeration.md +251 -0
  234. package/docs/tr/dictionary/file.md +228 -0
  235. package/docs/tr/dictionary/function_fetching.md +218 -0
  236. package/docs/tr/dictionary/gender.md +279 -0
  237. package/docs/tr/dictionary/insertion.md +191 -0
  238. package/docs/tr/dictionary/markdown.md +385 -0
  239. package/docs/tr/dictionary/nesting.md +279 -0
  240. package/docs/tr/dictionary/translation.md +315 -0
  241. package/docs/tr/formatters.md +618 -0
  242. package/docs/tr/how_works_intlayer.md +254 -0
  243. package/docs/tr/index.md +168 -0
  244. package/docs/tr/interest_of_intlayer.md +288 -0
  245. package/docs/tr/intlayer_CMS.md +347 -0
  246. package/docs/tr/intlayer_cli.md +570 -0
  247. package/docs/tr/intlayer_visual_editor.md +269 -0
  248. package/docs/tr/intlayer_with_angular.md +694 -0
  249. package/docs/tr/intlayer_with_create_react_app.md +1218 -0
  250. package/docs/tr/intlayer_with_express.md +415 -0
  251. package/docs/tr/intlayer_with_lynx+react.md +511 -0
  252. package/docs/tr/intlayer_with_nestjs.md +268 -0
  253. package/docs/tr/intlayer_with_nextjs_14.md +1029 -0
  254. package/docs/tr/intlayer_with_nextjs_15.md +1506 -0
  255. package/docs/tr/intlayer_with_nextjs_page_router.md +1484 -0
  256. package/docs/tr/intlayer_with_nuxt.md +773 -0
  257. package/docs/tr/intlayer_with_react_native+expo.md +660 -0
  258. package/docs/tr/intlayer_with_react_router_v7.md +531 -0
  259. package/docs/tr/intlayer_with_tanstack.md +452 -0
  260. package/docs/tr/intlayer_with_vite+preact.md +1673 -0
  261. package/docs/tr/intlayer_with_vite+react.md +1632 -0
  262. package/docs/tr/intlayer_with_vite+solid.md +288 -0
  263. package/docs/tr/intlayer_with_vite+svelte.md +288 -0
  264. package/docs/tr/intlayer_with_vite+vue.md +1042 -0
  265. package/docs/tr/introduction.md +209 -0
  266. package/docs/tr/locale_mapper.md +244 -0
  267. package/docs/tr/mcp_server.md +207 -0
  268. package/docs/tr/packages/@intlayer/api/index.md +58 -0
  269. package/docs/tr/packages/@intlayer/chokidar/index.md +57 -0
  270. package/docs/tr/packages/@intlayer/cli/index.md +47 -0
  271. package/docs/tr/packages/@intlayer/config/index.md +142 -0
  272. package/docs/tr/packages/@intlayer/core/index.md +51 -0
  273. package/docs/tr/packages/@intlayer/design-system/index.md +47 -0
  274. package/docs/tr/packages/@intlayer/dictionary-entry/index.md +53 -0
  275. package/docs/tr/packages/@intlayer/editor/index.md +47 -0
  276. package/docs/tr/packages/@intlayer/editor-react/index.md +47 -0
  277. package/docs/tr/packages/@intlayer/webpack/index.md +61 -0
  278. package/docs/tr/packages/angular-intlayer/index.md +59 -0
  279. package/docs/tr/packages/express-intlayer/index.md +258 -0
  280. package/docs/tr/packages/express-intlayer/t.md +459 -0
  281. package/docs/tr/packages/intlayer/getConfiguration.md +151 -0
  282. package/docs/tr/packages/intlayer/getEnumeration.md +165 -0
  283. package/docs/tr/packages/intlayer/getHTMLTextDir.md +127 -0
  284. package/docs/tr/packages/intlayer/getLocaleLang.md +87 -0
  285. package/docs/tr/packages/intlayer/getLocaleName.md +124 -0
  286. package/docs/tr/packages/intlayer/getLocalizedUrl.md +324 -0
  287. package/docs/tr/packages/intlayer/getMultilingualUrls.md +225 -0
  288. package/docs/tr/packages/intlayer/getPathWithoutLocale.md +81 -0
  289. package/docs/tr/packages/intlayer/getTranslation.md +196 -0
  290. package/docs/tr/packages/intlayer/getTranslationContent.md +195 -0
  291. package/docs/tr/packages/intlayer/index.md +505 -0
  292. package/docs/tr/packages/intlayer-cli/index.md +71 -0
  293. package/docs/tr/packages/intlayer-editor/index.md +139 -0
  294. package/docs/tr/packages/lynx-intlayer/index.md +85 -0
  295. package/docs/tr/packages/next-intlayer/index.md +154 -0
  296. package/docs/tr/packages/next-intlayer/t.md +354 -0
  297. package/docs/tr/packages/next-intlayer/useDictionary.md +270 -0
  298. package/docs/tr/packages/next-intlayer/useIntlayer.md +265 -0
  299. package/docs/tr/packages/next-intlayer/useLocale.md +133 -0
  300. package/docs/tr/packages/nuxt-intlayer/index.md +59 -0
  301. package/docs/tr/packages/preact-intlayer/index.md +55 -0
  302. package/docs/tr/packages/react-intlayer/index.md +148 -0
  303. package/docs/tr/packages/react-intlayer/t.md +304 -0
  304. package/docs/tr/packages/react-intlayer/useDictionary.md +554 -0
  305. package/docs/tr/packages/react-intlayer/useI18n.md +478 -0
  306. package/docs/tr/packages/react-intlayer/useIntlayer.md +253 -0
  307. package/docs/tr/packages/react-intlayer/useLocale.md +212 -0
  308. package/docs/tr/packages/react-native-intlayer/index.md +85 -0
  309. package/docs/tr/packages/react-scripts-intlayer/index.md +82 -0
  310. package/docs/tr/packages/solid-intlayer/index.md +56 -0
  311. package/docs/tr/packages/svelte-intlayer/index.md +55 -0
  312. package/docs/tr/packages/vite-intlayer/index.md +82 -0
  313. package/docs/tr/packages/vue-intlayer/index.md +59 -0
  314. package/docs/tr/per_locale_file.md +321 -0
  315. package/docs/tr/readme.md +261 -0
  316. package/docs/tr/roadmap.md +338 -0
  317. package/docs/tr/testing.md +200 -0
  318. package/docs/tr/vs_code_extension.md +154 -0
  319. package/docs/zh/autoFill.md +40 -18
  320. package/docs/zh/configuration.md +245 -226
  321. package/docs/zh/dictionary/content_file.md +1064 -0
  322. package/docs/zh/intlayer_CMS.md +4 -5
  323. package/docs/zh/intlayer_with_nestjs.md +268 -0
  324. package/docs/zh/intlayer_with_nextjs_page_router.md +1 -1
  325. package/docs/zh/intlayer_with_react_router_v7.md +535 -0
  326. package/docs/zh/intlayer_with_tanstack.md +468 -278
  327. package/docs/zh/intlayer_with_vite+preact.md +7 -7
  328. package/docs/zh/intlayer_with_vite+react.md +7 -7
  329. package/docs/zh/intlayer_with_vite+vue.md +7 -7
  330. package/docs/zh/packages/vite-intlayer/index.md +3 -3
  331. package/docs/zh/readme.md +261 -0
  332. package/docs/zh/testing.md +198 -0
  333. package/frequent_questions/tr/SSR_Next_no_[locale].md +105 -0
  334. package/frequent_questions/tr/array_as_content_declaration.md +72 -0
  335. package/frequent_questions/tr/build_dictionaries.md +59 -0
  336. package/frequent_questions/tr/build_error_CI_CD.md +75 -0
  337. package/frequent_questions/tr/customized_locale_list.md +65 -0
  338. package/frequent_questions/tr/domain_routing.md +114 -0
  339. package/frequent_questions/tr/esbuild_error.md +30 -0
  340. package/frequent_questions/tr/get_locale_cookie.md +142 -0
  341. package/frequent_questions/tr/intlayer_command_undefined.md +156 -0
  342. package/frequent_questions/tr/locale_incorect_in_url.md +74 -0
  343. package/frequent_questions/tr/static_rendering.md +45 -0
  344. package/frequent_questions/tr/translated_path_url.md +56 -0
  345. package/frequent_questions/tr/unknown_command.md +98 -0
  346. package/legal/tr/privacy_notice.md +83 -0
  347. package/legal/tr/terms_of_service.md +55 -0
  348. package/package.json +12 -12
  349. package/src/generated/blog.entry.ts +212 -0
  350. package/src/generated/docs.entry.ts +663 -135
  351. package/src/generated/frequentQuestions.entry.ts +85 -1
  352. package/src/generated/legal.entry.ts +7 -1
  353. package/docs/ar/dictionary/content_extention_customization.md +0 -100
  354. package/docs/ar/dictionary/get_started.md +0 -527
  355. package/docs/de/dictionary/content_extention_customization.md +0 -100
  356. package/docs/de/dictionary/get_started.md +0 -531
  357. package/docs/en/dictionary/content_extention_customization.md +0 -102
  358. package/docs/en/dictionary/get_started.md +0 -529
  359. package/docs/en-GB/dictionary/content_extention_customization.md +0 -100
  360. package/docs/en-GB/dictionary/get_started.md +0 -591
  361. package/docs/es/dictionary/content_extention_customization.md +0 -100
  362. package/docs/es/dictionary/get_started.md +0 -527
  363. package/docs/fr/dictionary/content_extention_customization.md +0 -100
  364. package/docs/fr/dictionary/get_started.md +0 -527
  365. package/docs/hi/dictionary/content_extention_customization.md +0 -100
  366. package/docs/hi/dictionary/get_started.md +0 -527
  367. package/docs/it/dictionary/content_extention_customization.md +0 -113
  368. package/docs/it/dictionary/get_started.md +0 -573
  369. package/docs/ja/dictionary/content_extention_customization.md +0 -113
  370. package/docs/ja/dictionary/get_started.md +0 -576
  371. package/docs/ko/dictionary/content_extention_customization.md +0 -100
  372. package/docs/ko/dictionary/get_started.md +0 -530
  373. package/docs/pt/dictionary/content_extention_customization.md +0 -100
  374. package/docs/pt/dictionary/get_started.md +0 -532
  375. package/docs/ru/dictionary/content_extention_customization.md +0 -100
  376. package/docs/ru/dictionary/get_started.md +0 -575
  377. package/docs/zh/dictionary/content_extention_customization.md +0 -117
  378. package/docs/zh/dictionary/get_started.md +0 -533
@@ -0,0 +1,1061 @@
1
+ ---
2
+ createdAt: 2025-02-07
3
+ updatedAt: 2025-09-20
4
+ title: File di Contenuto
5
+ description: Scopri come personalizzare le estensioni per i tuoi file di dichiarazione dei contenuti. Segui questa documentazione per implementare condizioni in modo efficiente nel tuo progetto.
6
+ keywords:
7
+ - File di Contenuto
8
+ - Documentazione
9
+ - Intlayer
10
+ slugs:
11
+ - doc
12
+ - concept
13
+ - content
14
+ ---
15
+
16
+ # File di Contenuto
17
+
18
+ <iframe title="i18n, Markdown, JSON… una soluzione unica per gestire tutto | Intlayer" class="m-auto aspect-[16/9] w-full overflow-hidden rounded-lg border-0" allow="autoplay; gyroscope;" loading="lazy" width="1080" height="auto" src="https://www.youtube.com/embed/1VHgSY_j9_I?autoplay=0&amp;origin=http://intlayer.org&amp;controls=0&amp;rel=1"/>
19
+
20
+ ## Cos'è un File di Contenuto?
21
+
22
+ Un file di contenuto in Intlayer è un file che contiene definizioni di dizionari.
23
+ Questi file dichiarano il contenuto testuale, le traduzioni e le risorse della tua applicazione.
24
+ I file di contenuto vengono elaborati da Intlayer per generare dizionari.
25
+
26
+ I dizionari saranno il risultato finale che la tua applicazione importerà utilizzando l'hook `useIntlayer`.
27
+
28
+ ### Concetti Chiave
29
+
30
+ #### Dizionario
31
+
32
+ Un dizionario è una raccolta strutturata di contenuti organizzati per chiavi. Ogni dizionario contiene:
33
+
34
+ - **Chiave**: Un identificatore univoco per il dizionario
35
+ - **Contenuto**: I valori effettivi del contenuto (testo, numeri, oggetti, ecc.)
36
+ - **Metadati**: Informazioni aggiuntive come titolo, descrizione, tag, ecc.
37
+
38
+ #### File di Contenuto
39
+
40
+ Esempio di file di contenuto:
41
+
42
+ ```tsx fileName="src/example.content.tsx" contentDeclarationFormat="typescript"
43
+ import { type ReactNode } from "react";
44
+ import {
45
+ t,
46
+ enu,
47
+ cond,
48
+ nest,
49
+ md,
50
+ insert,
51
+ file,
52
+ type Dictionary,
53
+ } from "intlayer";
54
+
55
+ interface Content {
56
+ imbricatedContent: {
57
+ imbricatedContent2: {
58
+ stringContent: string;
59
+ numberContent: number;
60
+ booleanContent: boolean;
61
+ javaScriptContent: string;
62
+ };
63
+ };
64
+ multilingualContent: string;
65
+ quantityContent: string;
66
+ conditionalContent: string;
67
+ markdownContent: never;
68
+ externalContent: string;
69
+ insertionContent: string;
70
+ nestedContent: string;
71
+ fileContent: string;
72
+ jsxContent: ReactNode;
73
+ }
74
+
75
+ export default {
76
+ key: "page",
77
+ content: {
78
+ imbricatedContent: {
79
+ imbricatedContent2: {
80
+ stringContent: "Ciao Mondo",
81
+ numberContent: 123,
82
+ booleanContent: true,
83
+ javaScriptContent: `${process.env.NODE_ENV}`,
84
+ },
85
+ },
86
+ multilingualContent: t({
87
+ it: "Contenuto in inglese",
88
+ en: "English content",
89
+ "en-GB": "English content (UK)",
90
+ fr: "French content",
91
+ es: "Spanish content",
92
+ }),
93
+ quantityContent: enu({
94
+ "<-1": "Meno di meno una macchina",
95
+ "-1": "Meno una macchina",
96
+ "0": "Nessuna macchina",
97
+ "1": "Una macchina",
98
+ ">5": "Alcune macchine",
99
+ ">19": "Molte macchine",
100
+ }),
101
+ conditionalContent: cond({
102
+ true: "La validazione è abilitata",
103
+ false: "La validazione è disabilitata",
104
+ }),
105
+ insertionContent: insert("Ciao {{name}}!"),
106
+ nestedContent: nest(
107
+ "navbar", // La chiave del dizionario da annidare
108
+ "login.button" // [Opzionale] Il percorso del contenuto da annidare
109
+ ),
110
+ fileContent: file("./path/to/file.txt"),
111
+ externalContent: fetch("https://example.com").then((res) => res.json()),
112
+ markdownContent: md("# Esempio di Markdown"),
113
+
114
+ /*
115
+ * Disponibile solo usando `react-intlayer` o `next-intlayer`
116
+ */
117
+ jsxContent: <h1>Il mio titolo</h1>,
118
+ },
119
+ } satisfies Dictionary<Content>; // [opzionale] Dictionary è generico e ti permette di rafforzare il formato del tuo dizionario
120
+ ```
121
+
122
+ ```javascript fileName="src/example.content.mjx" contentDeclarationFormat="esm"
123
+ import { t, enu, cond, nest, md, insert, file } from "intlayer";
124
+
125
+ /** @type {import('intlayer').Dictionary} */
126
+ export default {
127
+ key: "page",
128
+ content: {
129
+ imbricatedContent: {
130
+ imbricatedContent2: {
131
+ stringContent: "Hello World",
132
+ numberContent: 123,
133
+ booleanContent: true,
134
+ javaScriptContent: `${process.env.NODE_ENV}`,
135
+ },
136
+ imbricatedArray: [1, 2, 3],
137
+ },
138
+ multilingualContent: t({
139
+ it: "Contenuto in inglese",
140
+ "en-GB": "Contenuto in inglese (UK)",
141
+ fr: "Contenuto in francese",
142
+ es: "Contenuto in spagnolo",
143
+ }),
144
+ quantityContent: enu({
145
+ "<-1": "Meno di meno uno auto",
146
+ "-1": "Meno uno auto",
147
+ "0": "Nessuna auto",
148
+ "1": "Una auto",
149
+ ">5": "Alcune auto",
150
+ ">19": "Molte auto",
151
+ }),
152
+ conditionalContent: cond({
153
+ true: "La validazione è abilitata",
154
+ false: "La validazione è disabilitata",
155
+ }),
156
+ insertionContent: insert("Ciao {{name}}!"),
157
+ nestedContent: nest(
158
+ "navbar", // La chiave del dizionario da annidare
159
+ "login.button" // [Opzionale] Il percorso al contenuto da annidare
160
+ ),
161
+ markdownContent: md("# Esempio Markdown"),
162
+ fileContent: file("./path/to/file.txt"),
163
+ externalContent: fetch("https://example.com").then((res) => res.json())
164
+
165
+ // Disponibile solo usando `react-intlayer` o `next-intlayer`
166
+ jsxContent: <h1>Il mio titolo</h1>,
167
+ },
168
+ };
169
+ ```
170
+
171
+ ```javascript fileName="src/example.content.cjx" contentDeclarationFormat="commonjs"
172
+ const { t, enu, cond, nest, md, insert, file } = require("intlayer");
173
+
174
+ /** @type {import('intlayer').Dictionary} */
175
+ module.exports = {
176
+ key: "page",
177
+ content: {
178
+ imbricatedContent: {
179
+ imbricatedContent2: {
180
+ stringContent: "Hello World",
181
+ numberContent: 123,
182
+ booleanContent: true,
183
+ javaScriptContent: `${process.env.NODE_ENV}`,
184
+ },
185
+ imbricatedArray: [1, 2, 3],
186
+ },
187
+ multilingualContent: t({
188
+ it: "Contenuto in inglese",
189
+ en: "English content",
190
+ "en-GB": "English content (UK)",
191
+ fr: "French content",
192
+ es: "Spanish content",
193
+ }),
194
+ quantityContent: enu({
195
+ "<-1": "Meno di meno una macchina",
196
+ "-1": "Meno una macchina",
197
+ "0": "Nessuna macchina",
198
+ "1": "Una macchina",
199
+ ">5": "Alcune macchine",
200
+ ">19": "Molte macchine",
201
+ }),
202
+ conditionalContent: cond({
203
+ true: "La validazione è abilitata",
204
+ false: "La validazione è disabilitata",
205
+ }),
206
+ insertionContent: insert("Ciao {{name}}!"),
207
+ nestedContent: nest(
208
+ "navbar", // La chiave del dizionario da annidare
209
+ "login.button" // [Opzionale] Il percorso del contenuto da annidare
210
+ ),
211
+ markdownContent: md("# Esempio Markdown"),
212
+ fileContent: file("./path/to/file.txt"),
213
+ externalContent: fetch("https://example.com").then((res) => res.json())
214
+
215
+ // Disponibile solo usando `react-intlayer` o `next-intlayer`
216
+ jsxContent: <h1>Il mio titolo</h1>,
217
+ },
218
+ };
219
+ ```
220
+
221
+ ```json5 fileName="src/example.content.json" contentDeclarationFormat="json"
222
+ {
223
+ "$schema": "https://intlayer.org/schema.json",
224
+ "key": "page",
225
+ "content": {
226
+ "imbricatedContent": {
227
+ "imbricatedContent2": {
228
+ "stringContent": "Ciao Mondo", // Contenuto stringa
229
+ "numberContent": 123, // Contenuto numero
230
+ "booleanContent": true, // Contenuto booleano
231
+ },
232
+ "imbricatedArray": [1, 2, 3], // Array annidato
233
+ },
234
+ "multilingualContent": {
235
+ "nodeType": "translation", // Tipo nodo: traduzione
236
+ "translation": {
237
+ "en": "English content",
238
+ "en-GB": "English content (UK)",
239
+ "fr": "French content",
240
+ "es": "Spanish content",
241
+ },
242
+ },
243
+ "quantityContent": {
244
+ "nodeType": "enumerazione",
245
+ "enumeration": {
246
+ "0": "Nessuna auto",
247
+ "1": "Un'auto",
248
+ "<-1": "Meno di meno una auto",
249
+ "-1": "Meno una auto",
250
+ ">5": "Alcune auto",
251
+ ">19": "Molte auto",
252
+ },
253
+ },
254
+ "conditionalContent": {
255
+ "nodeType": "condizione",
256
+ "condition": {
257
+ "true": "La validazione è abilitata",
258
+ "false": "La validazione è disabilitata",
259
+ },
260
+ },
261
+ "insertionContent": {
262
+ "nodeType": "inserimento",
263
+ "insertion": "Ciao {{name}}!",
264
+ },
265
+ "nestedContent": {
266
+ "nodeType": "annidato",
267
+ "nested": { "dictionaryKey": "app" },
268
+ },
269
+ "markdownContent": {
270
+ "nodeType": "markdown",
271
+ "markdown": "# Esempio Markdown",
272
+ },
273
+ "fileContent": {
274
+ "nodeType": "file",
275
+ "file": "./path/to/file.txt",
276
+ },
277
+ "jsxContent": {
278
+ "type": "h1",
279
+ "key": null,
280
+ "ref": null,
281
+ "props": {
282
+ "children": ["Il mio titolo"],
283
+ },
284
+ },
285
+ },
286
+ }
287
+ ```
288
+
289
+ #### Nodi di Contenuto
290
+
291
+ I nodi di contenuto sono i mattoni fondamentali del contenuto del dizionario. Possono essere:
292
+
293
+ - **Valori primitivi**: stringhe, numeri, booleani, null, undefined
294
+ - **Nodi tipizzati**: Tipi di contenuto speciali come traduzioni, condizioni, markdown, ecc.
295
+ - **Funzioni**: Contenuto dinamico che può essere valutato a runtime [vedi Recupero Funzioni](https://github.com/aymericzip/intlayer/blob/main/docs/docs/it/dictionary/function_fetching.md)
296
+ - **Contenuto annidato**: Riferimenti ad altri dizionari
297
+
298
+ #### Tipi di Contenuto
299
+
300
+ Intlayer supporta vari tipi di contenuto tramite nodi tipizzati:
301
+
302
+ - **Contenuto di Traduzione**: Testo multilingue con valori specifici per locale [vedi Contenuto di Traduzione](https://github.com/aymericzip/intlayer/blob/main/docs/docs/it/dictionary/translation_content.md)
303
+ - **Contenuto Condizionale**: Contenuto condizionale basato su espressioni booleane [vedi Contenuto Condizionale](https://github.com/aymericzip/intlayer/blob/main/docs/docs/it/dictionary/condition_content.md)
304
+ - **Contenuto di Enumerazione**: Contenuto che varia in base a valori enumerati [vedi Contenuto di Enumerazione](https://github.com/aymericzip/intlayer/blob/main/docs/docs/it/dictionary/enumeration_content.md)
305
+ - **Contenuto di Inserimento**: Contenuto che può essere inserito in altri contenuti [vedi Contenuto di Inserimento](https://github.com/aymericzip/intlayer/blob/main/docs/docs/it/dictionary/insertion_content.md)
306
+ - **Contenuto Markdown**: Contenuto di testo arricchito in formato Markdown [vedi Contenuto Markdown](https://github.com/aymericzip/intlayer/blob/main/docs/docs/it/dictionary/markdown_content.md)
307
+ - **Contenuto Annidato**: Riferimenti ad altri dizionari [vedi Contenuto Annidato](https://github.com/aymericzip/intlayer/blob/main/docs/docs/it/dictionary/nested_content.md)
308
+ - **Contenuto di Genere**: Contenuto che varia in base al genere [vedi Contenuto di Genere](https://github.com/aymericzip/intlayer/blob/main/docs/docs/it/dictionary/gender_content.md)
309
+ - **Contenuto File**: Riferimenti a file esterni [vedi Contenuto File](https://github.com/aymericzip/intlayer/blob/main/docs/docs/it/dictionary/file_content.md)
310
+
311
+ ## Struttura del Dizionario
312
+
313
+ Un dizionario in Intlayer è definito dal tipo `Dictionary` e contiene diverse proprietà che ne controllano il comportamento:
314
+
315
+ ### Proprietà Obbligatorie
316
+
317
+ #### `key` (stringa)
318
+
319
+ L'identificatore per il dizionario. Se più dizionari hanno la stessa chiave, Intlayer li unirà automaticamente.
320
+
321
+ > Usa la convenzione di denominazione kebab-case (ad esempio, `"about-page-meta"`).
322
+
323
+ #### Content (stringa | numero | booleano | oggetto | array | funzione)
324
+
325
+ La proprietà `content` contiene i dati effettivi del dizionario e supporta:
326
+
327
+ - **Valori primitivi**: stringhe, numeri, booleani, null, undefined
328
+ - **Nodi tipizzati**: Tipi di contenuto speciali usando le funzioni helper di Intlayer
329
+ - **Oggetti annidati**: Strutture dati complesse
330
+ - **Array**: Collezioni di contenuti
331
+ - **Funzioni**: Valutazione dinamica del contenuto
332
+
333
+ ### Proprietà Opzionali
334
+
335
+ #### `title` (stringa)
336
+
337
+ Titolo leggibile dall'utente per il dizionario che aiuta a identificarlo negli editor e nei sistemi CMS. Questo è particolarmente utile quando si gestiscono grandi quantità di dizionari o quando si lavora con interfacce di gestione dei contenuti.
338
+
339
+ **Esempio:**
340
+
341
+ ```typescript
342
+ {
343
+ key: "about-page-meta",
344
+ title: "Metadati della pagina About",
345
+ content: { /* ... */ }
346
+ }
347
+ ```
348
+
349
+ #### `description` (stringa)
350
+
351
+ Descrizione dettagliata che spiega lo scopo del dizionario, le linee guida per l'uso e qualsiasi considerazione speciale. Questa descrizione viene anche utilizzata come contesto per la generazione di traduzioni assistita da AI, risultando preziosa per mantenere la qualità e la coerenza delle traduzioni.
352
+
353
+ **Esempio:**
354
+
355
+ ```typescript
356
+ {
357
+ key: "about-page-meta",
358
+ description: [
359
+ "Questo dizionario gestisce i metadati della pagina About",
360
+ "Considera le buone pratiche per la SEO:",
361
+ "- Il titolo dovrebbe essere tra 50 e 60 caratteri",
362
+ "- La descrizione dovrebbe essere tra 150 e 160 caratteri",
363
+ ].join('\n'),
364
+ content: { /* ... */ }
365
+ }
366
+ ```
367
+
368
+ #### `tags` (string[])
369
+
370
+ Array di stringhe per categorizzare e organizzare i dizionari. I tag forniscono un contesto aggiuntivo e possono essere utilizzati per filtrare, cercare o organizzare i dizionari negli editor e nei sistemi CMS.
371
+
372
+ **Esempio:**
373
+
374
+ ```typescript
375
+ {
376
+ key: "about-page-meta",
377
+ tags: ["metadata", "about-page", "seo"],
378
+ content: { /* ... */ }
379
+ }
380
+ ```
381
+
382
+ #### `locale` (LocalesValues)
383
+
384
+ Trasforma il dizionario in un dizionario per locale in cui ogni campo dichiarato nel contenuto sarà automaticamente trasformato in un nodo di traduzione. Quando questa proprietà è impostata:
385
+
386
+ - Il dizionario è trattato come un dizionario a singola lingua
387
+ - Ogni campo diventa un nodo di traduzione per quella specifica lingua
388
+ - NON dovresti usare nodi di traduzione (`t()`) nel contenuto quando usi questa proprietà
389
+ - Se mancante, il dizionario sarà trattato come un dizionario multilingue
390
+
391
+ > Vedi [Dichiarazione di contenuti per lingua in Intlayer](https://github.com/aymericzip/intlayer/blob/main/docs/docs/it/per_locale_file.md) per maggiori informazioni.
392
+
393
+ **Esempio:**
394
+
395
+ ```json
396
+ // Dizionario per lingua
397
+ {
398
+ "key": "about-page",
399
+ "locale": "en",
400
+ "content": {
401
+ "title": "About Us", // Questo diventa un nodo di traduzione per 'en'
402
+ "description": "Learn more about our company"
403
+ }
404
+ }
405
+ ```
406
+
407
+ #### `autoFill` (AutoFill)
408
+
409
+ Istruzioni per il riempimento automatico del contenuto del dizionario da fonti esterne. Questo può essere configurato globalmente in `intlayer.config.ts` o per singolo dizionario. Supporta più formati:
410
+
411
+ - **`true`**: Abilita il riempimento automatico per tutte le localizzazioni
412
+ - **`string`**: Percorso a un singolo file o modello con variabili
413
+ - **`object`**: Percorsi file per locale
414
+
415
+ **Esempi:**
416
+
417
+ ```json
418
+ // Abilita per tutte le localizzazioni
419
+ {
420
+ "autoFill": true
421
+ }
422
+ // File singolo
423
+ {
424
+ "autoFill": "./translations/aboutPage.content.json"
425
+ }
426
+ // Modello con variabili
427
+ {
428
+ "autoFill": "/messages/{{locale}}/{{key}}/{{fileName}}.content.json"
429
+ }
430
+ // Configurazione dettagliata per locale
431
+ {
432
+ "autoFill": {
433
+ "en": "./translations/en/aboutPage.content.json",
434
+ "fr": "./translations/fr/aboutPage.content.json",
435
+ "es": "./translations/es/aboutPage.content.json"
436
+ }
437
+ }
438
+ ```
439
+
440
+ **Variabili disponibili:**
441
+
442
+ - `{{locale}}` – Codice della localizzazione (es. `fr`, `es`)
443
+ - `{{fileName}}` – Nome del file (es. `example`)
444
+ - `{{key}}` – Chiave del dizionario (es. `example`)
445
+
446
+ > Vedi [Configurazione Auto-Fill in Intlayer](https://github.com/aymericzip/intlayer/blob/main/docs/docs/it/autoFill.md) per maggiori informazioni.
447
+
448
+ ##### `priority` (numero)
449
+
450
+ Indica la priorità del dizionario per la risoluzione dei conflitti. Quando più dizionari hanno la stessa chiave, il dizionario con il numero di priorità più alto sovrascriverà gli altri. Questo è utile per gestire gerarchie di contenuti e sovrascritture.
451
+
452
+ **Esempio:**
453
+
454
+ ```typescript
455
+ // Dizionario base
456
+ {
457
+ key: "welcome-message",
458
+ priority: 1,
459
+ content: { message: "Benvenuto!" }
460
+ }
461
+
462
+ // Dizionario di override
463
+ {
464
+ key: "welcome-message",
465
+ priority: 10,
466
+ content: { message: "Benvenuto nel nostro servizio premium!" }
467
+ }
468
+ // Questo sovrascriverà il dizionario base
469
+ ```
470
+
471
+ ### Proprietà CMS
472
+
473
+ ##### `version` (stringa)
474
+
475
+ Identificatore di versione per dizionari remoti. Aiuta a tracciare quale versione del dizionario è attualmente in uso, particolarmente utile quando si lavora con sistemi di gestione contenuti remoti.
476
+
477
+ ##### `live` (booleano)
478
+
479
+ Per dizionari remoti, indica se il dizionario deve essere recuperato in tempo reale durante l'esecuzione. Quando abilitato:
480
+
481
+ - Richiede che `importMode` sia impostato su "live" in `intlayer.config.ts`
482
+ - Richiede che un server live sia in esecuzione
483
+ - Il dizionario sarà recuperato a runtime usando l'API di sincronizzazione live
484
+ - Se è live ma il recupero fallisce, si ricorre al valore dinamico
485
+ - Se non è live, il dizionario viene trasformato in fase di build per prestazioni ottimali
486
+
487
+ ### Proprietà di Sistema (Generato automaticamente)
488
+
489
+ Queste proprietà sono generate automaticamente da Intlayer e non devono essere modificate manualmente:
490
+
491
+ ##### `$schema` (stringa)
492
+
493
+ Schema JSON utilizzato per la validazione della struttura del dizionario. Aggiunto automaticamente da Intlayer per garantire l'integrità del dizionario.
494
+
495
+ ##### `id` (stringa)
496
+
497
+ Per i dizionari remoti, questo è l'identificatore univoco del dizionario nel server remoto. Utilizzato per il recupero e la gestione dei contenuti remoti.
498
+
499
+ ##### `localId` (LocalDictionaryId)
500
+
501
+ Identificatore univoco per i dizionari locali. Generato automaticamente da Intlayer per aiutare a identificare il dizionario e determinare se è locale o remoto, insieme alla sua posizione.
502
+
503
+ ##### `localIds` (LocalDictionaryId[])
504
+
505
+ Per i dizionari uniti, questo array contiene gli ID di tutti i dizionari che sono stati uniti insieme. Utile per tracciare la fonte del contenuto unito.
506
+
507
+ ##### `filePath` (string)
508
+
509
+ Il percorso del file del dizionario locale, che indica da quale file `.content` è stato generato il dizionario. Aiuta nel debug e nel tracciamento della fonte.
510
+
511
+ ##### `versions` (string[])
512
+
513
+ Per i dizionari remoti, questo array contiene tutte le versioni disponibili del dizionario. Aiuta a tracciare quali versioni sono disponibili per l'uso.
514
+
515
+ ##### `autoFilled` (true)
516
+
517
+ Indica se il dizionario è stato compilato automaticamente da fonti esterne. In caso di conflitti, i dizionari base sovrascriveranno quelli compilati automaticamente.
518
+
519
+ ##### `location` ('distant' | 'locale')
520
+
521
+ Indica la posizione del dizionario:
522
+
523
+ - `'locale'`: Dizionario locale (da file di contenuto)
524
+ - `'distant'`: Dizionario remoto (da fonte esterna)
525
+
526
+ ## Tipi di Nodi di Contenuto
527
+
528
+ Intlayer fornisce diversi tipi specializzati di nodi di contenuto che estendono i valori primitivi di base:
529
+
530
+ ### Contenuto di Traduzione (`t`)
531
+
532
+ Contenuto multilingue che varia in base alla localizzazione:
533
+
534
+ ```typescript
535
+ import { t } from "intlayer";
536
+
537
+ // TypeScript/JavaScript
538
+ multilingualContent: t({
539
+ en: "Welcome to our website",
540
+ fr: "Bienvenue sur notre site web",
541
+ es: "Bienvenido a nuestro sitio web",
542
+ });
543
+ ```
544
+
545
+ ### Contenuto Condizionale (`cond`)
546
+
547
+ Contenuto che cambia in base a condizioni booleane:
548
+
549
+ ```typescript
550
+ import { cond } from "intlayer";
551
+
552
+ conditionalContent: cond({
553
+ true: "User is logged in",
554
+ false: "Please log in to continue",
555
+ });
556
+ ```
557
+
558
+ ### Contenuto Enumerato (`enu`)
559
+
560
+ Contenuto che varia in base a valori enumerati:
561
+
562
+ ```typescript
563
+ import { enu } from "intlayer";
564
+
565
+ statusContent: enu({
566
+ pending: "La tua richiesta è in sospeso",
567
+ approved: "La tua richiesta è stata approvata",
568
+ rejected: "La tua richiesta è stata rifiutata",
569
+ });
570
+ ```
571
+
572
+ ### Contenuto di Inserimento (`insert`)
573
+
574
+ Contenuto che può essere inserito in altri contenuti:
575
+
576
+ ```typescript
577
+ import { insert } from "intlayer";
578
+
579
+ insertionContent: insert("Questo testo può essere inserito ovunque");
580
+ ```
581
+
582
+ ### Contenuto Nidificato (`nest`)
583
+
584
+ Riferimenti ad altri dizionari:
585
+
586
+ ```typescript
587
+ import { nest } from "intlayer";
588
+
589
+ nestedContent: nest("about-page");
590
+ ```
591
+
592
+ ### Contenuto Markdown (`md`)
593
+
594
+ Contenuto di testo ricco in formato Markdown:
595
+
596
+ ```typescript
597
+ import { md } from "intlayer";
598
+
599
+ markdownContent: md(
600
+ "# Benvenuto\n\nQuesto è un testo in **grassetto** con [link](https://example.com)"
601
+ );
602
+ ```
603
+
604
+ ### Contenuto per Genere (`gender`)
605
+
606
+ Contenuto che varia in base al genere:
607
+
608
+ ```typescript
609
+ import { gender } from "intlayer";
610
+
611
+ genderContent: gender({
612
+ male: "Lui è uno sviluppatore",
613
+ female: "Lei è una sviluppatrice",
614
+ other: "Loro sono sviluppatori",
615
+ });
616
+ ```
617
+
618
+ ### Contenuto da File (`file`)
619
+
620
+ Riferimenti a file esterni:
621
+
622
+ ```typescript
623
+ import { file } from "intlayer";
624
+
625
+ fileContent: file("./path/to/content.txt");
626
+ ```
627
+
628
+ ## Creazione di File di Contenuto
629
+
630
+ ### Struttura Base di un File di Contenuto
631
+
632
+ Un file di contenuto esporta un oggetto di default che soddisfa il tipo `Dictionary`:
633
+
634
+ ```typescript
635
+ // example.content.ts
636
+ import { t, cond, nest, md, insert, file } from "intlayer";
637
+
638
+ export default {
639
+ key: "welcome-page",
640
+ title: "Contenuto della Pagina di Benvenuto",
641
+ description:
642
+ "Contenuto per la pagina principale di benvenuto, inclusa la sezione hero e le funzionalità",
643
+ tags: ["pagina", "benvenuto", "homepage"],
644
+ content: {
645
+ hero: {
646
+ title: t({
647
+ en: "Welcome to Our Platform",
648
+ fr: "Bienvenue sur Notre Plateforme",
649
+ es: "Bienvenido a Nuestra Plataforma",
650
+ }),
651
+ subtitle: t({
652
+ en: "Build amazing applications with ease",
653
+ fr: "Construisez des applications incroyables avec facilité",
654
+ es: "Construye aplicaciones increíbles con facilidad",
655
+ }),
656
+ cta: cond({
657
+ true: t({
658
+ en: "Get Started",
659
+ fr: "Commencer",
660
+ es: "Comenzar",
661
+ }),
662
+ false: t({
663
+ en: "Sign Up",
664
+ fr: "S'inscrire",
665
+ es: "Registrarse",
666
+ }),
667
+ }),
668
+ },
669
+ features: [
670
+ {
671
+ title: t({
672
+ it: "Facile da Usare",
673
+ en: "Easy to Use",
674
+ fr: "Facile à Utiliser",
675
+ es: "Fácil de Usar",
676
+ }),
677
+ description: t({
678
+ it: "Interfaccia intuitiva per tutti i livelli di abilità",
679
+ en: "Intuitive interface for all skill levels",
680
+ fr: "Interface intuitive pour tous les niveaux",
681
+ es: "Interfaz intuitiva para todos los niveles",
682
+ }),
683
+ },
684
+ ],
685
+ documentation: nest("documentation"),
686
+ readme: file("./README.md"),
687
+ },
688
+ } satisfies Dictionary;
689
+ ```
690
+
691
+ ### File di Contenuto JSON
692
+
693
+ Puoi anche creare file di contenuto in formato JSON:
694
+
695
+ ```json
696
+ {
697
+ "key": "welcome-page",
698
+ "title": "Contenuto della Pagina di Benvenuto",
699
+ "description": "Contenuto per la pagina principale di benvenuto",
700
+ "tags": ["pagina", "benvenuto"],
701
+ "content": {
702
+ "hero": {
703
+ "title": {
704
+ "nodeType": "translation",
705
+ "translation": {
706
+ "en": "Benvenuto sulla nostra piattaforma",
707
+ "fr": "Bienvenue sur Notre Plateforme"
708
+ }
709
+ },
710
+ "subtitle": {
711
+ "nodeType": "translation",
712
+ "translation": {
713
+ "en": "Crea applicazioni straordinarie con facilità",
714
+ "fr": "Construisez des applications incroyables avec facilité"
715
+ }
716
+ }
717
+ }
718
+ }
719
+ }
720
+ ```
721
+
722
+ ### File di Contenuto per Locale
723
+
724
+ Per dizionari per locale, specifica la proprietà `locale`:
725
+
726
+ ```typescript
727
+ // welcome-page.en.content.ts
728
+ export default {
729
+ key: "welcome-page",
730
+ locale: "en",
731
+ content: {
732
+ hero: {
733
+ title: "Benvenuto sulla nostra piattaforma",
734
+ subtitle: "Crea applicazioni straordinarie con facilità",
735
+ },
736
+ },
737
+ } satisfies Dictionary;
738
+ ```
739
+
740
+ ```typescript
741
+ // welcome-page.fr.content.ts
742
+ export default {
743
+ key: "welcome-page",
744
+ locale: "fr",
745
+ content: {
746
+ hero: {
747
+ title: "Bienvenue sur Notre Plateforme",
748
+ subtitle: "Construisez des applications incroyables avec facilité",
749
+ },
750
+ },
751
+ } satisfies Dictionary;
752
+ ```
753
+
754
+ ## Estensioni dei File di Contenuto
755
+
756
+ Intlayer consente di personalizzare le estensioni per i file di dichiarazione del contenuto. Questa personalizzazione offre flessibilità nella gestione di progetti su larga scala e aiuta a evitare conflitti con altri moduli.
757
+
758
+ ### Estensioni Predefinite
759
+
760
+ Per impostazione predefinita, Intlayer monitora tutti i file con le seguenti estensioni per le dichiarazioni di contenuto:
761
+
762
+ - `.content.json`
763
+ - `.content.ts`
764
+ - `.content.tsx`
765
+ - `.content.js`
766
+ - `.content.jsx`
767
+ - `.content.mjs`
768
+ - `.content.mjx`
769
+ - `.content.cjs`
770
+ - `.content.cjx`
771
+
772
+ Queste estensioni predefinite sono adatte alla maggior parte delle applicazioni. Tuttavia, quando si hanno esigenze specifiche, è possibile definire estensioni personalizzate per semplificare il processo di build e ridurre il rischio di conflitti con altri componenti.
773
+
774
+ > Per personalizzare le estensioni dei file che Intlayer utilizza per identificare i file di dichiarazione dei contenuti, è possibile specificarle nel file di configurazione di Intlayer. Questo approccio è utile per progetti su larga scala in cui limitare l'ambito del processo di watch migliora le prestazioni della build.
775
+
776
+ ## Concetti Avanzati
777
+
778
+ ### Fusione dei Dizionari
779
+
780
+ Quando più dizionari hanno la stessa chiave, Intlayer li unisce automaticamente. Il comportamento della fusione dipende da diversi fattori:
781
+
782
+ - **Priorità**: I dizionari con valori di `priority` più alti sovrascrivono quelli con valori più bassi
783
+ - **Auto-fill vs Base**: I dizionari base sovrascrivono i dizionari auto-compilati
784
+ - **Posizione**: I dizionari locali sovrascrivono i dizionari remoti (quando le priorità sono uguali)
785
+
786
+ ### Sicurezza dei Tipi
787
+
788
+ Intlayer fornisce pieno supporto TypeScript per i file di contenuto:
789
+
790
+ ```typescript
791
+ // Definisci il tipo del tuo contenuto
792
+ interface WelcomePageContent {
793
+ hero: {
794
+ title: string;
795
+ subtitle: string;
796
+ cta: string;
797
+ };
798
+ features: Array<{
799
+ title: string;
800
+ description: string;
801
+ }>;
802
+ }
803
+
804
+ // Usalo nel tuo dizionario
805
+ export default {
806
+ key: "welcome-page",
807
+ content: {
808
+ // TypeScript fornirà completamento automatico e controllo dei tipi
809
+ hero: {
810
+ title: "Benvenuto",
811
+ subtitle: "Crea app straordinarie",
812
+ cta: "Inizia ora",
813
+ },
814
+ },
815
+ } satisfies Dictionary<WelcomePageContent>;
816
+ ```
817
+
818
+ ### Imbricazione di Nodi
819
+
820
+ Puoi senza problemi imbricare funzioni dentro altre funzioni.
821
+
822
+ Esempio :
823
+
824
+ ```javascript fileName="src/example.content.tsx" contentDeclarationFormat="typescript"
825
+ import { t, enu, cond, nest, md, type Dictionary } from "intlayer";
826
+
827
+ const getName = async () => "John Doe";
828
+
829
+ export default {
830
+ key: "page",
831
+ content: {
832
+ // `getIntlayer('page','en').hiMessage` restituisce `['Hi', ' ', 'John Doe']`
833
+ hiMessage: [
834
+ t({
835
+ en: "Hi",
836
+ fr: "Salut",
837
+ es: "Hola",
838
+ }),
839
+ " ",
840
+ getName(),
841
+ ],
842
+ // Contenuto composito che imbrica condizione, enumerazione e contenuto multilingue
843
+ // `getIntlayer('page','en').advancedContent(true)(10)` restituisce 'Multiple items found'
844
+ advancedContent: cond({
845
+ true: enu({
846
+ "0": t({
847
+ en: "No items found",
848
+ fr: "Aucun article trouvé",
849
+ es: "No se encontraron artículos",
850
+ }),
851
+ "1": t({
852
+ en: "One item found",
853
+ fr: "Un article trouvé",
854
+ es: "Se encontró un artículo",
855
+ }),
856
+ ">1": t({
857
+ en: "Multiple items found",
858
+ fr: "Plusieurs articles trouvés",
859
+ es: "Se encontraron múltiples artículos",
860
+ }),
861
+ }),
862
+ false: t({
863
+ en: "No valid data available",
864
+ fr: "Aucune donnée valide disponible",
865
+ es: "No hay datos válidos disponibles",
866
+ }),
867
+ }),
868
+ },
869
+ } satisfies Dictionary;
870
+ ```
871
+
872
+ ```javascript fileName="src/example.content.mjx" contentDeclarationFormat="esm"
873
+ import { t, enu, cond, nest, md } from "intlayer";
874
+
875
+ const getName = async () => "John Doe";
876
+
877
+ /** @type {import('intlayer').Dictionary} */
878
+ export default {
879
+ key: "page",
880
+ content: {
881
+ // `getIntlayer('page','en').hiMessage` restituisce `['Hi', ' ', 'John Doe']`
882
+ hiMessage: [
883
+ t({
884
+ en: "Hi",
885
+ fr: "Salut",
886
+ es: "Hola",
887
+ }),
888
+ " ",
889
+ getName(),
890
+ ],
891
+ // Contenuto composito che combina condizione, enumerazione e contenuto multilingue
892
+ // `getIntlayer('page','en').advancedContent(true)(10)` restituisce 'Multiple items found'
893
+ advancedContent: cond({
894
+ true: enu({
895
+ "0": t({
896
+ en: "No items found",
897
+ fr: "Aucun article trouvé",
898
+ es: "No se encontraron artículos",
899
+ }),
900
+ "1": t({
901
+ en: "One item found",
902
+ fr: "Un article trouvé",
903
+ es: "Se encontró un artículo",
904
+ }),
905
+ ">1": t({
906
+ en: "Multiple items found",
907
+ fr: "Plusieurs articles trouvés",
908
+ es: "Se encontraron múltiples artículos",
909
+ }),
910
+ }),
911
+ false: t({
912
+ en: "No valid data available",
913
+ fr: "Aucune donnée valide disponible",
914
+ es: "No hay datos válidos disponibles",
915
+ }),
916
+ }),
917
+ },
918
+ };
919
+ ```
920
+
921
+ ```javascript fileName="src/example.content.cjx" contentDeclarationFormat="commonjs"
922
+ const { t, enu, cond, nest, md } = require("intlayer");
923
+
924
+ const getName = async () => "John Doe";
925
+
926
+ /** @type {import('intlayer').Dictionary} */
927
+ module.exports = {
928
+ key: "page",
929
+ content: {
930
+ // `getIntlayer('page','en').hiMessage` restituisce `['Ciao', ' ', 'John Doe']`
931
+ hiMessage: [
932
+ t({
933
+ en: "Hi",
934
+ fr: "Salut",
935
+ es: "Hola",
936
+ }),
937
+ " ",
938
+ getName(),
939
+ ],
940
+ // Contenuto composito che combina condizione, enumerazione e contenuto multilingue
941
+ // `getIntlayer('page','en').advancedContent(true)(10) restituisce 'Multiple items found'`
942
+ advancedContent: cond({
943
+ true: enu({
944
+ "0": t({
945
+ en: "No items found",
946
+ fr: "Aucun article trouvé",
947
+ es: "No se encontraron artículos",
948
+ }),
949
+ "1": t({
950
+ en: "One item found",
951
+ fr: "Un article trouvé",
952
+ es: "Se encontró un artículo",
953
+ }),
954
+ ">1": t({
955
+ en: "Multiple items found",
956
+ fr: "Plusieurs articles trouvés",
957
+ es: "Se encontraron múltiples artículos",
958
+ }),
959
+ }),
960
+ false: t({
961
+ en: "No valid data available",
962
+ fr: "Aucune donnée valide disponible",
963
+ es: "No hay datos válidos disponibles",
964
+ }),
965
+ }),
966
+ },
967
+ };
968
+ ```
969
+
970
+ ```json5 fileName="src/example.content.json" contentDeclarationFormat="json"
971
+ {
972
+ "$schema": "https://intlayer.org/schema.json",
973
+ "key": "page",
974
+ "content": {
975
+ "hiMessage": {
976
+ "nodeType": "composite",
977
+ "composite": [
978
+ {
979
+ "nodeType": "translation",
980
+ "translation": {
981
+ en: "Ciao", // Saluto in italiano
982
+ fr: "Salut",
983
+ es: "Hola",
984
+ },
985
+ },
986
+ " ",
987
+ "John Doe",
988
+ ],
989
+ },
990
+ "advancedContent": {
991
+ "nodeType": "condition",
992
+ "condition": {
993
+ true: {
994
+ nodeType: "enumeration",
995
+ enumeration: {
996
+ "0": {
997
+ "nodeType": "translation",
998
+ "translation": {
999
+ "en": "No items found",
1000
+ "fr": "Aucun article trouvé",
1001
+ "es": "No se encontraron artículos",
1002
+ "it": "Nessun elemento trovato",
1003
+ },
1004
+ },
1005
+ "1": {
1006
+ "nodeType": "translation",
1007
+ "translation": {
1008
+ "en": "One item found",
1009
+ "fr": "Un article trouvé",
1010
+ "es": "Se encontró un artículo",
1011
+ "it": "Un elemento trovato",
1012
+ },
1013
+ },
1014
+ ">1": {
1015
+ "nodeType": "translation",
1016
+ "translation": {
1017
+ "en": "Multiple items found",
1018
+ "fr": "Plusieurs articles trouvés",
1019
+ "es": "Se encontraron múltiples artículos",
1020
+ "it": "Più elementi trovati",
1021
+ },
1022
+ },
1023
+ },
1024
+ },
1025
+ "false": {
1026
+ "nodeType": "translation",
1027
+ "translation": {
1028
+ "en": "Nessun dato valido disponibile",
1029
+ "fr": "Aucune donnée valide disponible",
1030
+ "es": "No hay datos válidos disponibles",
1031
+ },
1032
+ },
1033
+ },
1034
+ },
1035
+ },
1036
+ }
1037
+ ```
1038
+
1039
+ ### Best Practices
1040
+
1041
+ 1. **Convenzioni di denominazione**:
1042
+ - Usa il kebab-case per le chiavi del dizionario (`"about-page-meta"`)
1043
+ - Raggruppa i contenuti correlati sotto lo stesso prefisso di chiave
1044
+
1045
+ 2. **Organizzazione dei contenuti**:
1046
+ - Mantieni insieme i contenuti correlati nello stesso dizionario
1047
+ - Usa oggetti annidati per organizzare strutture di contenuto complesse
1048
+ - Sfrutta i tag per la categorizzazione
1049
+ - Usa `autoFill` per compilare automaticamente le traduzioni mancanti
1050
+
1051
+ 3. **Prestazioni**:
1052
+ - Regola la configurazione dei contenuti per limitare l'ambito dei file monitorati
1053
+ - Usa dizionari live solo quando sono necessari aggiornamenti in tempo reale (ad esempio A/B testing, ecc.)
1054
+ - Assicurati che il plugin di trasformazione alla build (`@intlayer/swc` o `@intlayer/babel`) sia abilitato per ottimizzare il dizionario durante la build
1055
+
1056
+ ## Cronologia della Documentazione
1057
+
1058
+ | Versione | Data | Modifiche |
1059
+ | -------- | ---------- | --------------------------------- |
1060
+ | 6.0.0 | 2025-09-20 | Aggiunta documentazione dei campi |
1061
+ | 5.5.10 | 2025-06-29 | Inizio cronologia |