@intlayer/docs 5.8.1 → 6.0.0-canary.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (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,1088 @@
1
+ ---
2
+ createdAt: 2025-02-07
3
+ updatedAt: 2025-09-20
4
+ title: Archivo de Contenido
5
+ description: Aprende a personalizar las extensiones para tus archivos de declaración de contenido. Sigue esta documentación para implementar condiciones de manera eficiente en tu proyecto.
6
+ keywords:
7
+ - Archivo de Contenido
8
+ - Documentación
9
+ - Intlayer
10
+ slugs:
11
+ - doc
12
+ - concept
13
+ - content
14
+ ---
15
+
16
+ # Archivo de Contenido
17
+
18
+ <iframe title="i18n, Markdown, JSON… una única solución para gestionarlo todo | 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
+ ## ¿Qué es un Archivo de Contenido?
21
+
22
+ Un archivo de contenido en Intlayer es un archivo que contiene definiciones de diccionarios.
23
+ Estos archivos declaran el contenido de texto de tu aplicación, traducciones y recursos.
24
+ Los archivos de contenido son procesados por Intlayer para generar diccionarios.
25
+
26
+ Los diccionarios serán el resultado final que tu aplicación importará usando el hook `useIntlayer`.
27
+
28
+ ### Conceptos Clave
29
+
30
+ #### Diccionario
31
+
32
+ Un diccionario es una colección estructurada de contenido organizada por claves. Cada diccionario contiene:
33
+
34
+ - **Clave**: Un identificador único para el diccionario
35
+ - **Contenido**: Los valores reales del contenido (texto, números, objetos, etc.)
36
+ - **Metadatos**: Información adicional como título, descripción, etiquetas, etc.
37
+
38
+ #### Archivo de Contenido
39
+
40
+ Ejemplo de archivo de contenido:
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: "Hola Mundo",
81
+ numberContent: 123,
82
+ booleanContent: true,
83
+ javaScriptContent: `${process.env.NODE_ENV}`,
84
+ },
85
+ },
86
+ multilingualContent: t({
87
+ en: "English content",
88
+ "en-GB": "English content (UK)",
89
+ fr: "French content",
90
+ es: "Contenido en español",
91
+ }),
92
+ quantityContent: enu({
93
+ "<-1": "Menos de menos un coche",
94
+ "-1": "Menos un coche",
95
+ "0": "Sin coches",
96
+ "1": "Un coche",
97
+ ">5": "Algunos coches",
98
+ ">19": "Muchos coches",
99
+ }),
100
+ conditionalContent: cond({
101
+ true: "La validación está habilitada",
102
+ false: "La validación está deshabilitada",
103
+ }),
104
+ insertionContent: insert("¡Hola {{name}}!"),
105
+ nestedContent: nest(
106
+ "navbar", // La clave del diccionario para anidar
107
+ "login.button" // [Opcional] La ruta al contenido para anidar
108
+ ),
109
+ fileContent: file("./path/to/file.txt"),
110
+ externalContent: fetch("https://example.com").then((res) => res.json()),
111
+ markdownContent: md("# Ejemplo de Markdown"),
112
+
113
+ /*
114
+ * Solo disponible usando `react-intlayer` o `next-intlayer`
115
+ */
116
+ jsxContent: <h1>Mi título</h1>,
117
+ },
118
+ } satisfies Dictionary<Content>; // [opcional] Dictionary es genérico y te permite reforzar el formato de tu diccionario
119
+ ```
120
+
121
+ ```javascript fileName="src/example.content.mjx" contentDeclarationFormat="esm"
122
+ import { t, enu, cond, nest, md, insert, file } from "intlayer";
123
+
124
+ /** @type {import('intlayer').Dictionary} */
125
+ export default {
126
+ key: "page",
127
+ content: {
128
+ imbricatedContent: {
129
+ imbricatedContent2: {
130
+ stringContent: "Hello World",
131
+ numberContent: 123,
132
+ booleanContent: true,
133
+ javaScriptContent: `${process.env.NODE_ENV}`,
134
+ },
135
+ imbricatedArray: [1, 2, 3],
136
+ },
137
+ multilingualContent: t({
138
+ en: "English content",
139
+ "en-GB": "English content (UK)",
140
+ fr: "Contenido en francés",
141
+ es: "Contenido en español",
142
+ }),
143
+ quantityContent: enu({
144
+ "<-1": "Menos de menos un coche",
145
+ "-1": "Menos un coche",
146
+ "0": "Sin coches",
147
+ "1": "Un coche",
148
+ ">5": "Algunos coches",
149
+ ">19": "Muchos coches",
150
+ }),
151
+ conditionalContent: cond({
152
+ true: "La validación está habilitada",
153
+ false: "La validación está deshabilitada",
154
+ }),
155
+ insertionContent: insert("¡Hola {{name}}!"),
156
+ nestedContent: nest(
157
+ "navbar", // La clave del diccionario para anidar
158
+ "login.button" // [Opcional] La ruta al contenido para anidar
159
+ ),
160
+ markdownContent: md("# Ejemplo de Markdown"),
161
+ fileContent: file("./path/to/file.txt"),
162
+ externalContent: fetch("https://example.com").then((res) => res.json())
163
+
164
+ // Solo disponible usando `react-intlayer` o `next-intlayer`
165
+ jsxContent: <h1>Mi título</h1>,
166
+ },
167
+ };
168
+ ```
169
+
170
+ ```javascript fileName="src/example.content.cjx" contentDeclarationFormat="commonjs"
171
+ const { t, enu, cond, nest, md, insert, file } = require("intlayer");
172
+
173
+ /** @type {import('intlayer').Dictionary} */
174
+ module.exports = {
175
+ key: "page",
176
+ content: {
177
+ imbricatedContent: {
178
+ imbricatedContent2: {
179
+ stringContent: "Hola Mundo",
180
+ numberContent: 123,
181
+ booleanContent: true,
182
+ javaScriptContent: `${process.env.NODE_ENV}`,
183
+ },
184
+ imbricatedArray: [1, 2, 3],
185
+ },
186
+ multilingualContent: t({
187
+ es: "Contenido en español",
188
+ en: "English content",
189
+ "en-GB": "English content (UK)",
190
+ fr: "French content",
191
+ }),
192
+ quantityContent: enu({
193
+ "<-1": "Menos de menos un coche",
194
+ "-1": "Menos un coche",
195
+ "0": "Ningún coche",
196
+ "1": "Un coche",
197
+ ">5": "Algunos coches",
198
+ ">19": "Muchos coches",
199
+ }),
200
+ conditionalContent: cond({
201
+ true: "La validación está habilitada",
202
+ false: "La validación está deshabilitada",
203
+ }),
204
+ insertionContent: insert("¡Hola {{name}}!"),
205
+ nestedContent: nest(
206
+ "navbar", // La clave del diccionario para anidar
207
+ "login.button" // [Opcional] La ruta al contenido para anidar
208
+ ),
209
+ markdownContent: md("# Ejemplo de Markdown"),
210
+ fileContent: file("./path/to/file.txt"),
211
+ externalContent: fetch("https://example.com").then((res) => res.json())
212
+
213
+ // Solo disponible usando `react-intlayer` o `next-intlayer`
214
+ jsxContent: <h1>Mi título</h1>,
215
+ },
216
+ };
217
+ ```
218
+
219
+ ```json5 fileName="src/example.content.json" contentDeclarationFormat="json"
220
+ {
221
+ "$schema": "https://intlayer.org/schema.json",
222
+ "key": "page",
223
+ "content": {
224
+ "imbricatedContent": {
225
+ "imbricatedContent2": {
226
+ "stringContent": "Hola Mundo",
227
+ "numberContent": 123,
228
+ "booleanContent": true,
229
+ },
230
+ "imbricatedArray": [1, 2, 3],
231
+ },
232
+ "multilingualContent": {
233
+ "nodeType": "translation",
234
+ "translation": {
235
+ "en": "English content",
236
+ "en-GB": "English content (UK)",
237
+ "fr": "French content",
238
+ "es": "Spanish content",
239
+ },
240
+ },
241
+ "quantityContent": {
242
+ "nodeType": "enumeración",
243
+ "enumeration": {
244
+ "0": "Sin coches",
245
+ "1": "Un coche",
246
+ "<-1": "Menos que menos un coche",
247
+ "-1": "Menos un coche",
248
+ ">5": "Algunos coches",
249
+ ">19": "Muchos coches",
250
+ },
251
+ },
252
+ "conditionalContent": {
253
+ "nodeType": "condición",
254
+ "condition": {
255
+ "true": "La validación está habilitada",
256
+ "false": "La validación está deshabilitada",
257
+ },
258
+ },
259
+ "insertionContent": {
260
+ "nodeType": "inserción",
261
+ "insertion": "¡Hola {{name}}!",
262
+ },
263
+ "nestedContent": {
264
+ "nodeType": "anidado",
265
+ "nested": { "dictionaryKey": "app" },
266
+ },
267
+ "markdownContent": {
268
+ "nodeType": "markdown",
269
+ "markdown": "# Ejemplo de Markdown",
270
+ },
271
+ "fileContent": {
272
+ "nodeType": "archivo",
273
+ "file": "./path/to/file.txt",
274
+ },
275
+ "jsxContent": {
276
+ "type": "h1",
277
+ "key": null,
278
+ "ref": null,
279
+ "props": {
280
+ "children": ["Mi título"],
281
+ },
282
+ },
283
+ },
284
+ }
285
+ ```
286
+
287
+ #### Nodos de Contenido
288
+
289
+ Los nodos de contenido son los bloques de construcción del contenido del diccionario. Pueden ser:
290
+
291
+ - **Valores primitivos**: cadenas, números, booleanos, null, undefined
292
+ - **Nodos tipados**: Tipos especiales de contenido como traducciones, condiciones, markdown, etc.
293
+ - **Funciones**: Contenido dinámico que puede evaluarse en tiempo de ejecución [ver Obtención de Funciones](https://github.com/aymericzip/intlayer/blob/main/docs/docs/es/dictionary/function_fetching.md)
294
+ - **Contenido anidado**: Referencias a otros diccionarios
295
+
296
+ #### Tipos de Contenido
297
+
298
+ Intlayer soporta varios tipos de contenido a través de nodos tipados:
299
+
300
+ - **Contenido de Traducción**: Texto multilingüe con valores específicos por localidad [ver Contenido de Traducción](https://github.com/aymericzip/intlayer/blob/main/docs/docs/es/dictionary/translation_content.md)
301
+ - **Contenido Condicional**: Contenido condicional basado en expresiones booleanas [ver Contenido Condicional](https://github.com/aymericzip/intlayer/blob/main/docs/docs/es/dictionary/condition_content.md)
302
+ - **Contenido de Enumeración**: Contenido que varía según valores enumerados [ver Contenido de Enumeración](https://github.com/aymericzip/intlayer/blob/main/docs/docs/es/dictionary/enumeration_content.md)
303
+ - **Contenido de Inserción**: Contenido que puede ser insertado en otro contenido [ver Contenido de Inserción](https://github.com/aymericzip/intlayer/blob/main/docs/docs/es/dictionary/insertion_content.md)
304
+
305
+ - **Contenido Markdown**: Contenido de texto enriquecido en formato Markdown [ver Contenido Markdown](https://github.com/aymericzip/intlayer/blob/main/docs/docs/es/dictionary/markdown_content.md)
306
+ - **Contenido Anidado**: Referencias a otros diccionarios [ver Contenido Anidado](https://github.com/aymericzip/intlayer/blob/main/docs/docs/es/dictionary/nested_content.md)
307
+ - **Contenido de Género**: Contenido que varía según el género [ver Contenido de Género](https://github.com/aymericzip/intlayer/blob/main/docs/docs/es/dictionary/gender_content.md)
308
+ - **Contenido de Archivo**: Referencias a archivos externos [ver Contenido de Archivo](https://github.com/aymericzip/intlayer/blob/main/docs/docs/es/dictionary/file_content.md)
309
+
310
+ ## Estructura del Diccionario
311
+
312
+ Un diccionario en Intlayer se define mediante el tipo `Dictionary` y contiene varias propiedades que controlan su comportamiento:
313
+
314
+ ### Propiedades Requeridas
315
+
316
+ #### `key` (string)
317
+
318
+ El identificador del diccionario. Si varios diccionarios tienen la misma clave, Intlayer los fusionará automáticamente.
319
+
320
+ > Use la convención de nomenclatura kebab-case (por ejemplo, `"about-page-meta"`).
321
+
322
+ #### Content (string | number | boolean | object | array | function)
323
+
324
+ La propiedad `content` contiene los datos reales del diccionario y soporta:
325
+
326
+ - **Valores primitivos**: cadenas, números, booleanos, null, undefined
327
+ - **Nodos tipados**: Tipos de contenido especiales usando las funciones auxiliares de Intlayer
328
+ - **Objetos anidados**: Estructuras de datos complejas
329
+ - **Arrays**: Colecciones de contenido
330
+ - **Funciones**: Evaluación dinámica de contenido
331
+
332
+ ### Propiedades Opcionales
333
+
334
+ #### `title` (string)
335
+
336
+ Título legible para humanos del diccionario que ayuda a identificarlo en editores y sistemas CMS. Esto es particularmente útil cuando se gestionan grandes cantidades de diccionarios o cuando se trabaja con interfaces de gestión de contenido.
337
+
338
+ **Ejemplo:**
339
+
340
+ ```typescript
341
+ {
342
+ key: "about-page-meta",
343
+ title: "Metadatos de la Página Acerca de",
344
+ content: { /* ... */ }
345
+ }
346
+ ```
347
+
348
+ #### `description` (string)
349
+
350
+ Descripción detallada que explica el propósito del diccionario, las pautas de uso y cualquier consideración especial. Esta descripción también se utiliza como contexto para la generación de traducciones asistida por IA, lo que la hace valiosa para mantener la calidad y consistencia de las traducciones.
351
+
352
+ **Ejemplo:**
353
+
354
+ ```typescript
355
+ {
356
+ key: "about-page-meta",
357
+ description: [
358
+ "Este diccionario gestiona los metadatos de la Página Acerca de",
359
+ "Considera buenas prácticas para SEO:",
360
+ "- El título debe tener entre 50 y 60 caracteres",
361
+ "- La descripción debe tener entre 150 y 160 caracteres",
362
+ ].join('\n'),
363
+ content: { /* ... */ }
364
+ }
365
+ ```
366
+
367
+ #### `tags` (string[])
368
+
369
+ Array de cadenas para categorizar y organizar diccionarios. Las etiquetas proporcionan contexto adicional y pueden usarse para filtrar, buscar u organizar diccionarios en editores y sistemas CMS.
370
+
371
+ **Ejemplo:**
372
+
373
+ ```typescript
374
+ {
375
+ key: "about-page-meta",
376
+ tags: ["metadata", "about-page", "seo"],
377
+ content: { /* ... */ }
378
+ }
379
+ ```
380
+
381
+ #### `locale` (LocalesValues)
382
+
383
+ Transforma el diccionario en un diccionario por localización donde cada campo declarado en el contenido se transformará automáticamente en un nodo de traducción. Cuando esta propiedad está establecida:
384
+
385
+ - El diccionario se trata como un diccionario de un solo idioma
386
+ - Cada campo se convierte en un nodo de traducción para ese idioma específico
387
+ - NO debes usar nodos de traducción (`t()`) en el contenido cuando uses esta propiedad
388
+ - Si falta, el diccionario se tratará como un diccionario multilingüe
389
+
390
+ > Consulta [Declaración de contenido por idioma en Intlayer](https://github.com/aymericzip/intlayer/blob/main/docs/docs/es/per_locale_file.md) para más información.
391
+
392
+ **Ejemplo:**
393
+
394
+ ```json
395
+ // Diccionario por idioma
396
+ {
397
+ "key": "about-page",
398
+ "locale": "en",
399
+ "content": {
400
+ "title": "About Us", // Esto se convierte en un nodo de traducción para 'en'
401
+ "description": "Learn more about our company"
402
+ }
403
+ }
404
+ ```
405
+
406
+ #### `autoFill` (AutoFill)
407
+
408
+ Instrucciones para rellenar automáticamente el contenido del diccionario desde fuentes externas. Esto puede configurarse globalmente en `intlayer.config.ts` o por diccionario. Soporta múltiples formatos:
409
+
410
+ - **`true`**: Habilita el auto-relleno para todas las locales
411
+ - **`string`**: Ruta a un solo archivo o plantilla con variables
412
+ - **`object`**: Rutas de archivos por localización
413
+
414
+ **Ejemplos:**
415
+
416
+ ```json
417
+ // Habilitar para todas las locales
418
+ {
419
+ "autoFill": true
420
+ }
421
+ // Archivo único
422
+ {
423
+ "autoFill": "./translations/aboutPage.content.json"
424
+ }
425
+ // Plantilla con variables
426
+ {
427
+ "autoFill": "/messages/{{locale}}/{{key}}/{{fileName}}.content.json"
428
+ }
429
+ // Configuración detallada por localización
430
+ {
431
+ "autoFill": {
432
+ "en": "./translations/en/aboutPage.content.json",
433
+ "fr": "./translations/fr/aboutPage.content.json",
434
+ "es": "./translations/es/aboutPage.content.json"
435
+ }
436
+ }
437
+ ```
438
+
439
+ **Variables disponibles:**
440
+
441
+ - `{{locale}}` – Código de la localización (por ejemplo, `fr`, `es`)
442
+ - `{{fileName}}` – Nombre del archivo (por ejemplo, `example`)
443
+ - `{{key}}` – Clave del diccionario (por ejemplo, `example`)
444
+
445
+ > Consulta [Configuración de Auto-Relleno en Intlayer](https://github.com/aymericzip/intlayer/blob/main/docs/docs/es/autoFill.md) para más información.
446
+
447
+ ##### `priority` (número)
448
+
449
+ Indica la prioridad del diccionario para la resolución de conflictos. Cuando varios diccionarios tienen la misma clave, el diccionario con el número de prioridad más alto sobrescribirá a los demás. Esto es útil para gestionar jerarquías de contenido y sobreescrituras.
450
+
451
+ **Ejemplo:**
452
+
453
+ ```typescript
454
+ // Diccionario base
455
+ {
456
+ key: "welcome-message",
457
+ priority: 1,
458
+ content: { message: "¡Bienvenido!" }
459
+ }
460
+
461
+ // Diccionario de sobreescritura
462
+ {
463
+ key: "welcome-message",
464
+ priority: 10,
465
+ content: { message: "¡Bienvenido a nuestro servicio premium!" }
466
+ }
467
+ // Esto anulará el diccionario base
468
+ ```
469
+
470
+ ### Propiedades del CMS
471
+
472
+ ##### `version` (cadena)
473
+
474
+ Identificador de versión para diccionarios remotos. Ayuda a rastrear qué versión del diccionario se está utilizando actualmente, especialmente útil cuando se trabaja con sistemas de gestión de contenido remotos.
475
+
476
+ ##### `live` (booleano)
477
+
478
+ Para diccionarios remotos, indica si el diccionario debe obtenerse en vivo en tiempo de ejecución. Cuando está habilitado:
479
+
480
+ - Requiere que `importMode` esté configurado como "live" en `intlayer.config.ts`
481
+ - Requiere que un servidor en vivo esté en ejecución
482
+ - El diccionario se obtendrá en tiempo de ejecución usando la API de sincronización en vivo
483
+ - Si está en vivo pero la obtención falla, se recurre al valor dinámico
484
+ - Si no está en vivo, el diccionario se transforma en tiempo de compilación para un rendimiento óptimo
485
+
486
+ ### Propiedades del Sistema (Generadas automáticamente)
487
+
488
+ Estas propiedades son generadas automáticamente por Intlayer y no deben ser modificadas manualmente:
489
+
490
+ ##### `$schema` (string)
491
+
492
+ Esquema JSON utilizado para la validación de la estructura del diccionario. Añadido automáticamente por Intlayer para asegurar la integridad del diccionario.
493
+
494
+ ##### `id` (string)
495
+
496
+ Para diccionarios remotos, este es el identificador único del diccionario en el servidor remoto. Se usa para obtener y gestionar contenido remoto.
497
+
498
+ ##### `localId` (LocalDictionaryId)
499
+
500
+ Identificador único para diccionarios locales. Generado automáticamente por Intlayer para ayudar a identificar el diccionario y determinar si es local o remoto, junto con su ubicación.
501
+
502
+ ##### `localIds` (LocalDictionaryId[])
503
+
504
+ Para diccionarios fusionados, este arreglo contiene los IDs de todos los diccionarios que fueron fusionados juntos. Útil para rastrear la fuente del contenido fusionado.
505
+
506
+ ##### `filePath` (string)
507
+
508
+ La ruta del archivo del diccionario local, indicando de qué archivo `.content` se generó el diccionario. Ayuda con la depuración y el seguimiento de la fuente.
509
+
510
+ ##### `versions` (string[])
511
+
512
+ Para diccionarios remotos, este arreglo contiene todas las versiones disponibles del diccionario. Ayuda a rastrear qué versiones están disponibles para su uso.
513
+
514
+ ##### `autoFilled` (true)
515
+
516
+ Indica si el diccionario ha sido auto-rellenado desde fuentes externas. En caso de conflictos, los diccionarios base sobrescribirán a los diccionarios auto-rellenados.
517
+
518
+ ##### `location` ('distant' | 'locale')
519
+
520
+ Indica la ubicación del diccionario:
521
+
522
+ - `'locale'`: Diccionario local (proveniente de archivos de contenido)
523
+ - `'distant'`: Diccionario remoto (proveniente de una fuente externa)
524
+
525
+ ## Tipos de Nodos de Contenido
526
+
527
+ Intlayer proporciona varios tipos especializados de nodos de contenido que extienden los valores primitivos básicos:
528
+
529
+ ### Contenido de Traducción (`t`)
530
+
531
+ Contenido multilingüe que varía según la localidad:
532
+
533
+ ```typescript
534
+ import { t } from "intlayer";
535
+
536
+ // TypeScript/JavaScript
537
+ multilingualContent: t({
538
+ en: "Welcome to our website",
539
+ fr: "Bienvenue sur notre site web",
540
+ es: "Bienvenido a nuestro sitio web",
541
+ });
542
+ ```
543
+
544
+ ### Contenido Condicional (`cond`)
545
+
546
+ Contenido que cambia basado en condiciones booleanas:
547
+
548
+ ```typescript
549
+ import { cond } from "intlayer";
550
+
551
+ conditionalContent: cond({
552
+ true: "User is logged in",
553
+ false: "Please log in to continue",
554
+ });
555
+ ```
556
+
557
+ ### Contenido de Enumeración (`enu`)
558
+
559
+ Contenido que varía según valores enumerados:
560
+
561
+ ```typescript
562
+ import { enu } from "intlayer";
563
+
564
+ statusContent: enu({
565
+ pending: "Su solicitud está pendiente",
566
+ approved: "Su solicitud ha sido aprobada",
567
+ rejected: "Su solicitud ha sido rechazada",
568
+ });
569
+ ```
570
+
571
+ ### Contenido de Inserción (`insert`)
572
+
573
+ Contenido que puede ser insertado en otro contenido:
574
+
575
+ ```typescript
576
+ import { insert } from "intlayer";
577
+
578
+ insertionContent: insert("Este texto puede ser insertado en cualquier lugar");
579
+ ```
580
+
581
+ ### Contenido Anidado (`nest`)
582
+
583
+ Referencias a otros diccionarios:
584
+
585
+ ```typescript
586
+ import { nest } from "intlayer";
587
+
588
+ nestedContent: nest("about-page");
589
+ ```
590
+
591
+ ### Contenido Markdown (`md`)
592
+
593
+ Contenido de texto enriquecido en formato Markdown:
594
+
595
+ ```typescript
596
+ import { md } from "intlayer";
597
+
598
+ markdownContent: md(
599
+ "# Bienvenido\n\nEste es un texto en **negrita** con [enlaces](https://example.com)"
600
+ );
601
+ ```
602
+
603
+ ### Contenido según género (`gender`)
604
+
605
+ Contenido que varía según el género:
606
+
607
+ ```typescript
608
+ import { gender } from "intlayer";
609
+
610
+ genderContent: gender({
611
+ male: "Él es un desarrollador",
612
+ female: "Ella es una desarrolladora",
613
+ other: "Ellos son desarrolladores",
614
+ });
615
+ ```
616
+
617
+ ### Contenido de archivo (`file`)
618
+
619
+ Referencias a archivos externos:
620
+
621
+ ```typescript
622
+ import { file } from "intlayer";
623
+
624
+ fileContent: file("./path/to/content.txt");
625
+ ```
626
+
627
+ ## Creación de archivos de contenido
628
+
629
+ ### Estructura básica de un archivo de contenido
630
+
631
+ Un archivo de contenido exporta un objeto por defecto que cumple con el tipo `Dictionary`:
632
+
633
+ ```typescript
634
+ // example.content.ts
635
+ import { t, cond, nest, md, insert, file } from "intlayer";
636
+
637
+ export default {
638
+ key: "welcome-page",
639
+ title: "Contenido de la página de bienvenida",
640
+ description:
641
+ "Contenido para la página principal de bienvenida que incluye la sección hero y características",
642
+ tags: ["página", "bienvenida", "página principal"],
643
+ content: {
644
+ hero: {
645
+ title: t({
646
+ en: "Welcome to Our Platform",
647
+ fr: "Bienvenue sur Notre Plateforme",
648
+ es: "Bienvenido a Nuestra Plataforma",
649
+ }),
650
+ subtitle: t({
651
+ en: "Build amazing applications with ease",
652
+ fr: "Construisez des applications incroyables avec facilité",
653
+ es: "Construye aplicaciones increíbles con facilidad",
654
+ }),
655
+ cta: cond({
656
+ true: t({
657
+ en: "Get Started",
658
+ fr: "Commencer",
659
+ es: "Comenzar",
660
+ }),
661
+ false: t({
662
+ en: "Sign Up",
663
+ fr: "S'inscrire",
664
+ es: "Registrarse",
665
+ }),
666
+ }),
667
+ },
668
+ features: [
669
+ {
670
+ title: t({
671
+ en: "Easy to Use",
672
+ fr: "Facile à Utiliser",
673
+ es: "Fácil de Usar",
674
+ }),
675
+ description: t({
676
+ en: "Intuitive interface for all skill levels",
677
+ fr: "Interface intuitive pour tous les niveaux",
678
+ es: "Interfaz intuitiva para todos los niveles",
679
+ }),
680
+ },
681
+ ],
682
+ documentation: nest("documentation"),
683
+ readme: file("./README.md"),
684
+ },
685
+ } satisfies Dictionary;
686
+ ```
687
+
688
+ ### Archivo de Contenido JSON
689
+
690
+ También puedes crear archivos de contenido en formato JSON:
691
+
692
+ ```json
693
+ {
694
+ "key": "welcome-page",
695
+ "title": "Contenido de la Página de Bienvenida",
696
+ "description": "Contenido para la página principal de bienvenida",
697
+ "tags": ["page", "welcome"],
698
+ "content": {
699
+ "hero": {
700
+ "title": {
701
+ "nodeType": "translation",
702
+ "translation": {
703
+ "en": "Bienvenido a Nuestra Plataforma",
704
+ "fr": "Bienvenue sur Notre Plateforme"
705
+ }
706
+ },
707
+ "subtitle": {
708
+ "nodeType": "translation",
709
+ "translation": {
710
+ "en": "Cree aplicaciones increíbles con facilidad",
711
+ "fr": "Construisez des applications incroyables avec facilité"
712
+ }
713
+ }
714
+ }
715
+ }
716
+ }
717
+ ```
718
+
719
+ ### Archivos de Contenido por Localización
720
+
721
+ Para diccionarios por localización, especifique la propiedad `locale`:
722
+
723
+ ```typescript
724
+ // welcome-page.en.content.ts
725
+ export default {
726
+ key: "welcome-page",
727
+ locale: "en",
728
+ content: {
729
+ hero: {
730
+ title: "Bienvenido a Nuestra Plataforma",
731
+ subtitle: "Cree aplicaciones increíbles con facilidad",
732
+ },
733
+ },
734
+ } satisfies Dictionary;
735
+ ```
736
+
737
+ ```typescript
738
+ // welcome-page.fr.content.ts
739
+ export default {
740
+ key: "welcome-page",
741
+ locale: "fr",
742
+ content: {
743
+ hero: {
744
+ title: "Bienvenue sur Notre Plateforme",
745
+ subtitle: "Construisez des applications incroyables avec facilité",
746
+ },
747
+ },
748
+ } satisfies Dictionary;
749
+ ```
750
+
751
+ ## Extensiones de Archivos de Contenido
752
+
753
+ Intlayer te permite personalizar las extensiones para tus archivos de declaración de contenido. Esta personalización ofrece flexibilidad para gestionar proyectos a gran escala y ayuda a evitar conflictos con otros módulos.
754
+
755
+ ### Extensiones Predeterminadas
756
+
757
+ Por defecto, Intlayer vigila todos los archivos con las siguientes extensiones para declaraciones de contenido:
758
+
759
+ - `.content.json`
760
+ - `.content.ts`
761
+ - `.content.tsx`
762
+ - `.content.js`
763
+ - `.content.jsx`
764
+ - `.content.mjs`
765
+ - `.content.mjx`
766
+ - `.content.cjs`
767
+ - `.content.cjx`
768
+
769
+ Estas extensiones predeterminadas son adecuadas para la mayoría de las aplicaciones. Sin embargo, cuando tienes necesidades específicas, puedes definir extensiones personalizadas para optimizar el proceso de compilación y reducir el riesgo de conflictos con otros componentes.
770
+
771
+ > Para personalizar las extensiones de archivo que Intlayer utiliza para identificar los archivos de declaración de contenido, puedes especificarlas en el archivo de configuración de Intlayer. Este enfoque es beneficioso para proyectos a gran escala donde limitar el alcance del proceso de vigilancia mejora el rendimiento de la compilación.
772
+
773
+ ## Conceptos Avanzados
774
+
775
+ ### Fusión de Diccionarios
776
+
777
+ Cuando múltiples diccionarios tienen la misma clave, Intlayer los fusiona automáticamente. El comportamiento de la fusión depende de varios factores:
778
+
779
+ - **Prioridad**: Los diccionarios con valores de `priority` más altos sobrescriben a aquellos con valores más bajos
780
+ - **Auto-relleno vs Base**: Los diccionarios base sobrescriben a los diccionarios auto-rellenados
781
+ - **Ubicación**: Los diccionarios locales sobrescriben a los diccionarios remotos (cuando las prioridades son iguales)
782
+
783
+ ### Seguridad de Tipos
784
+
785
+ Intlayer proporciona soporte completo de TypeScript para archivos de contenido:
786
+
787
+ ```typescript
788
+ // Define tu tipo de contenido
789
+ interface WelcomePageContent {
790
+ hero: {
791
+ title: string;
792
+ subtitle: string;
793
+ cta: string;
794
+ };
795
+ features: Array<{
796
+ title: string;
797
+ description: string;
798
+ }>;
799
+ }
800
+
801
+ // Úsalo en tu diccionario
802
+ export default {
803
+ key: "welcome-page",
804
+ content: {
805
+ // TypeScript proporcionará autocompletado y verificación de tipos
806
+ hero: {
807
+ title: "Welcome",
808
+ subtitle: "Build amazing apps",
809
+ cta: "Get Started",
810
+ },
811
+ },
812
+ } satisfies Dictionary<WelcomePageContent>;
813
+ ```
814
+
815
+ ### Imbricación de Nodos
816
+
817
+ Puedes sin problema imbricar funciones dentro de otras.
818
+
819
+ Ejemplo:
820
+
821
+ ```javascript fileName="src/example.content.tsx" contentDeclarationFormat="typescript"
822
+ import { t, enu, cond, nest, md, type Dictionary } from "intlayer";
823
+
824
+ const getName = async () => "John Doe";
825
+
826
+ export default {
827
+ key: "page",
828
+ content: {
829
+ // `getIntlayer('page','en').hiMessage` devuelve `['Hi', ' ', 'John Doe']`
830
+ hiMessage: [
831
+ t({
832
+ en: "Hi",
833
+ fr: "Salut",
834
+ es: "Hola",
835
+ }),
836
+ " ",
837
+ getName(),
838
+ ],
839
+ // Contenido compuesto imbricando condición, enumeración y contenido multilingüe
840
+ // `getIntlayer('page','en').advancedContent(true)(10)` devuelve 'Multiple items found'
841
+ advancedContent: cond({
842
+ true: enu({
843
+ "0": t({
844
+ en: "No items found",
845
+ fr: "Aucun article trouvé",
846
+ es: "No se encontraron artículos",
847
+ }),
848
+ "1": t({
849
+ en: "One item found",
850
+ fr: "Un article trouvé",
851
+ es: "Se encontró un artículo",
852
+ }),
853
+ ">1": t({
854
+ en: "Multiple items found",
855
+ fr: "Plusieurs articles trouvés",
856
+ es: "Se encontraron múltiples artículos",
857
+ }),
858
+ }),
859
+ false: t({
860
+ en: "No valid data available",
861
+ fr: "Aucune donnée valide disponible",
862
+ es: "No hay datos válidos disponibles",
863
+ }),
864
+ }),
865
+ },
866
+ } satisfies Dictionary;
867
+ ```
868
+
869
+ ```javascript fileName="src/example.content.mjx" contentDeclarationFormat="esm"
870
+ import { t, enu, cond, nest, md } from "intlayer";
871
+
872
+ const getName = async () => "John Doe";
873
+
874
+ /** @type {import('intlayer').Dictionary} */
875
+ export default {
876
+ key: "page",
877
+ content: {
878
+ // `getIntlayer('page','en').hiMessage` devuelve `['Hola', ' ', 'John Doe']`
879
+ hiMessage: [
880
+ t({
881
+ en: "Hi",
882
+ fr: "Salut",
883
+ es: "Hola",
884
+ }),
885
+ " ",
886
+ getName(),
887
+ ],
888
+ // Contenido compuesto que imbrica condición, enumeración y contenido multilingüe
889
+ // `getIntlayer('page','en').advancedContent(true)(10)` devuelve 'Se encontraron múltiples artículos'
890
+ advancedContent: cond({
891
+ true: enu({
892
+ "0": t({
893
+ en: "No items found",
894
+ fr: "Aucun article trouvé",
895
+ es: "No se encontraron artículos",
896
+ }),
897
+ "1": t({
898
+ en: "One item found",
899
+ fr: "Un article trouvé",
900
+ es: "Se encontró un artículo",
901
+ }),
902
+ ">1": t({
903
+ en: "Multiple items found",
904
+ fr: "Plusieurs articles trouvés",
905
+ es: "Se encontraron múltiples artículos",
906
+ }),
907
+ }),
908
+ false: t({
909
+ en: "No valid data available",
910
+ fr: "Aucune donnée valide disponible",
911
+ es: "No hay datos válidos disponibles",
912
+ }),
913
+ }),
914
+ },
915
+ };
916
+ ```
917
+
918
+ ```javascript fileName="src/example.content.cjx" contentDeclarationFormat="commonjs"
919
+ const { t, enu, cond, nest, md } = require("intlayer");
920
+
921
+ const getName = async () => "John Doe";
922
+
923
+ /** @type {import('intlayer').Dictionary} */
924
+ module.exports = {
925
+ key: "page",
926
+ content: {
927
+ // `getIntlayer('page','en').hiMessage` devuelve `['Hola', ' ', 'John Doe']`
928
+ hiMessage: [
929
+ t({
930
+ en: "Hi",
931
+ fr: "Salut",
932
+ es: "Hola",
933
+ }),
934
+ " ",
935
+ getName(),
936
+ ],
937
+ // Contenido compuesto que imbrica condición, enumeración y contenido multilingüe
938
+ // `getIntlayer('page','en').advancedContent(true)(10)` devuelve 'Se encontraron múltiples artículos'
939
+ advancedContent: cond({
940
+ true: enu({
941
+ "0": t({
942
+ en: "No items found",
943
+ fr: "Aucun article trouvé",
944
+ es: "No se encontraron artículos",
945
+ }),
946
+ "1": t({
947
+ en: "One item found",
948
+ fr: "Un article trouvé",
949
+ es: "Se encontró un artículo",
950
+ }),
951
+ ">1": t({
952
+ en: "Multiple items found",
953
+ fr: "Plusieurs articles trouvés",
954
+ es: "Se encontraron múltiples artículos",
955
+ }),
956
+ }),
957
+ false: t({
958
+ en: "No valid data available",
959
+ fr: "Aucune donnée valide disponible",
960
+ es: "No hay datos válidos disponibles",
961
+ }),
962
+ }),
963
+ },
964
+ };
965
+ es: "Hola",
966
+ }),
967
+ " ",
968
+ getName(),
969
+ ],
970
+ // Contenido compuesto que imbrica condición, enumeración y contenido multilingüe
971
+ // `getIntlayer('page','en').advancedContent(true)(10) devuelve 'Se encontraron múltiples artículos'`
972
+ advancedContent: cond({
973
+ true: enu({
974
+ "0": t({
975
+ en: "No items found",
976
+ fr: "Aucun article trouvé",
977
+ es: "No se encontraron artículos",
978
+ }),
979
+ "1": t({
980
+ en: "One item found",
981
+ fr: "Un article trouvé",
982
+ es: "Se encontró un artículo",
983
+ }),
984
+ ">1": t({
985
+ en: "Multiple items found",
986
+ fr: "Plusieurs articles trouvés",
987
+ es: "Se encontraron múltiples artículos",
988
+ }),
989
+ }),
990
+ false: t({
991
+ en: "No valid data available",
992
+ fr: "Aucune donnée valide disponible",
993
+ es: "No hay datos válidos disponibles",
994
+ }),
995
+ }),
996
+ },
997
+ };
998
+ ```
999
+
1000
+ ```json5 fileName="src/example.content.json" contentDeclarationFormat="json"
1001
+ {
1002
+ "$schema": "https://intlayer.org/schema.json",
1003
+ "key": "page",
1004
+ "content": {
1005
+ "hiMessage": {
1006
+ "nodeType": "composite",
1007
+ "composite": [
1008
+ {
1009
+ "nodeType": "translation",
1010
+ "translation": {
1011
+ "en": "Hi",
1012
+ "fr": "Salut",
1013
+ "es": "Hola",
1014
+ },
1015
+ },
1016
+ " ",
1017
+ "John Doe",
1018
+ ],
1019
+ },
1020
+ "advancedContent": {
1021
+ "nodeType": "condition",
1022
+ "condition": {
1023
+ "true": {
1024
+ "nodeType": "enumeration",
1025
+ "enumeration": {
1026
+ "0": {
1027
+ "nodeType": "translation",
1028
+ "translation": {
1029
+ "en": "No items found",
1030
+ "fr": "Aucun article trouvé",
1031
+ "es": "No se encontraron artículos",
1032
+ },
1033
+ },
1034
+ "1": {
1035
+ "nodeType": "translation",
1036
+ "translation": {
1037
+ "en": "One item found",
1038
+ "fr": "Un article trouvé",
1039
+ "es": "Se encontró un artículo",
1040
+ },
1041
+ },
1042
+ ">1": {
1043
+ "nodeType": "translation",
1044
+ "translation": {
1045
+ "en": "Multiple items found",
1046
+ "fr": "Plusieurs articles trouvés",
1047
+ "es": "Se encontraron múltiples artículos",
1048
+ },
1049
+ },
1050
+ },
1051
+ },
1052
+ "false": {
1053
+ "nodeType": "translation",
1054
+ "translation": {
1055
+ "en": "No valid data available",
1056
+ "fr": "Aucune donnée valide disponible",
1057
+ "es": "No hay datos válidos disponibles",
1058
+ },
1059
+ },
1060
+ },
1061
+ },
1062
+ },
1063
+ }
1064
+ ```
1065
+
1066
+ ### Mejores Prácticas
1067
+
1068
+ 1. **Convenciones de Nomenclatura**:
1069
+ - Usa kebab-case para las claves del diccionario (`"about-page-meta"`)
1070
+ - Agrupa contenido relacionado bajo el mismo prefijo de clave
1071
+
1072
+ 2. **Organización del Contenido**:
1073
+ - Mantén el contenido relacionado junto en el mismo diccionario
1074
+ - Usa objetos anidados para organizar estructuras de contenido complejas
1075
+ - Aprovecha las etiquetas para la categorización
1076
+ - Usa `autoFill` para completar automáticamente las traducciones faltantes
1077
+
1078
+ 3. **Rendimiento**:
1079
+ - Ajusta la configuración del contenido para limitar el alcance de los archivos observados
1080
+ - Usa diccionarios en vivo solo cuando sean necesarias actualizaciones en tiempo real (por ejemplo, pruebas A/B, etc.)
1081
+ - Asegúrate de que el plugin de transformación de compilación (`@intlayer/swc` o `@intlayer/babel`) esté habilitado para optimizar el diccionario en tiempo de compilación
1082
+
1083
+ ## Historial de Documentación
1084
+
1085
+ | Versión | Fecha | Cambios |
1086
+ | ------- | ---------- | ------------------------------- |
1087
+ | 6.0.0 | 2025-09-20 | Añadida documentación de campos |
1088
+ | 5.5.10 | 2025-06-29 | Historial inicial |