@intlayer/docs 5.5.8

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 (1135) hide show
  1. package/LICENSE +202 -0
  2. package/ar/CI_CD.md +149 -0
  3. package/ar/autoFill.md +157 -0
  4. package/ar/concept/content/file.md +1 -0
  5. package/ar/configuration.md +492 -0
  6. package/ar/dictionary/condition.md +213 -0
  7. package/ar/dictionary/content_extention_customization.md +81 -0
  8. package/ar/dictionary/enumeration.md +221 -0
  9. package/ar/dictionary/file.md +209 -0
  10. package/ar/dictionary/function_fetching.md +190 -0
  11. package/ar/dictionary/get_started.md +490 -0
  12. package/ar/dictionary/insertion.md +161 -0
  13. package/ar/dictionary/markdown.md +343 -0
  14. package/ar/dictionary/nesting.md +249 -0
  15. package/ar/dictionary/translation.md +307 -0
  16. package/ar/header.md +7 -0
  17. package/ar/how_works_intlayer.md +219 -0
  18. package/ar/index.md +125 -0
  19. package/ar/interest_of_intlayer.md +132 -0
  20. package/ar/intlayer_CMS.md +328 -0
  21. package/ar/intlayer_cli.md +258 -0
  22. package/ar/intlayer_visual_editor.md +210 -0
  23. package/ar/intlayer_with_angular.md +3 -0
  24. package/ar/intlayer_with_create_react_app.md +1196 -0
  25. package/ar/intlayer_with_express.md +270 -0
  26. package/ar/intlayer_with_lynx+react.md +482 -0
  27. package/ar/intlayer_with_nextjs_14.md +1260 -0
  28. package/ar/intlayer_with_nextjs_15.md +1311 -0
  29. package/ar/intlayer_with_nextjs_page_router.md +1099 -0
  30. package/ar/intlayer_with_react_native+expo.md +539 -0
  31. package/ar/intlayer_with_vite+preact.md +1679 -0
  32. package/ar/intlayer_with_vite+react.md +1582 -0
  33. package/ar/intlayer_with_vite+solid.md +3 -0
  34. package/ar/intlayer_with_vite+svelte.md +3 -0
  35. package/ar/intlayer_with_vite+vue.md +989 -0
  36. package/ar/introduction.md +190 -0
  37. package/ar/mcp_server.md +150 -0
  38. package/ar/packages/@intlayer/api/index.md +31 -0
  39. package/ar/packages/@intlayer/chokidar/index.md +31 -0
  40. package/ar/packages/@intlayer/cli/index.md +1 -0
  41. package/ar/packages/@intlayer/config/index.md +116 -0
  42. package/ar/packages/@intlayer/core/index.md +25 -0
  43. package/ar/packages/@intlayer/design-system/index.md +21 -0
  44. package/ar/packages/@intlayer/dictionary-entry/index.md +21 -0
  45. package/ar/packages/@intlayer/editor/index.md +21 -0
  46. package/ar/packages/@intlayer/editor-react/index.md +21 -0
  47. package/ar/packages/@intlayer/webpack/index.md +35 -0
  48. package/ar/packages/angular-intlayer/index.md +3 -0
  49. package/ar/packages/express-intlayer/index.md +232 -0
  50. package/ar/packages/express-intlayer/t.md +448 -0
  51. package/ar/packages/intlayer/getConfiguration.md +120 -0
  52. package/ar/packages/intlayer/getEnumeration.md +138 -0
  53. package/ar/packages/intlayer/getHTMLTextDir.md +97 -0
  54. package/ar/packages/intlayer/getLocaleLang.md +61 -0
  55. package/ar/packages/intlayer/getLocaleName.md +93 -0
  56. package/ar/packages/intlayer/getLocalizedUrl.md +221 -0
  57. package/ar/packages/intlayer/getMultilingualUrls.md +198 -0
  58. package/ar/packages/intlayer/getPathWithoutLocale.md +50 -0
  59. package/ar/packages/intlayer/getTranslation.md +175 -0
  60. package/ar/packages/intlayer/getTranslationContent.md +175 -0
  61. package/ar/packages/intlayer/index.md +254 -0
  62. package/ar/packages/intlayer-cli/index.md +41 -0
  63. package/ar/packages/intlayer-editor/index.md +113 -0
  64. package/ar/packages/lynx-intlayer/index.md +58 -0
  65. package/ar/packages/next-intlayer/index.md +267 -0
  66. package/ar/packages/next-intlayer/t.md +341 -0
  67. package/ar/packages/next-intlayer/useDictionary.md +248 -0
  68. package/ar/packages/next-intlayer/useIntlayer.md +237 -0
  69. package/ar/packages/next-intlayer/useIntlayerAsync.md +211 -0
  70. package/ar/packages/next-intlayer/useLocale.md +105 -0
  71. package/ar/packages/preact-intlayer/index.md +3 -0
  72. package/ar/packages/react-intlayer/index.md +261 -0
  73. package/ar/packages/react-intlayer/t.md +283 -0
  74. package/ar/packages/react-intlayer/useDictionary.md +268 -0
  75. package/ar/packages/react-intlayer/useIntlayer.md +225 -0
  76. package/ar/packages/react-intlayer/useIntlayerAsync.md +226 -0
  77. package/ar/packages/react-intlayer/useLocale.md +184 -0
  78. package/ar/packages/react-native-intlayer/index.md +57 -0
  79. package/ar/packages/react-scripts-intlayer/index.md +57 -0
  80. package/ar/packages/solid-intlayer/index.md +3 -0
  81. package/ar/packages/svelte-intlayer/index.md +3 -0
  82. package/ar/packages/vite-intlayer/index.md +53 -0
  83. package/ar/packages/vue-intlayer/index.md +3 -0
  84. package/ar/per_locale_file.md +298 -0
  85. package/ar/privacy_notice.md +61 -0
  86. package/ar/roadmap.md +208 -0
  87. package/ar/terms_of_service.md +33 -0
  88. package/ar/vs_code_extension.md +139 -0
  89. package/de/CI_CD.md +149 -0
  90. package/de/angular-intlayer/index.md +3 -0
  91. package/de/autoFill.md +157 -0
  92. package/de/configuration.md +501 -0
  93. package/de/dictionary/condition.md +213 -0
  94. package/de/dictionary/content_extention_customization.md +81 -0
  95. package/de/dictionary/enumeration.md +221 -0
  96. package/de/dictionary/file.md +207 -0
  97. package/de/dictionary/function_fetching.md +190 -0
  98. package/de/dictionary/get_started.md +466 -0
  99. package/de/dictionary/insertion.md +167 -0
  100. package/de/dictionary/markdown.md +345 -0
  101. package/de/dictionary/nesting.md +252 -0
  102. package/de/dictionary/translation.md +287 -0
  103. package/de/header.md +5 -0
  104. package/de/how_works_intlayer.md +216 -0
  105. package/de/index.md +125 -0
  106. package/de/insertion.md +0 -0
  107. package/de/interest_of_intlayer.md +132 -0
  108. package/de/intlayer_CMS.md +334 -0
  109. package/de/intlayer_cli.md +274 -0
  110. package/de/intlayer_visual_editor.md +210 -0
  111. package/de/intlayer_with_angular.md +3 -0
  112. package/de/intlayer_with_create_react_app.md +1200 -0
  113. package/de/intlayer_with_express.md +268 -0
  114. package/de/intlayer_with_lynx+react.md +482 -0
  115. package/de/intlayer_with_nextjs_14.md +1258 -0
  116. package/de/intlayer_with_nextjs_15.md +1306 -0
  117. package/de/intlayer_with_nextjs_page_router.md +1087 -0
  118. package/de/intlayer_with_react_native+expo.md +539 -0
  119. package/de/intlayer_with_vite+preact.md +1701 -0
  120. package/de/intlayer_with_vite+react.md +1584 -0
  121. package/de/intlayer_with_vite+solid.md +3 -0
  122. package/de/intlayer_with_vite+svelte.md +3 -0
  123. package/de/intlayer_with_vite+vue.md +989 -0
  124. package/de/introduction.md +186 -0
  125. package/de/mcp_server.md +150 -0
  126. package/de/packages/@intlayer/api/index.md +31 -0
  127. package/de/packages/@intlayer/chokidar/index.md +31 -0
  128. package/de/packages/@intlayer/cli/index.md +21 -0
  129. package/de/packages/@intlayer/config/index.md +116 -0
  130. package/de/packages/@intlayer/core/index.md +25 -0
  131. package/de/packages/@intlayer/design-system/index.md +21 -0
  132. package/de/packages/@intlayer/dictionary-entry/index.md +21 -0
  133. package/de/packages/@intlayer/editor/index.md +21 -0
  134. package/de/packages/@intlayer/editor-react/index.md +21 -0
  135. package/de/packages/@intlayer/webpack/index.md +35 -0
  136. package/de/packages/angular-intlayer/index.md +31 -0
  137. package/de/packages/express-intlayer/index.md +229 -0
  138. package/de/packages/express-intlayer/t.md +432 -0
  139. package/de/packages/intlayer/getConfiguration.md +120 -0
  140. package/de/packages/intlayer/getEnumeration.md +140 -0
  141. package/de/packages/intlayer/getHTMLTextDir.md +97 -0
  142. package/de/packages/intlayer/getLocaleLang.md +57 -0
  143. package/de/packages/intlayer/getLocaleName.md +93 -0
  144. package/de/packages/intlayer/getLocalizedUrl.md +221 -0
  145. package/de/packages/intlayer/getMultilingualUrls.md +198 -0
  146. package/de/packages/intlayer/getPathWithoutLocale.md +50 -0
  147. package/de/packages/intlayer/getTranslation.md +166 -0
  148. package/de/packages/intlayer/getTranslationContent.md +166 -0
  149. package/de/packages/intlayer/index.md +478 -0
  150. package/de/packages/intlayer-cli/index.md +41 -0
  151. package/de/packages/intlayer-editor/index.md +113 -0
  152. package/de/packages/lynx-intlayer/index.md +58 -0
  153. package/de/packages/next-intlayer/index.md +263 -0
  154. package/de/packages/next-intlayer/t.md +325 -0
  155. package/de/packages/next-intlayer/useDictionary.md +242 -0
  156. package/de/packages/next-intlayer/useIntlayer.md +237 -0
  157. package/de/packages/next-intlayer/useIntlayerAsync.md +211 -0
  158. package/de/packages/next-intlayer/useLocale.md +105 -0
  159. package/de/packages/preact-intlayer/index.md +3 -0
  160. package/de/packages/react-intlayer/index.md +260 -0
  161. package/de/packages/react-intlayer/t.md +277 -0
  162. package/de/packages/react-intlayer/useDictionary.md +260 -0
  163. package/de/packages/react-intlayer/useIntlayer.md +225 -0
  164. package/de/packages/react-intlayer/useIntlayerAsync.md +226 -0
  165. package/de/packages/react-intlayer/useLocale.md +184 -0
  166. package/de/packages/react-native-intlayer/index.md +57 -0
  167. package/de/packages/react-scripts-intlayer/index.md +57 -0
  168. package/de/packages/solid-intlayer/index.md +3 -0
  169. package/de/packages/svelte-intlayer/index.md +3 -0
  170. package/de/packages/vite-intlayer/index.md +53 -0
  171. package/de/packages/vue-intlayer/index.md +3 -0
  172. package/de/per_locale_file.md +298 -0
  173. package/de/privacy_notice.md +61 -0
  174. package/de/roadmap.md +206 -0
  175. package/de/terms_of_service.md +33 -0
  176. package/de/vs_code_extension.md +139 -0
  177. package/en/CI_CD.md +149 -0
  178. package/en/autoFill.md +157 -0
  179. package/en/configuration.md +506 -0
  180. package/en/dictionary/condition.md +213 -0
  181. package/en/dictionary/content_extention_customization.md +81 -0
  182. package/en/dictionary/enumeration.md +221 -0
  183. package/en/dictionary/file.md +198 -0
  184. package/en/dictionary/function_fetching.md +190 -0
  185. package/en/dictionary/get_started.md +504 -0
  186. package/en/dictionary/insertion.md +167 -0
  187. package/en/dictionary/markdown.md +355 -0
  188. package/en/dictionary/nesting.md +249 -0
  189. package/en/dictionary/translation.md +285 -0
  190. package/en/frequent_questions/build_dictionaries.md +37 -0
  191. package/en/frequent_questions/domain_routing.md +92 -0
  192. package/en/frequent_questions/esbuild_error.md +9 -0
  193. package/en/frequent_questions/get_locale_cookie.md +121 -0
  194. package/en/frequent_questions/intlayer_command_undefined.md +135 -0
  195. package/en/frequent_questions/locale_incorect_in_url.md +52 -0
  196. package/en/frequent_questions/static_rendering.md +24 -0
  197. package/en/frequent_questions/unknown_command.md +76 -0
  198. package/en/header.md +5 -0
  199. package/en/how_works_intlayer.md +219 -0
  200. package/en/index.md +139 -0
  201. package/en/interest_of_intlayer.md +133 -0
  202. package/en/intlayer_CMS.md +334 -0
  203. package/en/intlayer_cli.md +309 -0
  204. package/en/intlayer_visual_editor.md +244 -0
  205. package/en/intlayer_with_angular.md +139 -0
  206. package/en/intlayer_with_create_react_app.md +1209 -0
  207. package/en/intlayer_with_express.md +391 -0
  208. package/en/intlayer_with_lynx+react.md +483 -0
  209. package/en/intlayer_with_nextjs_14.md +1298 -0
  210. package/en/intlayer_with_nextjs_15.md +1347 -0
  211. package/en/intlayer_with_nextjs_page_router.md +1126 -0
  212. package/en/intlayer_with_react_native+expo.md +630 -0
  213. package/en/intlayer_with_vite+preact.md +1659 -0
  214. package/en/intlayer_with_vite+react.md +1605 -0
  215. package/en/intlayer_with_vite+solid.md +254 -0
  216. package/en/intlayer_with_vite+svelte.md +254 -0
  217. package/en/intlayer_with_vite+vue.md +1000 -0
  218. package/en/introduction.md +185 -0
  219. package/en/mcp_server.md +150 -0
  220. package/en/packages/@intlayer/api/index.md +31 -0
  221. package/en/packages/@intlayer/chokidar/index.md +31 -0
  222. package/en/packages/@intlayer/cli/index.md +21 -0
  223. package/en/packages/@intlayer/config/index.md +116 -0
  224. package/en/packages/@intlayer/core/index.md +25 -0
  225. package/en/packages/@intlayer/design-system/index.md +21 -0
  226. package/en/packages/@intlayer/dictionary-entry/index.md +21 -0
  227. package/en/packages/@intlayer/editor/index.md +21 -0
  228. package/en/packages/@intlayer/editor-react/index.md +21 -0
  229. package/en/packages/@intlayer/webpack/index.md +35 -0
  230. package/en/packages/angular-intlayer/index.md +31 -0
  231. package/en/packages/express-intlayer/index.md +229 -0
  232. package/en/packages/express-intlayer/t.md +432 -0
  233. package/en/packages/intlayer/getConfiguration.md +120 -0
  234. package/en/packages/intlayer/getEnumeration.md +138 -0
  235. package/en/packages/intlayer/getHTMLTextDir.md +97 -0
  236. package/en/packages/intlayer/getLocaleLang.md +57 -0
  237. package/en/packages/intlayer/getLocaleName.md +93 -0
  238. package/en/packages/intlayer/getLocalizedUrl.md +221 -0
  239. package/en/packages/intlayer/getMultilingualUrls.md +198 -0
  240. package/en/packages/intlayer/getPathWithoutLocale.md +50 -0
  241. package/en/packages/intlayer/getTranslation.md +166 -0
  242. package/en/packages/intlayer/getTranslationContent.md +166 -0
  243. package/en/packages/intlayer/index.md +476 -0
  244. package/en/packages/intlayer-cli/index.md +41 -0
  245. package/en/packages/intlayer-editor/index.md +113 -0
  246. package/en/packages/lynx-intlayer/index.md +60 -0
  247. package/en/packages/next-intlayer/index.md +263 -0
  248. package/en/packages/next-intlayer/t.md +326 -0
  249. package/en/packages/next-intlayer/useDictionary.md +242 -0
  250. package/en/packages/next-intlayer/useIntlayer.md +237 -0
  251. package/en/packages/next-intlayer/useIntlayerAsync.md +211 -0
  252. package/en/packages/next-intlayer/useLocale.md +105 -0
  253. package/en/packages/preact-intlayer/index.md +31 -0
  254. package/en/packages/react-intlayer/index.md +257 -0
  255. package/en/packages/react-intlayer/t.md +277 -0
  256. package/en/packages/react-intlayer/useDictionary.md +260 -0
  257. package/en/packages/react-intlayer/useIntlayer.md +225 -0
  258. package/en/packages/react-intlayer/useIntlayerAsync.md +226 -0
  259. package/en/packages/react-intlayer/useLocale.md +184 -0
  260. package/en/packages/react-native-intlayer/index.md +59 -0
  261. package/en/packages/react-scripts-intlayer/index.md +57 -0
  262. package/en/packages/solid-intlayer/index.md +31 -0
  263. package/en/packages/svelte-intlayer/index.md +31 -0
  264. package/en/packages/vite-intlayer/index.md +53 -0
  265. package/en/packages/vue-intlayer/index.md +31 -0
  266. package/en/per_locale_file.md +297 -0
  267. package/en/privacy_notice.md +61 -0
  268. package/en/roadmap.md +270 -0
  269. package/en/t.md +163 -0
  270. package/en/terms_of_service.md +33 -0
  271. package/en/vs_code_extension.md +129 -0
  272. package/en-GB/CI_CD.md +149 -0
  273. package/en-GB/autoFill.md +0 -0
  274. package/en-GB/configuration.md +490 -0
  275. package/en-GB/dictionary/condition.md +213 -0
  276. package/en-GB/dictionary/content_extention_customization.md +83 -0
  277. package/en-GB/dictionary/enumeration.md +221 -0
  278. package/en-GB/dictionary/file.md +201 -0
  279. package/en-GB/dictionary/function_fetching.md +190 -0
  280. package/en-GB/dictionary/get_started.md +466 -0
  281. package/en-GB/dictionary/insertion.md +167 -0
  282. package/en-GB/dictionary/markdown.md +343 -0
  283. package/en-GB/dictionary/nesting.md +249 -0
  284. package/en-GB/dictionary/translation.md +285 -0
  285. package/en-GB/header.md +1 -0
  286. package/en-GB/how_works_intlayer.md +217 -0
  287. package/en-GB/index.md +142 -0
  288. package/en-GB/interest_of_intlayer.md +123 -0
  289. package/en-GB/intlayer_CMS.md +334 -0
  290. package/en-GB/intlayer_cli.md +239 -0
  291. package/en-GB/intlayer_visual_editor.md +210 -0
  292. package/en-GB/intlayer_with_angular.md +3 -0
  293. package/en-GB/intlayer_with_create_react_app.md +1192 -0
  294. package/en-GB/intlayer_with_express.md +267 -0
  295. package/en-GB/intlayer_with_lynx+react.md +484 -0
  296. package/en-GB/intlayer_with_nextjs_14.md +1267 -0
  297. package/en-GB/intlayer_with_nextjs_15.md +1308 -0
  298. package/en-GB/intlayer_with_nextjs_page_router.md +1087 -0
  299. package/en-GB/intlayer_with_react_native+expo.md +539 -0
  300. package/en-GB/intlayer_with_vite+preact.md +1648 -0
  301. package/en-GB/intlayer_with_vite+react.md +1430 -0
  302. package/en-GB/intlayer_with_vite+solid.md +3 -0
  303. package/en-GB/intlayer_with_vite+svelte.md +3 -0
  304. package/en-GB/intlayer_with_vite+vue.md +993 -0
  305. package/en-GB/introduction.md +201 -0
  306. package/en-GB/mcp_server.md +150 -0
  307. package/en-GB/packages/@intlayer/api/index.md +31 -0
  308. package/en-GB/packages/@intlayer/chokidar/index.md +31 -0
  309. package/en-GB/packages/@intlayer/cli/index.md +21 -0
  310. package/en-GB/packages/@intlayer/config/index.md +116 -0
  311. package/en-GB/packages/@intlayer/core/index.md +25 -0
  312. package/en-GB/packages/@intlayer/design-system/index.md +21 -0
  313. package/en-GB/packages/@intlayer/dictionary-entry/index.md +21 -0
  314. package/en-GB/packages/@intlayer/editor/index.md +21 -0
  315. package/en-GB/packages/@intlayer/editor-react/index.md +21 -0
  316. package/en-GB/packages/@intlayer/webpack/index.md +35 -0
  317. package/en-GB/packages/angular-intlayer/index.md +3 -0
  318. package/en-GB/packages/express-intlayer/index.md +229 -0
  319. package/en-GB/packages/express-intlayer/t.md +432 -0
  320. package/en-GB/packages/intlayer/getConfiguration.md +120 -0
  321. package/en-GB/packages/intlayer/getEnumeration.md +140 -0
  322. package/en-GB/packages/intlayer/getHTMLTextDir.md +97 -0
  323. package/en-GB/packages/intlayer/getLocaleLang.md +57 -0
  324. package/en-GB/packages/intlayer/getLocaleName.md +93 -0
  325. package/en-GB/packages/intlayer/getLocalizedUrl.md +221 -0
  326. package/en-GB/packages/intlayer/getMultilingualUrls.md +198 -0
  327. package/en-GB/packages/intlayer/getPathWithoutLocale.md +50 -0
  328. package/en-GB/packages/intlayer/getTranslation.md +166 -0
  329. package/en-GB/packages/intlayer/getTranslationContent.md +166 -0
  330. package/en-GB/packages/intlayer/index.md +476 -0
  331. package/en-GB/packages/intlayer-cli/index.md +41 -0
  332. package/en-GB/packages/intlayer-editor/index.md +113 -0
  333. package/en-GB/packages/lynx-intlayer/index.md +58 -0
  334. package/en-GB/packages/next-intlayer/index.md +263 -0
  335. package/en-GB/packages/next-intlayer/t.md +326 -0
  336. package/en-GB/packages/next-intlayer/useDictionary.md +242 -0
  337. package/en-GB/packages/next-intlayer/useIntlayer.md +237 -0
  338. package/en-GB/packages/next-intlayer/useIntlayerAsync.md +211 -0
  339. package/en-GB/packages/next-intlayer/useLocale.md +105 -0
  340. package/en-GB/packages/preact-intlayer/index.md +3 -0
  341. package/en-GB/packages/react-intlayer/index.md +257 -0
  342. package/en-GB/packages/react-intlayer/t.md +277 -0
  343. package/en-GB/packages/react-intlayer/useDictionary.md +260 -0
  344. package/en-GB/packages/react-intlayer/useIntlayer.md +225 -0
  345. package/en-GB/packages/react-intlayer/useIntlayerAsync.md +226 -0
  346. package/en-GB/packages/react-intlayer/useLocale.md +184 -0
  347. package/en-GB/packages/react-native-intlayer/index.md +57 -0
  348. package/en-GB/packages/react-scripts-intlayer/index.md +57 -0
  349. package/en-GB/packages/solid-intlayer/index.md +3 -0
  350. package/en-GB/packages/svelte-intlayer/index.md +3 -0
  351. package/en-GB/packages/vite-intlayer/index.md +53 -0
  352. package/en-GB/packages/vue-intlayer/index.md +3 -0
  353. package/en-GB/per_locale_file.md +298 -0
  354. package/en-GB/privacy_notice.md +57 -0
  355. package/en-GB/roadmap.md +206 -0
  356. package/en-GB/terms_of_service.md +33 -0
  357. package/en-GB/vs_code_extension.md +139 -0
  358. package/es/CI_CD.md +149 -0
  359. package/es/autoFill.md +157 -0
  360. package/es/configuration.md +503 -0
  361. package/es/dictionary/condition.md +213 -0
  362. package/es/dictionary/content_extention_customization.md +81 -0
  363. package/es/dictionary/enumeration.md +221 -0
  364. package/es/dictionary/file.md +206 -0
  365. package/es/dictionary/function_fetching.md +190 -0
  366. package/es/dictionary/get_started.md +466 -0
  367. package/es/dictionary/insertion.md +161 -0
  368. package/es/dictionary/markdown.md +338 -0
  369. package/es/dictionary/nesting.md +249 -0
  370. package/es/dictionary/translation.md +287 -0
  371. package/es/header.md +5 -0
  372. package/es/how_works_intlayer.md +217 -0
  373. package/es/index.md +122 -0
  374. package/es/interest_of_intlayer.md +132 -0
  375. package/es/intlayer_CMS.md +334 -0
  376. package/es/intlayer_cli.md +274 -0
  377. package/es/intlayer_visual_editor.md +210 -0
  378. package/es/intlayer_with_angular.md +3 -0
  379. package/es/intlayer_with_create_react_app.md +1192 -0
  380. package/es/intlayer_with_express.md +276 -0
  381. package/es/intlayer_with_lynx+react.md +475 -0
  382. package/es/intlayer_with_nextjs_14.md +1258 -0
  383. package/es/intlayer_with_nextjs_15.md +1308 -0
  384. package/es/intlayer_with_nextjs_page_router.md +1088 -0
  385. package/es/intlayer_with_react_native+expo.md +180 -0
  386. package/es/intlayer_with_vite+preact.md +1637 -0
  387. package/es/intlayer_with_vite+react.md +1592 -0
  388. package/es/intlayer_with_vite+solid.md +3 -0
  389. package/es/intlayer_with_vite+svelte.md +3 -0
  390. package/es/intlayer_with_vite+vue.md +947 -0
  391. package/es/introduction.md +184 -0
  392. package/es/mcp_server.md +150 -0
  393. package/es/packages/@intlayer/api/index.md +31 -0
  394. package/es/packages/@intlayer/chokidar/index.md +31 -0
  395. package/es/packages/@intlayer/cli/index.md +21 -0
  396. package/es/packages/@intlayer/config/index.md +116 -0
  397. package/es/packages/@intlayer/core/index.md +25 -0
  398. package/es/packages/@intlayer/design-system/index.md +21 -0
  399. package/es/packages/@intlayer/dictionary-entry/index.md +21 -0
  400. package/es/packages/@intlayer/editor/index.md +21 -0
  401. package/es/packages/@intlayer/editor-react/index.md +21 -0
  402. package/es/packages/@intlayer/webpack/index.md +35 -0
  403. package/es/packages/angular-intlayer/index.md +3 -0
  404. package/es/packages/express-intlayer/index.md +229 -0
  405. package/es/packages/express-intlayer/t.md +432 -0
  406. package/es/packages/intlayer/getConfiguration.md +120 -0
  407. package/es/packages/intlayer/getEnumeration.md +138 -0
  408. package/es/packages/intlayer/getHTMLTextDir.md +97 -0
  409. package/es/packages/intlayer/getLocaleLang.md +57 -0
  410. package/es/packages/intlayer/getLocaleName.md +93 -0
  411. package/es/packages/intlayer/getLocalizedUrl.md +221 -0
  412. package/es/packages/intlayer/getMultilingualUrls.md +198 -0
  413. package/es/packages/intlayer/getPathWithoutLocale.md +50 -0
  414. package/es/packages/intlayer/getTranslation.md +166 -0
  415. package/es/packages/intlayer/getTranslationContent.md +166 -0
  416. package/es/packages/intlayer/index.md +478 -0
  417. package/es/packages/intlayer-cli/index.md +41 -0
  418. package/es/packages/intlayer-editor/index.md +115 -0
  419. package/es/packages/lynx-intlayer/index.md +58 -0
  420. package/es/packages/next-intlayer/index.md +263 -0
  421. package/es/packages/next-intlayer/t.md +325 -0
  422. package/es/packages/next-intlayer/useDictionary.md +242 -0
  423. package/es/packages/next-intlayer/useIntlayer.md +237 -0
  424. package/es/packages/next-intlayer/useIntlayerAsync.md +211 -0
  425. package/es/packages/next-intlayer/useLocale.md +105 -0
  426. package/es/packages/preact-intlayer/index.md +3 -0
  427. package/es/packages/react-intlayer/index.md +263 -0
  428. package/es/packages/react-intlayer/t.md +277 -0
  429. package/es/packages/react-intlayer/useDictionary.md +270 -0
  430. package/es/packages/react-intlayer/useIntlayer.md +225 -0
  431. package/es/packages/react-intlayer/useIntlayerAsync.md +226 -0
  432. package/es/packages/react-intlayer/useLocale.md +184 -0
  433. package/es/packages/react-native-intlayer/index.md +57 -0
  434. package/es/packages/react-scripts-intlayer/index.md +57 -0
  435. package/es/packages/solid-intlayer/index.md +3 -0
  436. package/es/packages/svelte-intlayer/index.md +5 -0
  437. package/es/packages/vite-intlayer/index.md +53 -0
  438. package/es/packages/vue-intlayer/index.md +3 -0
  439. package/es/per_locale_file.md +293 -0
  440. package/es/privacy_notice.md +61 -0
  441. package/es/roadmap.md +157 -0
  442. package/es/terms_of_service.md +33 -0
  443. package/es/vs_code_extension.md +139 -0
  444. package/fr/CI_CD.md +149 -0
  445. package/fr/autoFill.md +157 -0
  446. package/fr/configuration.md +481 -0
  447. package/fr/dictionary/condition.md +213 -0
  448. package/fr/dictionary/content_extention_customization.md +81 -0
  449. package/fr/dictionary/enumeration.md +221 -0
  450. package/fr/dictionary/file.md +206 -0
  451. package/fr/dictionary/function_fetching.md +190 -0
  452. package/fr/dictionary/get_started.md +466 -0
  453. package/fr/dictionary/insertion.md +161 -0
  454. package/fr/dictionary/markdown.md +335 -0
  455. package/fr/dictionary/nesting.md +249 -0
  456. package/fr/dictionary/translation.md +287 -0
  457. package/fr/header.md +5 -0
  458. package/fr/how_works_intlayer.md +217 -0
  459. package/fr/index.md +122 -0
  460. package/fr/interest_of_intlayer.md +132 -0
  461. package/fr/intlayer_CMS.md +334 -0
  462. package/fr/intlayer_cli.md +274 -0
  463. package/fr/intlayer_visual_editor.md +210 -0
  464. package/fr/intlayer_with_angular.md +3 -0
  465. package/fr/intlayer_with_create_react_app.md +1192 -0
  466. package/fr/intlayer_with_express.md +270 -0
  467. package/fr/intlayer_with_lynx+react.md +466 -0
  468. package/fr/intlayer_with_nextjs_14.md +1258 -0
  469. package/fr/intlayer_with_nextjs_15.md +1308 -0
  470. package/fr/intlayer_with_nextjs_page_router.md +1085 -0
  471. package/fr/intlayer_with_react_native+expo.md +535 -0
  472. package/fr/intlayer_with_vite+preact.md +1621 -0
  473. package/fr/intlayer_with_vite+react.md +1589 -0
  474. package/fr/intlayer_with_vite+solid.md +3 -0
  475. package/fr/intlayer_with_vite+svelte.md +3 -0
  476. package/fr/intlayer_with_vite+vue.md +947 -0
  477. package/fr/introduction.md +190 -0
  478. package/fr/mcp_server.md +152 -0
  479. package/fr/packages/@intlayer/api/index.md +31 -0
  480. package/fr/packages/@intlayer/chokidar/index.md +31 -0
  481. package/fr/packages/@intlayer/cli/index.md +21 -0
  482. package/fr/packages/@intlayer/config/index.md +116 -0
  483. package/fr/packages/@intlayer/core/index.md +25 -0
  484. package/fr/packages/@intlayer/design-system/index.md +21 -0
  485. package/fr/packages/@intlayer/dictionary-entry/index.md +21 -0
  486. package/fr/packages/@intlayer/editor/index.md +21 -0
  487. package/fr/packages/@intlayer/editor-react/index.md +21 -0
  488. package/fr/packages/@intlayer/webpack/index.md +35 -0
  489. package/fr/packages/angular-intlayer/index.md +3 -0
  490. package/fr/packages/express-intlayer/index.md +238 -0
  491. package/fr/packages/express-intlayer/t.md +432 -0
  492. package/fr/packages/intlayer/getConfiguration.md +120 -0
  493. package/fr/packages/intlayer/getEnumeration.md +138 -0
  494. package/fr/packages/intlayer/getHTMLTextDir.md +97 -0
  495. package/fr/packages/intlayer/getLocaleLang.md +57 -0
  496. package/fr/packages/intlayer/getLocaleName.md +93 -0
  497. package/fr/packages/intlayer/getLocalizedUrl.md +221 -0
  498. package/fr/packages/intlayer/getMultilingualUrls.md +198 -0
  499. package/fr/packages/intlayer/getPathWithoutLocale.md +50 -0
  500. package/fr/packages/intlayer/getTranslation.md +166 -0
  501. package/fr/packages/intlayer/getTranslationContent.md +166 -0
  502. package/fr/packages/intlayer/index.md +476 -0
  503. package/fr/packages/intlayer-cli/index.md +41 -0
  504. package/fr/packages/intlayer-editor/index.md +115 -0
  505. package/fr/packages/lynx-intlayer/index.md +58 -0
  506. package/fr/packages/next-intlayer/index.md +266 -0
  507. package/fr/packages/next-intlayer/t.md +325 -0
  508. package/fr/packages/next-intlayer/useDictionary.md +242 -0
  509. package/fr/packages/next-intlayer/useIntlayer.md +237 -0
  510. package/fr/packages/next-intlayer/useIntlayerAsync.md +211 -0
  511. package/fr/packages/next-intlayer/useLocale.md +105 -0
  512. package/fr/packages/preact-intlayer/index.md +3 -0
  513. package/fr/packages/react-intlayer/index.md +257 -0
  514. package/fr/packages/react-intlayer/t.md +277 -0
  515. package/fr/packages/react-intlayer/useDictionary.md +269 -0
  516. package/fr/packages/react-intlayer/useIntlayer.md +234 -0
  517. package/fr/packages/react-intlayer/useIntlayerAsync.md +226 -0
  518. package/fr/packages/react-intlayer/useLocale.md +184 -0
  519. package/fr/packages/react-native-intlayer/index.md +57 -0
  520. package/fr/packages/react-scripts-intlayer/index.md +57 -0
  521. package/fr/packages/solid-intlayer/index.md +3 -0
  522. package/fr/packages/svelte-intlayer/index.md +3 -0
  523. package/fr/packages/vite-intlayer/index.md +53 -0
  524. package/fr/packages/vue-intlayer/index.md +3 -0
  525. package/fr/per_locale_file.md +297 -0
  526. package/fr/privacy_notice.md +57 -0
  527. package/fr/roadmap.md +206 -0
  528. package/fr/terms_of_service.md +33 -0
  529. package/fr/vs_code_extension.md +139 -0
  530. package/hi/CI_CD.md +149 -0
  531. package/hi/autoFill.md +157 -0
  532. package/hi/configuration.md +509 -0
  533. package/hi/dictionary/condition.md +213 -0
  534. package/hi/dictionary/content_extention_customization.md +81 -0
  535. package/hi/dictionary/enumeration.md +221 -0
  536. package/hi/dictionary/file.md +209 -0
  537. package/hi/dictionary/function_fetching.md +188 -0
  538. package/hi/dictionary/get_started.md +490 -0
  539. package/hi/dictionary/insertion.md +167 -0
  540. package/hi/dictionary/markdown.md +344 -0
  541. package/hi/dictionary/nesting.md +249 -0
  542. package/hi/dictionary/translation.md +307 -0
  543. package/hi/header.md +7 -0
  544. package/hi/how_works_intlayer.md +217 -0
  545. package/hi/index.md +125 -0
  546. package/hi/interest_of_intlayer.md +132 -0
  547. package/hi/intlayer_CMS.md +334 -0
  548. package/hi/intlayer_cli.md +274 -0
  549. package/hi/intlayer_visual_editor.md +210 -0
  550. package/hi/intlayer_with_angular.md +3 -0
  551. package/hi/intlayer_with_create_react_app.md +1395 -0
  552. package/hi/intlayer_with_express.md +273 -0
  553. package/hi/intlayer_with_lynx+react.md +456 -0
  554. package/hi/intlayer_with_nextjs_14.md +1283 -0
  555. package/hi/intlayer_with_nextjs_15.md +1319 -0
  556. package/hi/intlayer_with_nextjs_page_router.md +1097 -0
  557. package/hi/intlayer_with_react_native+expo.md +554 -0
  558. package/hi/intlayer_with_vite+preact.md +1538 -0
  559. package/hi/intlayer_with_vite+react.md +1540 -0
  560. package/hi/intlayer_with_vite+solid.md +3 -0
  561. package/hi/intlayer_with_vite+svelte.md +3 -0
  562. package/hi/intlayer_with_vite+vue.md +840 -0
  563. package/hi/introduction.md +190 -0
  564. package/hi/mcp_server.md +150 -0
  565. package/hi/packages/@intlayer/api/index.md +31 -0
  566. package/hi/packages/@intlayer/chokidar/index.md +31 -0
  567. package/hi/packages/@intlayer/cli/index.md +21 -0
  568. package/hi/packages/@intlayer/config/index.md +116 -0
  569. package/hi/packages/@intlayer/core/index.md +25 -0
  570. package/hi/packages/@intlayer/design-system/index.md +21 -0
  571. package/hi/packages/@intlayer/dictionary-entry/index.md +21 -0
  572. package/hi/packages/@intlayer/editor/index.md +21 -0
  573. package/hi/packages/@intlayer/editor-react/index.md +21 -0
  574. package/hi/packages/@intlayer/webpack/index.md +35 -0
  575. package/hi/packages/angular-intlayer/index.md +3 -0
  576. package/hi/packages/express-intlayer/index.md +232 -0
  577. package/hi/packages/express-intlayer/t.md +445 -0
  578. package/hi/packages/intlayer/getConfiguration.md +120 -0
  579. package/hi/packages/intlayer/getEnumeration.md +138 -0
  580. package/hi/packages/intlayer/getHTMLTextDir.md +97 -0
  581. package/hi/packages/intlayer/getLocaleLang.md +57 -0
  582. package/hi/packages/intlayer/getLocaleName.md +93 -0
  583. package/hi/packages/intlayer/getLocalizedUrl.md +221 -0
  584. package/hi/packages/intlayer/getMultilingualUrls.md +198 -0
  585. package/hi/packages/intlayer/getPathWithoutLocale.md +50 -0
  586. package/hi/packages/intlayer/getTranslation.md +175 -0
  587. package/hi/packages/intlayer/getTranslationContent.md +175 -0
  588. package/hi/packages/intlayer/index.md +314 -0
  589. package/hi/packages/intlayer-cli/index.md +41 -0
  590. package/hi/packages/intlayer-editor/index.md +113 -0
  591. package/hi/packages/lynx-intlayer/index.md +58 -0
  592. package/hi/packages/next-intlayer/index.md +270 -0
  593. package/hi/packages/next-intlayer/t.md +337 -0
  594. package/hi/packages/next-intlayer/useDictionary.md +248 -0
  595. package/hi/packages/next-intlayer/useIntlayer.md +237 -0
  596. package/hi/packages/next-intlayer/useIntlayerAsync.md +211 -0
  597. package/hi/packages/next-intlayer/useLocale.md +105 -0
  598. package/hi/packages/preact-intlayer/index.md +3 -0
  599. package/hi/packages/react-intlayer/index.md +261 -0
  600. package/hi/packages/react-intlayer/t.md +283 -0
  601. package/hi/packages/react-intlayer/useDictionary.md +268 -0
  602. package/hi/packages/react-intlayer/useIntlayer.md +225 -0
  603. package/hi/packages/react-intlayer/useIntlayerAsync.md +226 -0
  604. package/hi/packages/react-intlayer/useLocale.md +184 -0
  605. package/hi/packages/react-native-intlayer/index.md +57 -0
  606. package/hi/packages/react-scripts-intlayer/index.md +57 -0
  607. package/hi/packages/solid-intlayer/index.md +3 -0
  608. package/hi/packages/svelte-intlayer/index.md +3 -0
  609. package/hi/packages/vite-intlayer/index.md +53 -0
  610. package/hi/packages/vue-intlayer/index.md +3 -0
  611. package/hi/per_locale_file.md +298 -0
  612. package/hi/privacy_notice.md +61 -0
  613. package/hi/roadmap.md +206 -0
  614. package/hi/terms_of_service.md +33 -0
  615. package/hi/vs_code_extension.md +139 -0
  616. package/index.cjs +1265 -0
  617. package/index.d.ts +100 -0
  618. package/it/CI_CD.md +149 -0
  619. package/it/autoFill.md +157 -0
  620. package/it/configuration.md +503 -0
  621. package/it/dictionary/condition.md +213 -0
  622. package/it/dictionary/content_extention_customization.md +81 -0
  623. package/it/dictionary/enumeration.md +221 -0
  624. package/it/dictionary/file.md +207 -0
  625. package/it/dictionary/function_fetching.md +190 -0
  626. package/it/dictionary/get_started.md +466 -0
  627. package/it/dictionary/insertion.md +161 -0
  628. package/it/dictionary/markdown.md +343 -0
  629. package/it/dictionary/nesting.md +249 -0
  630. package/it/dictionary/translation.md +287 -0
  631. package/it/header.md +7 -0
  632. package/it/how_works_intlayer.md +217 -0
  633. package/it/index.md +125 -0
  634. package/it/interest_of_intlayer.md +132 -0
  635. package/it/intlayer_CMS.md +334 -0
  636. package/it/intlayer_cli.md +274 -0
  637. package/it/intlayer_visual_editor.md +210 -0
  638. package/it/intlayer_with_angular.md +3 -0
  639. package/it/intlayer_with_create_react_app.md +413 -0
  640. package/it/intlayer_with_express.md +267 -0
  641. package/it/intlayer_with_lynx+react.md +482 -0
  642. package/it/intlayer_with_nextjs_14.md +1269 -0
  643. package/it/intlayer_with_nextjs_15.md +1319 -0
  644. package/it/intlayer_with_nextjs_page_router.md +1095 -0
  645. package/it/intlayer_with_react_native+expo.md +261 -0
  646. package/it/intlayer_with_vite+preact.md +1681 -0
  647. package/it/intlayer_with_vite+react.md +1580 -0
  648. package/it/intlayer_with_vite+solid.md +3 -0
  649. package/it/intlayer_with_vite+svelte.md +3 -0
  650. package/it/intlayer_with_vite+vue.md +989 -0
  651. package/it/introduction.md +192 -0
  652. package/it/mcp_server.md +152 -0
  653. package/it/packages/@intlayer/api/index.md +31 -0
  654. package/it/packages/@intlayer/chokidar/index.md +31 -0
  655. package/it/packages/@intlayer/cli/index.md +21 -0
  656. package/it/packages/@intlayer/config/index.md +116 -0
  657. package/it/packages/@intlayer/core/index.md +25 -0
  658. package/it/packages/@intlayer/design-system/index.md +21 -0
  659. package/it/packages/@intlayer/dictionary-entry/index.md +21 -0
  660. package/it/packages/@intlayer/editor/index.md +21 -0
  661. package/it/packages/@intlayer/editor-react/index.md +21 -0
  662. package/it/packages/@intlayer/webpack/index.md +35 -0
  663. package/it/packages/angular-intlayer/index.md +3 -0
  664. package/it/packages/express-intlayer/index.md +229 -0
  665. package/it/packages/express-intlayer/t.md +432 -0
  666. package/it/packages/intlayer/getConfiguration.md +120 -0
  667. package/it/packages/intlayer/getEnumeration.md +138 -0
  668. package/it/packages/intlayer/getHTMLTextDir.md +97 -0
  669. package/it/packages/intlayer/getLocaleLang.md +57 -0
  670. package/it/packages/intlayer/getLocaleName.md +93 -0
  671. package/it/packages/intlayer/getLocalizedUrl.md +221 -0
  672. package/it/packages/intlayer/getMultilingualUrls.md +200 -0
  673. package/it/packages/intlayer/getPathWithoutLocale.md +50 -0
  674. package/it/packages/intlayer/getTranslation.md +166 -0
  675. package/it/packages/intlayer/getTranslationContent.md +166 -0
  676. package/it/packages/intlayer/index.md +479 -0
  677. package/it/packages/intlayer-cli/index.md +41 -0
  678. package/it/packages/intlayer-editor/index.md +113 -0
  679. package/it/packages/lynx-intlayer/index.md +58 -0
  680. package/it/packages/next-intlayer/index.md +267 -0
  681. package/it/packages/next-intlayer/t.md +326 -0
  682. package/it/packages/next-intlayer/useDictionary.md +242 -0
  683. package/it/packages/next-intlayer/useIntlayer.md +237 -0
  684. package/it/packages/next-intlayer/useIntlayerAsync.md +211 -0
  685. package/it/packages/next-intlayer/useLocale.md +105 -0
  686. package/it/packages/preact-intlayer/index.md +3 -0
  687. package/it/packages/react-intlayer/index.md +260 -0
  688. package/it/packages/react-intlayer/t.md +277 -0
  689. package/it/packages/react-intlayer/useDictionary.md +260 -0
  690. package/it/packages/react-intlayer/useIntlayer.md +225 -0
  691. package/it/packages/react-intlayer/useIntlayerAsync.md +226 -0
  692. package/it/packages/react-intlayer/useLocale.md +184 -0
  693. package/it/packages/react-native-intlayer/index.md +57 -0
  694. package/it/packages/react-scripts-intlayer/index.md +57 -0
  695. package/it/packages/solid-intlayer/index.md +5 -0
  696. package/it/packages/svelte-intlayer/index.md +3 -0
  697. package/it/packages/vite-intlayer/index.md +53 -0
  698. package/it/packages/vue-intlayer/index.md +5 -0
  699. package/it/per_locale_file.md +298 -0
  700. package/it/privacy_notice.md +61 -0
  701. package/it/roadmap.md +206 -0
  702. package/it/terms_of_service.md +33 -0
  703. package/it/vs_code_extension.md +139 -0
  704. package/ja/CI_CD.md +149 -0
  705. package/ja/autoFill.md +157 -0
  706. package/ja/configuration.md +507 -0
  707. package/ja/dictionary/condition.md +213 -0
  708. package/ja/dictionary/content_extention_customization.md +81 -0
  709. package/ja/dictionary/enumeration.md +221 -0
  710. package/ja/dictionary/file.md +209 -0
  711. package/ja/dictionary/function_fetching.md +190 -0
  712. package/ja/dictionary/get_started.md +466 -0
  713. package/ja/dictionary/insertion.md +161 -0
  714. package/ja/dictionary/markdown.md +343 -0
  715. package/ja/dictionary/nesting.md +249 -0
  716. package/ja/dictionary/translation.md +287 -0
  717. package/ja/header.md +7 -0
  718. package/ja/how_works_intlayer.md +217 -0
  719. package/ja/index.md +125 -0
  720. package/ja/interest_of_intlayer.md +132 -0
  721. package/ja/intlayer_CMS.md +334 -0
  722. package/ja/intlayer_cli.md +274 -0
  723. package/ja/intlayer_visual_editor.md +213 -0
  724. package/ja/intlayer_with_angular.md +3 -0
  725. package/ja/intlayer_with_create_react_app.md +1186 -0
  726. package/ja/intlayer_with_express.md +267 -0
  727. package/ja/intlayer_with_lynx+react.md +482 -0
  728. package/ja/intlayer_with_nextjs_14.md +1256 -0
  729. package/ja/intlayer_with_nextjs_15.md +1308 -0
  730. package/ja/intlayer_with_nextjs_page_router.md +1085 -0
  731. package/ja/intlayer_with_react_native+expo.md +537 -0
  732. package/ja/intlayer_with_vite+preact.md +1601 -0
  733. package/ja/intlayer_with_vite+react.md +1555 -0
  734. package/ja/intlayer_with_vite+solid.md +3 -0
  735. package/ja/intlayer_with_vite+svelte.md +3 -0
  736. package/ja/intlayer_with_vite+vue.md +990 -0
  737. package/ja/introduction.md +186 -0
  738. package/ja/mcp_server.md +150 -0
  739. package/ja/packages/@intlayer/api/index.md +31 -0
  740. package/ja/packages/@intlayer/chokidar/index.md +31 -0
  741. package/ja/packages/@intlayer/cli/index.md +21 -0
  742. package/ja/packages/@intlayer/config/index.md +116 -0
  743. package/ja/packages/@intlayer/core/index.md +25 -0
  744. package/ja/packages/@intlayer/design-system/index.md +21 -0
  745. package/ja/packages/@intlayer/dictionary-entry/index.md +21 -0
  746. package/ja/packages/@intlayer/editor/index.md +21 -0
  747. package/ja/packages/@intlayer/editor-react/index.md +21 -0
  748. package/ja/packages/@intlayer/webpack/index.md +35 -0
  749. package/ja/packages/angular-intlayer/index.md +3 -0
  750. package/ja/packages/express-intlayer/index.md +229 -0
  751. package/ja/packages/express-intlayer/t.md +432 -0
  752. package/ja/packages/intlayer/getConfiguration.md +120 -0
  753. package/ja/packages/intlayer/getEnumeration.md +140 -0
  754. package/ja/packages/intlayer/getHTMLTextDir.md +97 -0
  755. package/ja/packages/intlayer/getLocaleLang.md +59 -0
  756. package/ja/packages/intlayer/getLocaleName.md +93 -0
  757. package/ja/packages/intlayer/getLocalizedUrl.md +221 -0
  758. package/ja/packages/intlayer/getMultilingualUrls.md +198 -0
  759. package/ja/packages/intlayer/getPathWithoutLocale.md +50 -0
  760. package/ja/packages/intlayer/getTranslation.md +166 -0
  761. package/ja/packages/intlayer/getTranslationContent.md +166 -0
  762. package/ja/packages/intlayer/index.md +479 -0
  763. package/ja/packages/intlayer-cli/index.md +41 -0
  764. package/ja/packages/intlayer-editor/index.md +115 -0
  765. package/ja/packages/lynx-intlayer/index.md +58 -0
  766. package/ja/packages/next-intlayer/index.md +263 -0
  767. package/ja/packages/next-intlayer/t.md +326 -0
  768. package/ja/packages/next-intlayer/useDictionary.md +242 -0
  769. package/ja/packages/next-intlayer/useIntlayer.md +237 -0
  770. package/ja/packages/next-intlayer/useIntlayerAsync.md +211 -0
  771. package/ja/packages/next-intlayer/useLocale.md +105 -0
  772. package/ja/packages/preact-intlayer/index.md +3 -0
  773. package/ja/packages/react-intlayer/index.md +257 -0
  774. package/ja/packages/react-intlayer/t.md +277 -0
  775. package/ja/packages/react-intlayer/useDictionary.md +260 -0
  776. package/ja/packages/react-intlayer/useIntlayer.md +225 -0
  777. package/ja/packages/react-intlayer/useIntlayerAsync.md +226 -0
  778. package/ja/packages/react-intlayer/useLocale.md +184 -0
  779. package/ja/packages/react-native-intlayer/index.md +57 -0
  780. package/ja/packages/react-scripts-intlayer/index.md +57 -0
  781. package/ja/packages/solid-intlayer/index.md +3 -0
  782. package/ja/packages/svelte-intlayer/index.md +3 -0
  783. package/ja/packages/vite-intlayer/index.md +53 -0
  784. package/ja/packages/vue-intlayer/index.md +3 -0
  785. package/ja/per_locale_file.md +298 -0
  786. package/ja/privacy_notice.md +57 -0
  787. package/ja/roadmap.md +206 -0
  788. package/ja/terms_of_service.md +33 -0
  789. package/ja/vs_code_extension.md +139 -0
  790. package/ko/CI_CD.md +149 -0
  791. package/ko/autoFill.md +157 -0
  792. package/ko/configuration.md +507 -0
  793. package/ko/dictionary/condition.md +213 -0
  794. package/ko/dictionary/content_extention_customization.md +81 -0
  795. package/ko/dictionary/enumeration.md +221 -0
  796. package/ko/dictionary/file.md +207 -0
  797. package/ko/dictionary/function_fetching.md +190 -0
  798. package/ko/dictionary/get_started.md +466 -0
  799. package/ko/dictionary/insertion.md +167 -0
  800. package/ko/dictionary/markdown.md +343 -0
  801. package/ko/dictionary/nesting.md +249 -0
  802. package/ko/dictionary/translation.md +287 -0
  803. package/ko/header.md +7 -0
  804. package/ko/how_works_intlayer.md +216 -0
  805. package/ko/index.md +125 -0
  806. package/ko/interest_of_intlayer.md +132 -0
  807. package/ko/intlayer_CMS.md +334 -0
  808. package/ko/intlayer_cli.md +274 -0
  809. package/ko/intlayer_visual_editor.md +210 -0
  810. package/ko/intlayer_with_angular.md +3 -0
  811. package/ko/intlayer_with_create_react_app.md +1186 -0
  812. package/ko/intlayer_with_express.md +267 -0
  813. package/ko/intlayer_with_lynx+react.md +482 -0
  814. package/ko/intlayer_with_nextjs_14.md +1267 -0
  815. package/ko/intlayer_with_nextjs_15.md +1319 -0
  816. package/ko/intlayer_with_nextjs_page_router.md +1097 -0
  817. package/ko/intlayer_with_react_native+expo.md +537 -0
  818. package/ko/intlayer_with_vite+preact.md +1682 -0
  819. package/ko/intlayer_with_vite+react.md +1582 -0
  820. package/ko/intlayer_with_vite+solid.md +3 -0
  821. package/ko/intlayer_with_vite+svelte.md +3 -0
  822. package/ko/intlayer_with_vite+vue.md +988 -0
  823. package/ko/introduction.md +186 -0
  824. package/ko/mcp_server.md +150 -0
  825. package/ko/packages/@intlayer/api/index.md +31 -0
  826. package/ko/packages/@intlayer/chokidar/index.md +31 -0
  827. package/ko/packages/@intlayer/cli/index.md +21 -0
  828. package/ko/packages/@intlayer/config/index.md +116 -0
  829. package/ko/packages/@intlayer/core/index.md +25 -0
  830. package/ko/packages/@intlayer/design-system/index.md +21 -0
  831. package/ko/packages/@intlayer/dictionary-entry/index.md +21 -0
  832. package/ko/packages/@intlayer/editor/index.md +21 -0
  833. package/ko/packages/@intlayer/editor-react/index.md +21 -0
  834. package/ko/packages/@intlayer/webpack/index.md +35 -0
  835. package/ko/packages/angular-intlayer/index.md +5 -0
  836. package/ko/packages/express-intlayer/index.md +229 -0
  837. package/ko/packages/express-intlayer/t.md +432 -0
  838. package/ko/packages/intlayer/getConfiguration.md +120 -0
  839. package/ko/packages/intlayer/getEnumeration.md +138 -0
  840. package/ko/packages/intlayer/getHTMLTextDir.md +97 -0
  841. package/ko/packages/intlayer/getLocaleLang.md +57 -0
  842. package/ko/packages/intlayer/getLocaleName.md +93 -0
  843. package/ko/packages/intlayer/getLocalizedUrl.md +221 -0
  844. package/ko/packages/intlayer/getMultilingualUrls.md +198 -0
  845. package/ko/packages/intlayer/getPathWithoutLocale.md +50 -0
  846. package/ko/packages/intlayer/getTranslation.md +166 -0
  847. package/ko/packages/intlayer/getTranslationContent.md +166 -0
  848. package/ko/packages/intlayer/index.md +480 -0
  849. package/ko/packages/intlayer-cli/index.md +41 -0
  850. package/ko/packages/intlayer-editor/index.md +113 -0
  851. package/ko/packages/lynx-intlayer/index.md +58 -0
  852. package/ko/packages/next-intlayer/index.md +267 -0
  853. package/ko/packages/next-intlayer/t.md +337 -0
  854. package/ko/packages/next-intlayer/useDictionary.md +242 -0
  855. package/ko/packages/next-intlayer/useIntlayer.md +237 -0
  856. package/ko/packages/next-intlayer/useIntlayerAsync.md +211 -0
  857. package/ko/packages/next-intlayer/useLocale.md +105 -0
  858. package/ko/packages/preact-intlayer/index.md +3 -0
  859. package/ko/packages/react-intlayer/index.md +260 -0
  860. package/ko/packages/react-intlayer/t.md +277 -0
  861. package/ko/packages/react-intlayer/useDictionary.md +268 -0
  862. package/ko/packages/react-intlayer/useIntlayer.md +225 -0
  863. package/ko/packages/react-intlayer/useIntlayerAsync.md +226 -0
  864. package/ko/packages/react-intlayer/useLocale.md +184 -0
  865. package/ko/packages/react-native-intlayer/index.md +57 -0
  866. package/ko/packages/react-scripts-intlayer/index.md +57 -0
  867. package/ko/packages/solid-intlayer/index.md +3 -0
  868. package/ko/packages/svelte-intlayer/index.md +3 -0
  869. package/ko/packages/vite-intlayer/index.md +53 -0
  870. package/ko/packages/vue-intlayer/index.md +3 -0
  871. package/ko/per_locale_file.md +300 -0
  872. package/ko/privacy_notice.md +61 -0
  873. package/ko/roadmap.md +206 -0
  874. package/ko/terms_of_service.md +33 -0
  875. package/ko/vs_code_extension.md +139 -0
  876. package/package.json +96 -0
  877. package/pt/CI_CD.md +149 -0
  878. package/pt/autoFill.md +157 -0
  879. package/pt/configuration.md +503 -0
  880. package/pt/dictionary/condition.md +213 -0
  881. package/pt/dictionary/content_extention_customization.md +81 -0
  882. package/pt/dictionary/enumeration.md +221 -0
  883. package/pt/dictionary/file.md +210 -0
  884. package/pt/dictionary/function_fetching.md +190 -0
  885. package/pt/dictionary/get_started.md +490 -0
  886. package/pt/dictionary/insertion.md +161 -0
  887. package/pt/dictionary/markdown.md +339 -0
  888. package/pt/dictionary/nesting.md +249 -0
  889. package/pt/dictionary/translation.md +322 -0
  890. package/pt/header.md +7 -0
  891. package/pt/how_works_intlayer.md +216 -0
  892. package/pt/index.md +125 -0
  893. package/pt/interest_of_intlayer.md +132 -0
  894. package/pt/intlayer_CMS.md +334 -0
  895. package/pt/intlayer_cli.md +274 -0
  896. package/pt/intlayer_visual_editor.md +210 -0
  897. package/pt/intlayer_with_angular.md +3 -0
  898. package/pt/intlayer_with_create_react_app.md +1204 -0
  899. package/pt/intlayer_with_express.md +270 -0
  900. package/pt/intlayer_with_lynx+react.md +467 -0
  901. package/pt/intlayer_with_nextjs_14.md +1269 -0
  902. package/pt/intlayer_with_nextjs_15.md +1319 -0
  903. package/pt/intlayer_with_nextjs_page_router.md +1109 -0
  904. package/pt/intlayer_with_react_native+expo.md +259 -0
  905. package/pt/intlayer_with_vite+preact.md +1663 -0
  906. package/pt/intlayer_with_vite+react.md +1621 -0
  907. package/pt/intlayer_with_vite+solid.md +3 -0
  908. package/pt/intlayer_with_vite+svelte.md +3 -0
  909. package/pt/intlayer_with_vite+vue.md +989 -0
  910. package/pt/introduction.md +193 -0
  911. package/pt/mcp_server.md +150 -0
  912. package/pt/packages/@intlayer/api/index.md +31 -0
  913. package/pt/packages/@intlayer/chokidar/index.md +31 -0
  914. package/pt/packages/@intlayer/cli/index.md +21 -0
  915. package/pt/packages/@intlayer/config/index.md +116 -0
  916. package/pt/packages/@intlayer/core/index.md +25 -0
  917. package/pt/packages/@intlayer/design-system/index.md +21 -0
  918. package/pt/packages/@intlayer/dictionary-entry/index.md +21 -0
  919. package/pt/packages/@intlayer/editor/index.md +21 -0
  920. package/pt/packages/@intlayer/editor-react/index.md +21 -0
  921. package/pt/packages/@intlayer/webpack/index.md +35 -0
  922. package/pt/packages/angular-intlayer/index.md +3 -0
  923. package/pt/packages/express-intlayer/index.md +232 -0
  924. package/pt/packages/express-intlayer/t.md +267 -0
  925. package/pt/packages/intlayer/getConfiguration.md +120 -0
  926. package/pt/packages/intlayer/getEnumeration.md +138 -0
  927. package/pt/packages/intlayer/getHTMLTextDir.md +97 -0
  928. package/pt/packages/intlayer/getLocaleLang.md +57 -0
  929. package/pt/packages/intlayer/getLocaleName.md +93 -0
  930. package/pt/packages/intlayer/getLocalizedUrl.md +221 -0
  931. package/pt/packages/intlayer/getMultilingualUrls.md +198 -0
  932. package/pt/packages/intlayer/getPathWithoutLocale.md +50 -0
  933. package/pt/packages/intlayer/getTranslation.md +175 -0
  934. package/pt/packages/intlayer/getTranslationContent.md +177 -0
  935. package/pt/packages/intlayer/index.md +484 -0
  936. package/pt/packages/intlayer-cli/index.md +41 -0
  937. package/pt/packages/intlayer-editor/index.md +113 -0
  938. package/pt/packages/lynx-intlayer/index.md +58 -0
  939. package/pt/packages/next-intlayer/index.md +270 -0
  940. package/pt/packages/next-intlayer/t.md +341 -0
  941. package/pt/packages/next-intlayer/useDictionary.md +248 -0
  942. package/pt/packages/next-intlayer/useIntlayer.md +237 -0
  943. package/pt/packages/next-intlayer/useIntlayerAsync.md +211 -0
  944. package/pt/packages/next-intlayer/useLocale.md +105 -0
  945. package/pt/packages/preact-intlayer/index.md +3 -0
  946. package/pt/packages/react-intlayer/index.md +261 -0
  947. package/pt/packages/react-intlayer/t.md +289 -0
  948. package/pt/packages/react-intlayer/useDictionary.md +268 -0
  949. package/pt/packages/react-intlayer/useIntlayer.md +225 -0
  950. package/pt/packages/react-intlayer/useIntlayerAsync.md +226 -0
  951. package/pt/packages/react-intlayer/useLocale.md +184 -0
  952. package/pt/packages/react-native-intlayer/index.md +57 -0
  953. package/pt/packages/react-scripts-intlayer/index.md +57 -0
  954. package/pt/packages/solid-intlayer/index.md +3 -0
  955. package/pt/packages/svelte-intlayer/index.md +3 -0
  956. package/pt/packages/vite-intlayer/index.md +53 -0
  957. package/pt/packages/vue-intlayer/index.md +3 -0
  958. package/pt/per_locale_file.md +298 -0
  959. package/pt/privacy_notice.md +61 -0
  960. package/pt/roadmap.md +206 -0
  961. package/pt/terms_of_service.md +33 -0
  962. package/pt/vs_code_extension.md +139 -0
  963. package/ru/CI_CD.md +149 -0
  964. package/ru/autoFill.md +157 -0
  965. package/ru/configuration.md +507 -0
  966. package/ru/dictionary/condition.md +213 -0
  967. package/ru/dictionary/content_extention_customization.md +81 -0
  968. package/ru/dictionary/enumeration.md +221 -0
  969. package/ru/dictionary/file.md +209 -0
  970. package/ru/dictionary/function_fetching.md +188 -0
  971. package/ru/dictionary/get_started.md +311 -0
  972. package/ru/dictionary/insertion.md +161 -0
  973. package/ru/dictionary/markdown.md +339 -0
  974. package/ru/dictionary/nesting.md +249 -0
  975. package/ru/dictionary/translation.md +322 -0
  976. package/ru/environment/angular.md +3 -0
  977. package/ru/header.md +7 -0
  978. package/ru/how_works_intlayer.md +217 -0
  979. package/ru/index.md +125 -0
  980. package/ru/interest_of_intlayer.md +132 -0
  981. package/ru/intlayer_CMS.md +334 -0
  982. package/ru/intlayer_cli.md +274 -0
  983. package/ru/intlayer_visual_editor.md +210 -0
  984. package/ru/intlayer_with_angular.md +3 -0
  985. package/ru/intlayer_with_create_react_app.md +1196 -0
  986. package/ru/intlayer_with_express.md +273 -0
  987. package/ru/intlayer_with_lynx+react.md +482 -0
  988. package/ru/intlayer_with_nextjs_14.md +1274 -0
  989. package/ru/intlayer_with_nextjs_15.md +1318 -0
  990. package/ru/intlayer_with_nextjs_page_router.md +1100 -0
  991. package/ru/intlayer_with_react_native+expo.md +537 -0
  992. package/ru/intlayer_with_vite+preact.md +1663 -0
  993. package/ru/intlayer_with_vite+react.md +1546 -0
  994. package/ru/intlayer_with_vite+solid.md +3 -0
  995. package/ru/intlayer_with_vite+svelte.md +3 -0
  996. package/ru/intlayer_with_vite+vue.md +987 -0
  997. package/ru/introduction.md +190 -0
  998. package/ru/mcp_server.md +152 -0
  999. package/ru/packages/@intlayer/api/index.md +31 -0
  1000. package/ru/packages/@intlayer/chokidar/index.md +31 -0
  1001. package/ru/packages/@intlayer/cli/index.md +23 -0
  1002. package/ru/packages/@intlayer/config/index.md +116 -0
  1003. package/ru/packages/@intlayer/core/index.md +25 -0
  1004. package/ru/packages/@intlayer/design-system/index.md +21 -0
  1005. package/ru/packages/@intlayer/dictionary-entry/index.md +21 -0
  1006. package/ru/packages/@intlayer/editor/index.md +21 -0
  1007. package/ru/packages/@intlayer/editor-react/index.md +21 -0
  1008. package/ru/packages/@intlayer/webpack/index.md +35 -0
  1009. package/ru/packages/angular-intlayer/index.md +3 -0
  1010. package/ru/packages/express-intlayer/index.md +235 -0
  1011. package/ru/packages/express-intlayer/t.md +445 -0
  1012. package/ru/packages/intlayer/getConfiguration.md +120 -0
  1013. package/ru/packages/intlayer/getEnumeration.md +140 -0
  1014. package/ru/packages/intlayer/getHTMLTextDir.md +97 -0
  1015. package/ru/packages/intlayer/getLocaleLang.md +59 -0
  1016. package/ru/packages/intlayer/getLocaleName.md +93 -0
  1017. package/ru/packages/intlayer/getLocalizedUrl.md +221 -0
  1018. package/ru/packages/intlayer/getMultilingualUrls.md +198 -0
  1019. package/ru/packages/intlayer/getPathWithoutLocale.md +50 -0
  1020. package/ru/packages/intlayer/getTranslation.md +177 -0
  1021. package/ru/packages/intlayer/getTranslationContent.md +175 -0
  1022. package/ru/packages/intlayer/index.md +275 -0
  1023. package/ru/packages/intlayer-cli/index.md +41 -0
  1024. package/ru/packages/intlayer-editor/index.md +115 -0
  1025. package/ru/packages/lynx-intlayer/index.md +58 -0
  1026. package/ru/packages/next-intlayer/index.md +267 -0
  1027. package/ru/packages/next-intlayer/t.md +340 -0
  1028. package/ru/packages/next-intlayer/useDictionary.md +248 -0
  1029. package/ru/packages/next-intlayer/useIntlayer.md +237 -0
  1030. package/ru/packages/next-intlayer/useIntlayerAsync.md +211 -0
  1031. package/ru/packages/next-intlayer/useLocale.md +105 -0
  1032. package/ru/packages/preact-intlayer/index.md +3 -0
  1033. package/ru/packages/react-intlayer/index.md +261 -0
  1034. package/ru/packages/react-intlayer/t.md +289 -0
  1035. package/ru/packages/react-intlayer/useDictionary.md +268 -0
  1036. package/ru/packages/react-intlayer/useIntlayer.md +225 -0
  1037. package/ru/packages/react-intlayer/useIntlayerAsync.md +226 -0
  1038. package/ru/packages/react-intlayer/useLocale.md +184 -0
  1039. package/ru/packages/react-native-intlayer/index.md +57 -0
  1040. package/ru/packages/react-scripts-intlayer/index.md +57 -0
  1041. package/ru/packages/solid-intlayer/index.md +3 -0
  1042. package/ru/packages/svelte-intlayer/index.md +3 -0
  1043. package/ru/packages/vite-intlayer/index.md +53 -0
  1044. package/ru/packages/vue-intlayer/index.md +3 -0
  1045. package/ru/per_locale_file.md +298 -0
  1046. package/ru/privacy_notice.md +61 -0
  1047. package/ru/roadmap.md +206 -0
  1048. package/ru/terms_of_service.md +33 -0
  1049. package/ru/vs_code_extension.md +139 -0
  1050. package/zh/CI_CD.md +149 -0
  1051. package/zh/autoFill.md +157 -0
  1052. package/zh/configuration.md +484 -0
  1053. package/zh/dictionary/condition.md +213 -0
  1054. package/zh/dictionary/content_extention_customization.md +81 -0
  1055. package/zh/dictionary/enumeration.md +221 -0
  1056. package/zh/dictionary/file.md +209 -0
  1057. package/zh/dictionary/function_fetching.md +188 -0
  1058. package/zh/dictionary/get_started.md +490 -0
  1059. package/zh/dictionary/insertion.md +161 -0
  1060. package/zh/dictionary/markdown.md +342 -0
  1061. package/zh/dictionary/nesting.md +249 -0
  1062. package/zh/dictionary/translation.md +287 -0
  1063. package/zh/header.md +7 -0
  1064. package/zh/how_works_intlayer.md +217 -0
  1065. package/zh/index.md +125 -0
  1066. package/zh/interest_of_intlayer.md +132 -0
  1067. package/zh/intlayer_CMS.md +334 -0
  1068. package/zh/intlayer_cli.md +274 -0
  1069. package/zh/intlayer_visual_editor.md +210 -0
  1070. package/zh/intlayer_with_angular.md +3 -0
  1071. package/zh/intlayer_with_create_react_app.md +1196 -0
  1072. package/zh/intlayer_with_express.md +267 -0
  1073. package/zh/intlayer_with_lynx+react.md +484 -0
  1074. package/zh/intlayer_with_nextjs_14.md +1286 -0
  1075. package/zh/intlayer_with_nextjs_15.md +1322 -0
  1076. package/zh/intlayer_with_nextjs_page_router.md +1097 -0
  1077. package/zh/intlayer_with_react_native+expo.md +539 -0
  1078. package/zh/intlayer_with_vite+preact.md +1681 -0
  1079. package/zh/intlayer_with_vite+react.md +1577 -0
  1080. package/zh/intlayer_with_vite+solid.md +3 -0
  1081. package/zh/intlayer_with_vite+svelte.md +3 -0
  1082. package/zh/intlayer_with_vite+vue.md +988 -0
  1083. package/zh/introduction.md +186 -0
  1084. package/zh/mcp_server.md +152 -0
  1085. package/zh/packages/@intlayer/api/index.md +31 -0
  1086. package/zh/packages/@intlayer/chokidar/index.md +31 -0
  1087. package/zh/packages/@intlayer/cli/index.md +21 -0
  1088. package/zh/packages/@intlayer/config/index.md +116 -0
  1089. package/zh/packages/@intlayer/core/index.md +25 -0
  1090. package/zh/packages/@intlayer/design-system/index.md +21 -0
  1091. package/zh/packages/@intlayer/dictionary-entry/index.md +21 -0
  1092. package/zh/packages/@intlayer/editor/index.md +21 -0
  1093. package/zh/packages/@intlayer/editor-react/index.md +21 -0
  1094. package/zh/packages/@intlayer/webpack/index.md +35 -0
  1095. package/zh/packages/angular-intlayer/index.md +3 -0
  1096. package/zh/packages/express-intlayer/index.md +229 -0
  1097. package/zh/packages/express-intlayer/t.md +432 -0
  1098. package/zh/packages/intlayer/getConfiguration.md +120 -0
  1099. package/zh/packages/intlayer/getEnumeration.md +140 -0
  1100. package/zh/packages/intlayer/getHTMLTextDir.md +97 -0
  1101. package/zh/packages/intlayer/getLocaleLang.md +57 -0
  1102. package/zh/packages/intlayer/getLocaleName.md +93 -0
  1103. package/zh/packages/intlayer/getLocalizedUrl.md +221 -0
  1104. package/zh/packages/intlayer/getMultilingualUrls.md +198 -0
  1105. package/zh/packages/intlayer/getPathWithoutLocale.md +50 -0
  1106. package/zh/packages/intlayer/getTranslation.md +166 -0
  1107. package/zh/packages/intlayer/getTranslationContent.md +166 -0
  1108. package/zh/packages/intlayer/index.md +360 -0
  1109. package/zh/packages/intlayer-cli/index.md +41 -0
  1110. package/zh/packages/intlayer-editor/index.md +113 -0
  1111. package/zh/packages/lynx-intlayer/index.md +60 -0
  1112. package/zh/packages/next-intlayer/index.md +267 -0
  1113. package/zh/packages/next-intlayer/t.md +338 -0
  1114. package/zh/packages/next-intlayer/useDictionary.md +242 -0
  1115. package/zh/packages/next-intlayer/useIntlayer.md +237 -0
  1116. package/zh/packages/next-intlayer/useIntlayerAsync.md +211 -0
  1117. package/zh/packages/next-intlayer/useLocale.md +105 -0
  1118. package/zh/packages/preact-intlayer/index.md +3 -0
  1119. package/zh/packages/react-intlayer/index.md +257 -0
  1120. package/zh/packages/react-intlayer/t.md +271 -0
  1121. package/zh/packages/react-intlayer/useDictionary.md +260 -0
  1122. package/zh/packages/react-intlayer/useIntlayer.md +225 -0
  1123. package/zh/packages/react-intlayer/useIntlayerAsync.md +226 -0
  1124. package/zh/packages/react-intlayer/useLocale.md +184 -0
  1125. package/zh/packages/react-native-intlayer/index.md +57 -0
  1126. package/zh/packages/react-scripts-intlayer/index.md +57 -0
  1127. package/zh/packages/solid-intlayer/index.md +3 -0
  1128. package/zh/packages/svelte-intlayer/index.md +3 -0
  1129. package/zh/packages/vite-intlayer/index.md +53 -0
  1130. package/zh/packages/vue-intlayer/index.md +3 -0
  1131. package/zh/per_locale_file.md +298 -0
  1132. package/zh/privacy_notice.md +61 -0
  1133. package/zh/roadmap.md +206 -0
  1134. package/zh/terms_of_service.md +33 -0
  1135. package/zh/vs_code_extension.md +139 -0
@@ -0,0 +1,1430 @@
1
+ # Getting Started Internationalising (i18n) with Intlayer and Vite and React
2
+
3
+ <iframe title="Vite + React: Build a Multilingual App from Scratch using 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/dS9L7uJeak4?autoplay=0&amp;origin=http://intlayer.org&amp;controls=0&amp;rel=1"/>
4
+
5
+ See [Application Template](https://github.com/aymericzip/intlayer-vite-react-template) on GitHub.
6
+
7
+ ## What is Intlayer?
8
+
9
+ **Intlayer** is an innovative, open-source internationalisation (i18n) library designed to simplify multilingual support in modern web applications.
10
+
11
+ With Intlayer, you can:
12
+
13
+ - **Easily manage translations** using declarative dictionaries at the component level.
14
+ - **Dynamically localise metadata**, routes, and content.
15
+ - **Ensure TypeScript support** with autogenerated types, improving autocompletion and error detection.
16
+ - **Benefit from advanced features**, like dynamic locale detection and switching.
17
+
18
+ ---
19
+
20
+ ## Step-by-Step Guide to Set Up Intlayer in a Vite and React Application
21
+
22
+ ### Step 1: Install Dependencies
23
+
24
+ Install the necessary packages using npm:
25
+
26
+ ```bash packageManager="npm"
27
+ npm install intlayer react-intlayer vite-intlayer
28
+ ```
29
+
30
+ ```bash packageManager="pnpm"
31
+ pnpm add intlayer react-intlayer vite-intlayer
32
+ ```
33
+
34
+ ```bash packageManager="yarn"
35
+ yarn add intlayer react-intlayer vite-intlayer
36
+ ```
37
+
38
+ - **intlayer**
39
+
40
+ The core package that provides internationalisation tools for configuration management, translation, [content declaration](https://github.com/aymericzip/intlayer/blob/main/docs/en-GB/dictionary/get_started.md), transpilation, and [CLI commands](https://github.com/aymericzip/intlayer/blob/main/docs/en-GB/intlayer_cli.md).
41
+
42
+ - **react-intlayer**
43
+ The package that integrates Intlayer with React application. It provides context providers and hooks for React internationalisation.
44
+
45
+ - **vite-intlayer**
46
+ Includes the Vite plugin for integrating Intlayer with the [Vite bundler](https://vite.dev/guide/why.html#why-bundle-for-production), as well as middleware for detecting the user's preferred locale, managing cookies, and handling URL redirection.
47
+
48
+ ### Step 2: Configuration of your project
49
+
50
+ Create a config file to configure the languages of your application:
51
+
52
+ ```typescript fileName="intlayer.config.ts" codeFormat="typescript"
53
+ import { Locales, type IntlayerConfig } from "intlayer";
54
+
55
+ const config: IntlayerConfig = {
56
+ internationalisation: {
57
+ locales: [
58
+ Locales.ENGLISH,
59
+ Locales.FRENCH,
60
+ Locales.SPANISH,
61
+ // Your other locales
62
+ ],
63
+ defaultLocale: Locales.ENGLISH,
64
+ },
65
+ };
66
+
67
+ export default config;
68
+ ```
69
+
70
+ ```javascript fileName="intlayer.config.mjs" codeFormat="esm"
71
+ import { Locales } from "intlayer";
72
+
73
+ /** @type {import('intlayer').IntlayerConfig} */
74
+ const config = {
75
+ internationalisation: {
76
+ locales: [
77
+ Locales.ENGLISH,
78
+ Locales.FRENCH,
79
+ Locales.SPANISH,
80
+ // Your other locales
81
+ ],
82
+ defaultLocale: Locales.ENGLISH,
83
+ },
84
+ };
85
+
86
+ export default config;
87
+ ```
88
+
89
+ ```javascript fileName="intlayer.config.cjs" codeFormat="commonjs"
90
+ const { Locales } = require("intlayer");
91
+
92
+ /** @type {import('intlayer').IntlayerConfig} */
93
+ const config = {
94
+ internationalisation: {
95
+ locales: [
96
+ Locales.ENGLISH,
97
+ Locales.FRENCH,
98
+ Locales.SPANISH,
99
+ // Your other locales
100
+ ],
101
+ defaultLocale: Locales.ENGLISH,
102
+ },
103
+ };
104
+
105
+ module.exports = config;
106
+ ```
107
+
108
+ > Through this configuration file, you can set up localised URLs, middleware redirection, cookie names, the location and extension of your content declarations, disable Intlayer logs in the console, and more. For a complete list of available parameters, refer to the [configuration documentation](https://github.com/aymericzip/intlayer/blob/main/docs/en-GB/configuration.md).
109
+
110
+ ### Step 3: Integrate Intlayer in Your Vite Configuration
111
+
112
+ Add the intlayer plugin into your configuration.
113
+
114
+ ```typescript fileName="vite.config.ts" codeFormat="typescript"
115
+ import { defineConfig } from "vite";
116
+ import react from "@vitejs/plugin-react-swc";
117
+ import { intlayerPlugin } from "vite-intlayer";
118
+
119
+ // https://vitejs.dev/config/
120
+ export default defineConfig({
121
+ plugins: [react(), intlayerPlugin()],
122
+ });
123
+ ```
124
+
125
+ ```javascript fileName="vite.config.mjs" codeFormat="esm"
126
+ import { defineConfig } from "vite";
127
+ import react from "@vitejs/plugin-react-swc";
128
+ import { intlayerPlugin } from "vite-intlayer";
129
+
130
+ // https://vitejs.dev/config/
131
+ export default defineConfig({
132
+ plugins: [react(), intlayerPlugin()],
133
+ });
134
+ ```
135
+
136
+ ```javascript fileName="vite.config.cjs" codeFormat="commonjs"
137
+ const { defineConfig } = require("vite");
138
+ const react = require("@vitejs/plugin-react-swc");
139
+ const { intlayerPlugin } = require("vite-intlayer");
140
+
141
+ // https://vitejs.dev/config/
142
+ module.exports = defineConfig({
143
+ plugins: [react(), intlayerPlugin()],
144
+ });
145
+ ```
146
+
147
+ > The `intlayerPlugin()` Vite plugin is used to integrate Intlayer with Vite. It ensures the building of content declaration files and monitors them in development mode. It defines Intlayer environment variables within the Vite application. Additionally, it provides aliases to optimise performance.
148
+
149
+ ### Step 4: Declare Your Content
150
+
151
+ Create and manage your content declarations to store translations:
152
+
153
+ ```tsx fileName="src/app.content.tsx" contentDeclarationFormat="typescript"
154
+ import { t, type Dictionary } from "intlayer";
155
+ import type { ReactNode } from "react";
156
+
157
+ const appContent = {
158
+ key: "app",
159
+ content: {
160
+ viteLogo: t({
161
+ en: "Vite logo",
162
+ "en-GB": "Vite logo",
163
+ fr: "Logo Vite",
164
+ es: "Logo Vite",
165
+ }),
166
+ reactLogo: t({
167
+ en: "React logo",
168
+ "en-GB": "React logo",
169
+ fr: "Logo React",
170
+ es: "Logo React",
171
+ }),
172
+
173
+ title: "Vite + React",
174
+
175
+ count: t({
176
+ en: "count is ",
177
+ "en-GB": "count is ",
178
+ fr: "le compte est ",
179
+ es: "el recuento es ",
180
+ }),
181
+
182
+ edit: t<ReactNode>({
183
+ en: (
184
+ <>
185
+ Edit <code>src/App.tsx</code> and save to test HMR
186
+ </>
187
+ ),
188
+ "en-GB": (
189
+ <>
190
+ Edit <code>src/App.tsx</code> and save to test HMR
191
+ </>
192
+ ),
193
+ fr: (
194
+ <>
195
+ Éditez <code>src/App.tsx</code> et enregistrez pour tester HMR
196
+ </>
197
+ ),
198
+ es: (
199
+ <>
200
+ Edita <code>src/App.tsx</code> y guarda para probar HMR
201
+ </>
202
+ ),
203
+ }),
204
+
205
+ readTheDocs: t({
206
+ en: "Click on the Vite and React logos to learn more",
207
+ "en-GB": "Click on the Vite and React logos to learn more",
208
+ fr: "Cliquez sur les logos Vite et React pour en savoir plus",
209
+ es: "Haga clic en los logotipos de Vite y React para obtener más información",
210
+ }),
211
+ },
212
+ } satisfies Dictionary;
213
+
214
+ export default appContent;
215
+ ```
216
+
217
+ ```javascript fileName="src/app.content.mjs" contentDeclarationFormat="esm"
218
+ import { t } from "intlayer";
219
+
220
+ /** @type {import('intlayer').Dictionary} */
221
+ const appContent = {
222
+ key: "app",
223
+ content: {
224
+ viteLogo: t({
225
+ en: "Vite logo",
226
+ "en-GB": "Vite logo",
227
+ fr: "Logo Vite",
228
+ es: "Logo Vite",
229
+ }),
230
+ reactLogo: t({
231
+ en: "React logo",
232
+ "en-GB": "React logo",
233
+ fr: "Logo React",
234
+ es: "Logo React",
235
+ }),
236
+
237
+ title: "Vite + React",
238
+
239
+ count: t({
240
+ en: "count is ",
241
+ "en-GB": "count is ",
242
+ fr: "le compte est ",
243
+ es: "el recuento es ",
244
+ }),
245
+
246
+ edit:
247
+ t <
248
+ ReactNode >
249
+ {
250
+ // Don't forget to import React if you use a React node in your content
251
+ en: (
252
+ <>
253
+ Edit <code>src/App.tsx</code> and save to test HMR
254
+ </>
255
+ ),
256
+ "en-GB": (
257
+ <>
258
+ Edit <code>src/App.tsx</code> and save to test HMR
259
+ </>
260
+ ),
261
+ fr: (
262
+ <>
263
+ Éditez <code>src/App.tsx</code> et enregistrez pour tester HMR
264
+ </>
265
+ ),
266
+ es: (
267
+ <>
268
+ Edita <code>src/App.tsx</code> y guarda para probar HMR
269
+ </>
270
+ ),
271
+ },
272
+
273
+ readTheDocs: t({
274
+ en: "Click on the Vite and React logos to learn more",
275
+ "en-GB": "Click on the Vite and React logos to learn more",
276
+ fr: "Cliquez sur les logos Vite et React pour en savoir plus",
277
+ es: "Haga clic en los logotipos de Vite y React para obtener más información",
278
+ }),
279
+ },
280
+ };
281
+
282
+ export default appContent;
283
+ ```
284
+
285
+ ```javascript fileName="src/app.content.cjs" contentDeclarationFormat="commonjs"
286
+ const { t } = require("intlayer");
287
+
288
+ /** @type {import('intlayer').Dictionary} */
289
+ const appContent = {
290
+ key: "app",
291
+ content: {
292
+ viteLogo: t({
293
+ en: "Vite logo",
294
+ "en-GB": "Vite logo",
295
+ fr: "Logo Vite",
296
+ es: "Logo Vite",
297
+ }),
298
+ reactLogo: t({
299
+ en: "React logo",
300
+ "en-GB": "React logo",
301
+ fr: "Logo React",
302
+ es: "Logo React",
303
+ }),
304
+
305
+ title: "Vite + React",
306
+
307
+ count: t({
308
+ en: "count is ",
309
+ "en-GB": "count is ",
310
+ fr: "le compte est ",
311
+ es: "the count is ",
312
+ }),
313
+
314
+ edit:
315
+ t <
316
+ ReactNode >
317
+ {
318
+ // Don't forget to import React if you are using a React node in your content
319
+ en: (
320
+ <>
321
+ Edit <code>src/App.tsx</code> and save to test HMR
322
+ </>
323
+ ),
324
+ fr: (
325
+ <>
326
+ Éditez <code>src/App.tsx</code> et enregistrez pour tester HMR
327
+ </>
328
+ ),
329
+ es: (
330
+ <>
331
+ Edita <code>src/App.tsx</code> y guarda para probar HMR
332
+ </>
333
+ ),
334
+ },
335
+
336
+ readTheDocs: t({
337
+ en: "Click on the Vite and React logos to learn more",
338
+ fr: "Cliquez sur les logos Vite et React pour en savoir plus",
339
+ es: "Haga clic en los logotipos de Vite y React para obtener más información",
340
+ }),
341
+ },
342
+ };
343
+
344
+ module.exports = appContent;
345
+ ```
346
+
347
+ ```json fileName="src/app.content.json" contentDeclarationFormat="json"
348
+ {
349
+ "$schema": "https://intlayer.org/schema.json",
350
+ "key": "app",
351
+ "content": {
352
+ "viteLogo": {
353
+ "nodeType": "translation",
354
+ "translation": {
355
+ "en": "Vite logo",
356
+ "fr": "Logo Vite",
357
+ "es": "Logo Vite",
358
+ "en-GB": "Vite logo"
359
+ }
360
+ },
361
+ "reactLogo": {
362
+ "nodeType": "translation",
363
+ "translation": {
364
+ "en": "React logo",
365
+ "fr": "Logo React",
366
+ "es": "Logo React",
367
+ "en-GB": "React logo"
368
+ }
369
+ },
370
+ "title": {
371
+ "nodeType": "translation",
372
+ "translation": {
373
+ "en": "Vite + React",
374
+ "fr": "Vite + React",
375
+ "es": "Vite + React",
376
+ "en-GB": "Vite + React"
377
+ }
378
+ },
379
+ "count": {
380
+ "nodeType": "translation",
381
+ "translation": {
382
+ "en": "count is ",
383
+ "fr": "le compte est ",
384
+ "es": "el recuento es ",
385
+ "en-GB": "count is "
386
+ }
387
+ },
388
+ "edit": {
389
+ "nodeType": "translation",
390
+ "translation": {
391
+ "en": "Edit src/App.tsx and save to test HMR",
392
+ "fr": "Éditez src/App.tsx et enregistrez pour tester HMR",
393
+ "es": "Edita src/App.tsx y guarda para probar HMR",
394
+ "en-GB": "Edit src/App.tsx and save to test HMR"
395
+ }
396
+ },
397
+ "readTheDocs": {
398
+ "nodeType": "translation",
399
+ "translation": {
400
+ "en": "Click on the Vite and React logos to learn more",
401
+ "fr": "Cliquez sur les logos Vite et React pour en savoir plus",
402
+ "es": "Haga clic en los logotipos de Vite y React para obtener más información",
403
+ "en-GB": "Click on the Vite and React logos to learn more"
404
+ }
405
+ }
406
+ }
407
+ }
408
+ ```
409
+
410
+ > Your content declarations can be defined anywhere in your application as soon they are included into the `contentDir` directory (by default, `./src`). And match the content declaration file extension (by default, `.content.{json,ts,tsx,js,jsx,mjs,mjx,cjs,cjx}`).
411
+
412
+ > For more details, refer to the [content declaration documentation](https://github.com/aymericzip/intlayer/blob/main/docs/en-GB/dictionary/get_started.md).
413
+
414
+ > If your content file includes TSX code, you should consider importing `import React from "react";` in your content file.
415
+
416
+ ### Step 5: Utilise Intlayer in Your Code
417
+
418
+ Access your content dictionaries throughout your application:
419
+
420
+ ```tsx {5,9} fileName="src/App.tsx" codeFormat="typescript"
421
+ import { useState, type FC } from "react";
422
+ import reactLogo from "./assets/react.svg";
423
+ import viteLogo from "/vite.svg";
424
+ import "./App.css";
425
+ import { IntlayerProvider, useIntlayer } from "react-intlayer";
426
+
427
+ const AppContent: FC = () => {
428
+ const [count, setCount] = useState(0);
429
+ const content = useIntlayer("app");
430
+
431
+ return (
432
+ <>
433
+ <div>
434
+ <a href="https://vitejs.dev" target="_blank">
435
+ <img src={viteLogo} className="logo" alt={content.viteLogo.value} />
436
+ </a>
437
+ <a href="https://react.dev" target="_blank">
438
+ <img
439
+ src={reactLogo}
440
+ className="logo react"
441
+ alt={content.reactLogo.value}
442
+ />
443
+ </a>
444
+ </div>
445
+ <h1>{content.title}</h1>
446
+ <div className="card">
447
+ <button onClick={() => setCount((count) => count + 1)}>
448
+ {content.count}
449
+ {count}
450
+ </button>
451
+ <p>{content.edit}</p>
452
+ </div>
453
+ <p className="read-the-docs">{content.readTheDocs}</p>
454
+ </>
455
+ );
456
+ };
457
+
458
+ const App: FC = () => (
459
+ <IntlayerProvider>
460
+ <AppContent />
461
+ </IntlayerProvider>
462
+ );
463
+
464
+ export default App;
465
+ ```
466
+
467
+ ```tsx {5,9} fileName="src/App.msx" codeFormat="esm"
468
+ import { useState } from "react";
469
+ import reactLogo from "./assets/react.svg";
470
+ import viteLogo from "/vite.svg";
471
+ import "./App.css";
472
+ import { IntlayerProvider, useIntlayer } from "react-intlayer";
473
+
474
+ const AppContent = () => {
475
+ const [count, setCount] = useState(0);
476
+ const content = useIntlayer("app");
477
+
478
+ return (
479
+ <>
480
+ <div>
481
+ <a href="https://vitejs.dev" target="_blank">
482
+ <img src={viteLogo} className="logo" alt={content.viteLogo.value} />
483
+ </a>
484
+ <a href="https://react.dev" target="_blank">
485
+ <img
486
+ src={reactLogo}
487
+ className="logo react"
488
+ alt={content.reactLogo.value}
489
+ />
490
+ </a>
491
+ </div>
492
+ <h1>{content.title}</h1>
493
+ <div className="card">
494
+ <button onClick={() => setCount((count) => count + 1)}>
495
+ {content.count}
496
+ {count}
497
+ </button>
498
+ <p>{content.edit}</p>
499
+ </div>
500
+ <p className="read-the-docs">{content.readTheDocs}</p>
501
+ </>
502
+ );
503
+ };
504
+
505
+ const App = () => (
506
+ <IntlayerProvider>
507
+ <AppContent />
508
+ </IntlayerProvider>
509
+ );
510
+
511
+ export default App;
512
+ ```
513
+
514
+ ```tsx {5,9} fileName="src/App.csx" codeFormat="commonjs"
515
+ const { useState } = require("react");
516
+ const reactLogo = require("./assets/react.svg");
517
+ const viteLogo = require("/vite.svg");
518
+ require("./App.css");
519
+ const { IntlayerProvider, useIntlayer } = require("react-intlayer");
520
+
521
+ const AppContent = () => {
522
+ const [count, setCount] = useState(0);
523
+ const content = useIntlayer("app");
524
+
525
+ return (
526
+ <>
527
+ <div>
528
+ <a href="https://vitejs.dev" target="_blank">
529
+ <img src={viteLogo} className="logo" alt={content.viteLogo.value} />
530
+ </a>
531
+ <a href="https://react.dev" target="_blank">
532
+ <img
533
+ src={reactLogo}
534
+ className="logo react"
535
+ alt={content.reactLogo.value}
536
+ />
537
+ </a>
538
+ </div>
539
+ <h1>{content.title}</h1>
540
+ <div className="card">
541
+ <button onClick={() => setCount((count) => count + 1)}>
542
+ {content.count}
543
+ {count}
544
+ </button>
545
+ <p>{content.edit}</p>
546
+ </div>
547
+ <p className="read-the-docs">{content.readTheDocs}</p>
548
+ </>
549
+ );
550
+ };
551
+
552
+ const App = () => (
553
+ <IntlayerProvider>
554
+ <AppContent />
555
+ </IntlayerProvider>
556
+ );
557
+
558
+ module.exports = App;
559
+ ```
560
+
561
+ > If you want to use your content in a `string` attribute, such as `alt`, `title`, `href`, `aria-label`, etc., you must call the value of the function, like:
562
+
563
+ > ```jsx
564
+ >
565
+ > ```
566
+
567
+ > <img src={content.image.src.value} alt={content.image.value} />
568
+
569
+ > ```
570
+ >
571
+ > ```
572
+
573
+ > To Learn more about the `useIntlayer` hook, refer to the [documentation](https://github.com/aymericzip/intlayer/blob/main/docs/en-GB/packages/react-intlayer/useIntlayer.md).
574
+
575
+ ### (Optional) Step 6: Change the language of your content
576
+
577
+ To change the language of your content, you can use the `setLocale` function provided by the `useLocale` hook. This function allows you to set the locale of the application and update the content accordingly.
578
+
579
+ ```tsx fileName="src/components/LocaleSwitcher.tsx" codeFormat="typescript"
580
+ import type { FC } from "react";
581
+ import { Locales } from "intlayer";
582
+ import { useLocale } from "react-intlayer";
583
+
584
+ const LocaleSwitcher: FC = () => {
585
+ const { setLocale } = useLocale();
586
+
587
+ return (
588
+ <button onClick={() => setLocale(Locales.English)}>
589
+ Change Language to English
590
+ </button>
591
+ );
592
+ };
593
+ ```
594
+
595
+ ```jsx fileName="src/components/LocaleSwitcher.msx" codeFormat="esm"
596
+ import { Locales } from "intlayer";
597
+ import { useLocale } from "react-intlayer";
598
+
599
+ const LocaleSwitcher = () => {
600
+ const { setLocale } = useLocale();
601
+
602
+ return (
603
+ <button onClick={() => setLocale(Locales.English)}>
604
+ Change Language to English
605
+ </button>
606
+ );
607
+ };
608
+ ```
609
+
610
+ ```jsx fileName="src/components/LocaleSwitcher.csx" codeFormat="commonjs"
611
+ const { Locales } = require("intlayer");
612
+
613
+ const { useLocale } = require("react-intlayer");
614
+
615
+ const LocaleSwitcher = () => {
616
+ const { setLocale } = useLocale();
617
+
618
+ return (
619
+ <button onClick={() => setLocale(Locales.English)}>
620
+ Change Language to English
621
+ </button>
622
+ );
623
+ };
624
+ ```
625
+
626
+ > To Learn more about the `useLocale` hook, refer to the [documentation](https://github.com/aymericzip/intlayer/blob/main/docs/en-GB/packages/react-intlayer/useLocale.md).
627
+
628
+ ### (Optional) Step 7: Add Localised Routing to your Application
629
+
630
+ The purpose of this step is to make unique routes for each language. This is useful for SEO and SEO-friendly URLs.
631
+ Example:
632
+
633
+ ```plaintext
634
+ - https://example.com/about
635
+ - https://example.com/es/about
636
+ - https://example.com/fr/about
637
+ ```
638
+
639
+ > By default, the routes are not prefixed for the default locale. If you want to prefix the default locale, you can set the `middleware.prefixDefault` option to `true` in your configuration. See the [configuration documentation](https://github.com/aymericzip/intlayer/blob/main/docs/en-GB/configuration.md) for more information.
640
+
641
+ To add localised routing to your application, you can create a `LocaleRouter` component that wraps your application's routes and handles locale-based routing. Here is an example using [React Router](https://reactrouter.com/home):
642
+
643
+ ```tsx fileName="src/components/LocaleRouter.tsx" codeFormat="typescript"
644
+ // Importing necessary dependencies and functions
645
+ import { type Locales, configuration, getPathWithoutLocale } from "intlayer"; // Utility functions and types from 'intlayer'
646
+ import type { FC, PropsWithChildren } from "react"; // React types for functional components and props
647
+ import { IntlayerProvider } from "react-intlayer"; // Provider for internationalisation context
648
+ import {
649
+ BrowserRouter,
650
+ Routes,
651
+ Route,
652
+ Navigate,
653
+ useLocation,
654
+ } from "react-router-dom"; // Router components for managing navigation
655
+
656
+ // Destructuring configuration from Intlayer
657
+ const { internationalisation, middleware } = getConfiguration();
658
+ const { locales, defaultLocale } = internationalisation;
659
+
660
+ /**
661
+ * A component that handles localisation and wraps children with the appropriate locale context.
662
+ * It manages URL-based locale detection and validation.
663
+ */
664
+ const AppLocalised: FC<PropsWithChildren<{ locale: Locales }>> = ({
665
+ children,
666
+ locale,
667
+ }) => {
668
+ const { pathname, search } = useLocation(); // Get the current URL path
669
+
670
+ // Determine the current locale, falling back to the default if not provided
671
+ const currentLocale = locale ?? defaultLocale;
672
+
673
+ // Remove the locale prefix from the path to construct a base path
674
+ const pathWithoutLocale = getPathWithoutLocale(
675
+ pathname // Current URL path
676
+ );
677
+
678
+ /**
679
+ * If middleware.prefixDefault is true, the default locale should always be prefixed.
680
+ */
681
+ if (middleware.prefixDefault) {
682
+ // Validate the locale
683
+ if (!locale || !locales.includes(locale)) {
684
+ // Redirect to the default locale with the updated path
685
+ return (
686
+ <Navigate
687
+ to={`/${defaultLocale}/${pathWithoutLocale}${search}`}
688
+ replace // Replace the current history entry with the new one
689
+ />
690
+ );
691
+ }
692
+
693
+ // Wrap children with the IntlayerProvider and set the current locale
694
+ return (
695
+ <IntlayerProvider locale={currentLocale}>{children}</IntlayerProvider>
696
+ );
697
+ } else {
698
+ /**
699
+ * When middleware.prefixDefault is false, the default locale is not prefixed.
700
+ * Ensure that the current locale is valid and not the default locale.
701
+ */
702
+ if (
703
+ currentLocale.toString() !== defaultLocale.toString() &&
704
+ !locales
705
+ .filter(
706
+ (locale) => locale.toString() !== defaultLocale.toString() // Exclude the default locale
707
+ )
708
+ .includes(currentLocale) // Check if the current locale is in the list of valid locales
709
+ ) {
710
+ // Redirect to the path without locale prefix
711
+ return <Navigate to={`${pathWithoutLocale}${search}`} replace />;
712
+ }
713
+
714
+ // Wrap children with the IntlayerProvider and set the current locale
715
+ return (
716
+ <IntlayerProvider locale={currentLocale}>{children}</IntlayerProvider>
717
+ );
718
+ }
719
+ };
720
+
721
+ /**
722
+ * A router component that sets up locale-specific routes.
723
+ * It uses React Router to manage navigation and render localised components.
724
+ */
725
+ export const LocaleRouter: FC<PropsWithChildren> = ({ children }) => (
726
+ <BrowserRouter>
727
+ <Routes>
728
+ {locales
729
+ .filter(
730
+ (locale) => middleware.prefixDefault || locale !== defaultLocale
731
+ )
732
+ .map((locale) => (
733
+ <Route
734
+ // Route pattern to capture the locale (e.g., /en/, /fr/) and match all subsequent paths
735
+ path={`/${locale}/*`}
736
+ key={locale}
737
+ element={<AppLocalised locale={locale}>{children}</AppLocalised>} // Wraps children with locale management
738
+ />
739
+ ))}
740
+
741
+ {
742
+ // If prefixing the default locale is disabled, render the children directly at the root path
743
+ !middleware.prefixDefault && (
744
+ <Route
745
+ path="*"
746
+ element={
747
+ <AppLocalised locale={defaultLocale}>{children}</AppLocalised>
748
+ } // Wraps children with locale management
749
+ />
750
+ )
751
+ }
752
+ </Routes>
753
+ </BrowserRouter>
754
+ );
755
+ ```
756
+
757
+ ```jsx fileName="src/components/LocaleRouter.mjx" codeFormat="esm"
758
+ // Importing necessary dependencies and functions
759
+ import { configuration, getPathWithoutLocale } from "intlayer"; // Utility functions and types from 'intlayer'
760
+ import { IntlayerProvider } from "react-intlayer"; // Provider for internationalisation context
761
+ import {
762
+ BrowserRouter,
763
+ Routes,
764
+ Route,
765
+ Navigate,
766
+ useLocation,
767
+ } from "react-router-dom"; // Router components for managing navigation
768
+
769
+ // Destructuring configuration from Intlayer
770
+ const { internationalization, middleware } = getConfiguration();
771
+ const { locales, defaultLocale } = internationalization;
772
+
773
+ /**
774
+ * A component that handles localisation and wraps children with the appropriate locale context.
775
+ * It manages URL-based locale detection and validation.
776
+ */
777
+ const AppLocalised = ({ children, locale }) => {
778
+ const { pathname, search } = useLocation(); // Get the current URL path
779
+
780
+ // Determine the current locale, falling back to the default if not provided
781
+ const currentLocale = locale ?? defaultLocale;
782
+
783
+ // Remove the locale prefix from the path to construct a base path
784
+ const pathWithoutLocale = getPathWithoutLocale(
785
+ pathname // Current URL path
786
+ );
787
+
788
+ /**
789
+ * If middleware.prefixDefault is true, the default locale should always be prefixed.
790
+ */
791
+ if (middleware.prefixDefault) {
792
+ // Validate the locale
793
+ if (!locale || !locales.includes(locale)) {
794
+ // Redirect to the default locale with the updated path
795
+ return (
796
+ <Navigate
797
+ to={`/${defaultLocale}/${pathWithoutLocale}${search}`}
798
+ replace // Replace the current history entry with the new one
799
+ />
800
+ );
801
+ }
802
+
803
+ // Wrap children with the IntlayerProvider and set the current locale
804
+ return (
805
+ <IntlayerProvider locale={currentLocale}>{children}</IntlayerProvider>
806
+ );
807
+ } else {
808
+ /**
809
+ * When middleware.prefixDefault is false, the default locale is not prefixed.
810
+ * Ensure that the current locale is valid and not the default locale.
811
+ */
812
+ if (
813
+ currentLocale.toString() !== defaultLocale.toString() &&
814
+ !locales
815
+ .filter(
816
+ (locale) => locale.toString() !== defaultLocale.toString() // Exclude the default locale
817
+ )
818
+ .includes(currentLocale) // Check if the current locale is in the list of valid locales
819
+ ) {
820
+ // Redirect to the path without locale prefix
821
+ return <Navigate to={`${pathWithoutLocale}${search}`} replace />;
822
+ }
823
+
824
+ // Wrap children with the IntlayerProvider and set the current locale
825
+ return (
826
+ <IntlayerProvider locale={currentLocale}>{children}</IntlayerProvider>
827
+ );
828
+ }
829
+ };
830
+
831
+ // A router component that sets up locale-specific routes.
832
+ // It uses React Router to manage navigation and render localised components.
833
+ export const LocaleRouter = ({ children }) => (
834
+ <BrowserRouter>
835
+ <Routes>
836
+ {locales
837
+ .filter(
838
+ (locale) => middleware.prefixDefault || locale !== defaultLocale
839
+ )
840
+ .map((locale) => (
841
+ <Route
842
+ // Route pattern to capture the locale (e.g., /en-GB/, /fr/) and match all subsequent paths
843
+ path={`/${locale}/*`}
844
+ key={locale}
845
+ element={<AppLocalized locale={locale}>{children}</AppLocalized>} // Wraps children with locale management
846
+ />
847
+ ))}
848
+
849
+ {
850
+ // If prefixing the default locale is disabled, render the children directly at the root path
851
+ !middleware.prefixDefault && (
852
+ <Route
853
+ path="*"
854
+ element={
855
+ <AppLocalized locale={defaultLocale}>{children}</AppLocalized>
856
+ } // Wraps children with locale management
857
+ />
858
+ )
859
+ }
860
+ </Routes>
861
+ </BrowserRouter>
862
+ );
863
+ ```
864
+
865
+ ```jsx fileName="src/components/LocaleRouter.cjx" codeFormat="commonjs"
866
+ // Importing necessary dependencies and functions
867
+ const { configuration, getPathWithoutLocale } = require("intlayer"); // Utility functions and types from 'intlayer'
868
+ const { IntlayerProvider, useLocale } = require("react-intlayer"); // Provider for internationalisation context
869
+ const {
870
+ BrowserRouter,
871
+ Routes,
872
+ Route,
873
+ Navigate,
874
+ useLocation,
875
+ } = require("react-router-dom"); // Router components for managing navigation
876
+
877
+ // Destructuring configuration from Intlayer
878
+ const { internationalisation, middleware } = getConfiguration();
879
+ const { locales, defaultLocale } = internationalisation;
880
+
881
+ /**
882
+ * A component that handles localisation and wraps children with the appropriate locale context.
883
+ * It manages URL-based locale detection and validation.
884
+ */
885
+ const AppLocalized = ({ children, locale }) => {
886
+ const { pathname, search } = useLocation(); // Get the current URL path
887
+
888
+ // Determine the current locale, falling back to the default if not provided
889
+ const currentLocale = locale ?? defaultLocale;
890
+
891
+ // Remove the locale prefix from the path to construct a base path
892
+ const pathWithoutLocale = getPathWithoutLocale(
893
+ pathname // Current URL path
894
+ );
895
+
896
+ /**
897
+ * If middleware.prefixDefault is true, the default locale should always be prefixed.
898
+ */
899
+ if (middleware.prefixDefault) {
900
+ // Validate the locale
901
+ if (!locale || !locales.includes(locale)) {
902
+ // Redirect to the default locale with the updated path
903
+ return (
904
+ <Navigate
905
+ to={`/${defaultLocale}/${pathWithoutLocale}${search}`}
906
+ replace // Replace the current history entry with the new one
907
+ />
908
+ );
909
+ }
910
+
911
+ // Wrap children with the IntlayerProvider and set the current locale
912
+ return (
913
+ <IntlayerProvider locale={currentLocale}>{children}</IntlayerProvider>
914
+ );
915
+ } else {
916
+ /**
917
+ * When middleware.prefixDefault is false, the default locale is not prefixed.
918
+ * Ensure that the current locale is valid and not the default locale.
919
+ */
920
+ if (
921
+ currentLocale.toString() !== defaultLocale.toString() &&
922
+ !locales
923
+ .filter(
924
+ (locale) => locale.toString() !== defaultLocale.toString() // Exclude the default locale
925
+ )
926
+ .includes(currentLocale) // Check if the current locale is in the list of valid locales
927
+ ) {
928
+ // Redirect to the path without locale prefix
929
+ return <Navigate to={`${pathWithoutLocale}${search}`} replace />;
930
+ }
931
+
932
+ // Wrap children with the IntlayerProvider and set the current locale
933
+ return (
934
+ <IntlayerProvider locale={currentLocale}>{children}</IntlayerProvider>
935
+ );
936
+ }
937
+ };
938
+
939
+ /**
940
+ * A router component that sets up locale-specific routes.
941
+ * It uses React Router to manage navigation and render localised components.
942
+ */
943
+ const LocaleRouter = ({ children }) => (
944
+ <BrowserRouter>
945
+ <Routes>
946
+ {locales
947
+ .filter(
948
+ (locale) => middleware.prefixDefault || locale !== defaultLocale
949
+ )
950
+ .map((locale) => (
951
+ <Route
952
+ // Route pattern to capture the locale (e.g., /en-GB/, /fr/) and match all subsequent paths
953
+ path={`/${locale}/*`}
954
+ key={locale}
955
+ element={<AppLocalized locale={locale}>{children}</AppLocalized>} // Wraps children with locale management
956
+ />
957
+ ))}
958
+
959
+ {
960
+ // If prefixing the default locale is disabled, render the children directly at the root path
961
+ !middleware.prefixDefault && (
962
+ <Route
963
+ path="*"
964
+ element={
965
+ <AppLocalized locale={defaultLocale}>{children}</AppLocalized>
966
+ } // Wraps children with locale management
967
+ />
968
+ )
969
+ }
970
+ </Routes>
971
+ </BrowserRouter>
972
+ );
973
+ ```
974
+
975
+ Then, you can use the `LocaleRouter` component in your application:
976
+
977
+ ```tsx fileName="src/App.tsx" codeFormat="typescript"
978
+ import { LocaleRouter } from "./components/LocaleRouter";
979
+ import type { FC } from "react";
980
+
981
+ // ... Your AppContent component
982
+
983
+ const App: FC = () => (
984
+ <LocaleRouter>
985
+ <AppContent />
986
+ </LocaleRouter>
987
+ );
988
+ ```
989
+
990
+ ```jsx fileName="src/App.mjx" codeFormat="esm"
991
+ import { LocaleRouter } from "./components/LocaleRouter";
992
+
993
+ // ... Your AppContent component
994
+
995
+ const App = () => (
996
+ <LocaleRouter>
997
+ <AppContent />
998
+ </LocaleRouter>
999
+ );
1000
+ ```
1001
+
1002
+ ```jsx fileName="src/App.cjx" codeFormat="commonjs"
1003
+ const { LocaleRouter } = require("./components/LocaleRouter");
1004
+
1005
+ // ... Your AppContent component
1006
+
1007
+ const App = () => (
1008
+ <LocaleRouter>
1009
+ <AppContent />
1010
+ </LocaleRouter>
1011
+ );
1012
+ ```
1013
+
1014
+ In parallel, you can also use the `intLayerMiddlewarePlugin` to add server-side routing to your application. This plugin will automatically detect the current locale based on the URL and set the appropriate locale cookie. If no locale is specified, the plugin will determine the most appropriate locale based on the user's browser language preferences. If no locale is detected, it will redirect to the default locale.
1015
+
1016
+ ```typescript {3,7} fileName="vite.config.ts" codeFormat="typescript"
1017
+ import { defineConfig } from "vite";
1018
+ import react from "@vitejs/plugin-react-swc";
1019
+ import { intlayerPlugin, intLayerMiddlewarePlugin } from "vite-intlayer";
1020
+
1021
+ // https://vitejs.dev/config/
1022
+ export default defineConfig({
1023
+ plugins: [react(), intlayerPlugin(), intLayerMiddlewarePlugin()],
1024
+ });
1025
+ ```
1026
+
1027
+ ```javascript {3,7} fileName="vite.config.mjs" codeFormat="esm"
1028
+ import { defineConfig } from "vite";
1029
+ import react from "@vitejs/plugin-react-swc";
1030
+ import { intlayerPlugin, intLayerMiddlewarePlugin } from "vite-intlayer";
1031
+
1032
+ // https://vitejs.dev/config/
1033
+ export default defineConfig({
1034
+ plugins: [react(), intlayerPlugin(), intLayerMiddlewarePlugin()],
1035
+ });
1036
+ ```
1037
+
1038
+ ```javascript {5,10} fileName="vite.config.cjs" codeFormat="commonjs"
1039
+ const { defineConfig } = require("vite");
1040
+ const react = require("@vitejs/plugin-react-swc");
1041
+ const { intlayerPlugin, intLayerMiddlewarePlugin } = require("vite-intlayer");
1042
+
1043
+ // https://vitejs.dev/config/
1044
+ module.exports = defineConfig({
1045
+ plugins: [react(), intlayerPlugin(), intLayerMiddlewarePlugin()],
1046
+ });
1047
+ ```
1048
+
1049
+ ### (Optional) Step 8: Change the URL when the locale changes
1050
+
1051
+ To change the URL when the locale changes, you can use the `onLocaleChange` prop provided by the `useLocale` hook. In parallel, you can use the `useLocation` and `useNavigate` hooks from `react-router-dom` to update the URL path.
1052
+
1053
+ ```tsx fileName="src/components/LocaleSwitcher.tsx" codeFormat="typescript"
1054
+ import { useLocation, useNavigate } from "react-router-dom";
1055
+ import {
1056
+ Locales,
1057
+ getHTMLTextDir,
1058
+ getLocaleName,
1059
+ getLocalizedUrl,
1060
+ } from "intlayer";
1061
+ import { useLocale } from "react-intlayer";
1062
+ import { type FC } from "react";
1063
+
1064
+ const LocaleSwitcher: FC = () => {
1065
+ const { pathname, search } = useLocation(); // Get the current URL path. Example: /en-GB/about?foo=bar
1066
+ const navigate = useNavigate();
1067
+
1068
+ const { locale, availableLocales, setLocale } = useLocale({
1069
+
1070
+ * Custom hook to update the HTML `lang` and `dir` attributes based on the current locale.
1071
+ */
1072
+ const useI18nHTMLAttributes = () => {
1073
+ const { locale } = useLocale();
1074
+
1075
+ useEffect(() => {
1076
+ const htmlElement = document.documentElement;
1077
+
1078
+ // Update the `lang` attribute to match the current locale
1079
+ htmlElement.lang = locale;
1080
+
1081
+ // Update the `dir` attribute to match the text direction of the current locale
1082
+ htmlElement.dir = getHTMLTextDir(locale);
1083
+ }, [locale]);
1084
+ };
1085
+
1086
+ export default useI18nHTMLAttributes;
1087
+ ```
1088
+
1089
+ #### Using the Hook
1090
+
1091
+ Call the `useI18nHTMLAttributes` hook in your application's root component to ensure the attributes are updated whenever the locale changes:
1092
+
1093
+ ```tsx fileName="src/App.tsx" codeFormat="typescript"
1094
+ import React from "react";
1095
+ import { LocaleProvider } from "react-intlayer";
1096
+ import useI18nHTMLAttributes from "./hooks/useI18nHTMLAttributes";
1097
+
1098
+ const App = () => {
1099
+ useI18nHTMLAttributes();
1100
+
1101
+ return <LocaleProvider>{/* Your application components */}</LocaleProvider>;
1102
+ };
1103
+
1104
+ export default App;
1105
+ ```
1106
+
1107
+ By implementing this hook, your application will dynamically adjust the `lang` and `dir` attributes of the `<html>` tag, ensuring a seamless and accessible experience for users across different locales.
1108
+
1109
+ ---
1110
+
1111
+ ### Documentation References
1112
+
1113
+ - [`useLocale` hook](https://github.com/aymericzip/intlayer/blob/main/docs/en-GB/packages/react-intlayer/useLocale.md)
1114
+ - [`getHTMLTextDir` hook](https://github.com/aymericzip/intlayer/blob/main/docs/en-GB/packages/intlayer/getHTMLTextDir.md)
1115
+ - [`lang` attribute](https://developer.mozilla.org/en-US/docs/Web/HTML/Global_attributes/lang)
1116
+ - [`dir` attribute](https://developer.mozilla.org/en-US/docs/Web/HTML/Global_attributes/dir)
1117
+
1118
+ * Updates the HTML <html> element's `lang` and `dir` attributes based on the current locale.
1119
+ * - `lang`: Informs browsers and search engines of the page's language.
1120
+ * - `dir`: Ensures the correct reading order (e.g., 'ltr' for English, 'rtl' for Arabic).
1121
+ *
1122
+ * This dynamic update is essential for proper text rendering, accessibility, and SEO.
1123
+ \*/
1124
+ export const useI18nHTMLAttributes = () => {
1125
+ const { locale } = useLocale();
1126
+
1127
+ useEffect(() => {
1128
+ // Update the language attribute to the current locale.
1129
+ document.documentElement.lang = locale;
1130
+
1131
+ // Set the text direction based on the current locale.
1132
+ document.documentElement.dir = getHTMLTextDir(locale);
1133
+
1134
+ }, [locale]);
1135
+ };
1136
+
1137
+ ````
1138
+
1139
+ ```jsx fileName="src/hooks/useI18nHTMLAttributes.msx" codeFormat="esm"
1140
+ import { useEffect } from "react";
1141
+ import { useLocale } from "react-intlayer";
1142
+ import { getHTMLTextDir } from "intlayer";
1143
+
1144
+ /**
1145
+ * Updates the HTML <html> element's `lang` and `dir` attributes based on the current locale.
1146
+ * - `lang`: Informs browsers and search engines of the page's language.
1147
+ * - `dir`: Ensures the correct reading order (e.g., 'ltr' for English, 'rtl' for Arabic).
1148
+ *
1149
+ * This dynamic update is essential for proper text rendering, accessibility, and SEO.
1150
+ */
1151
+ export const useI18nHTMLAttributes = () => {
1152
+ const { locale } = useLocale();
1153
+
1154
+ useEffect(() => {
1155
+ // Update the language attribute to the current locale.
1156
+ document.documentElement.lang = locale;
1157
+
1158
+ // Set the text direction based on the current locale.
1159
+ document.documentElement.dir = getHTMLTextDir(locale);
1160
+ }, [locale]);
1161
+ };
1162
+ ````
1163
+
1164
+ ```jsx fileName="src/hooks/useI18nHTMLAttributes.csx" codeFormat="commonjs"
1165
+ const { useEffect } = require("react");
1166
+ const { useLocale } = require("react-intlayer");
1167
+ const { getHTMLTextDir } = require("intlayer");
1168
+
1169
+ /**
1170
+ * Updates the HTML <html> element's `lang` and `dir` attributes based on the current locale.
1171
+ * - `lang`: Informs browsers and search engines of the page's language.
1172
+ * - `dir`: Ensures the correct reading order (e.g., 'ltr' for English, 'rtl' for Arabic).
1173
+ *
1174
+ * This dynamic update is essential for proper text rendering, accessibility, and SEO.
1175
+ */
1176
+ const useI18nHTMLAttributes = () => {
1177
+ const { locale } = useLocale();
1178
+
1179
+ useEffect(() => {
1180
+ // Update the language attribute to the current locale.
1181
+ document.documentElement.lang = locale;
1182
+
1183
+ // Set the text direction based on the current locale.
1184
+ document.documentElement.dir = getHTMLTextDir(locale);
1185
+ }, [locale]);
1186
+ };
1187
+
1188
+ module.exports = { useI18nHTMLAttributes };
1189
+ ```
1190
+
1191
+ #### Using the Hook in Your Application
1192
+
1193
+ Integrate the hook into your main component so that the HTML attributes update whenever the locale changes:
1194
+
1195
+ ```tsx fileName="src/App.tsx" codeFormat="typescript"
1196
+ import type { FC } from "react";
1197
+ import { IntlayerProvider, useIntlayer } from "react-intlayer";
1198
+ import { useI18nHTMLAttributes } from "./hooks/useI18nHTMLAttributes";
1199
+ import "./App.css";
1200
+
1201
+ const AppContent: FC = () => {
1202
+ // Apply the hook to update the <html> tag's lang and dir attributes based on the locale.
1203
+ useI18nHTMLAttributes();
1204
+
1205
+ // ... Rest of your component
1206
+ };
1207
+
1208
+ const App: FC = () => (
1209
+ <IntlayerProvider>
1210
+ <AppContent />
1211
+ </IntlayerProvider>
1212
+ );
1213
+
1214
+ export default App;
1215
+ ```
1216
+
1217
+ ```jsx fileName="src/App.msx" codeFormat="esm"
1218
+ import { IntlayerProvider, useIntlayer } from "react-intlayer";
1219
+ import { useI18nHTMLAttributes } from "./hooks/useI18nHTMLAttributes";
1220
+ import "./App.css";
1221
+
1222
+ const AppContent = () => {
1223
+ // Apply the hook to update the <html> tag's lang and dir attributes based on the locale.
1224
+ useI18nHTMLAttributes();
1225
+
1226
+ // ... Rest of your component
1227
+ };
1228
+
1229
+ const App = () => (
1230
+ <IntlayerProvider>
1231
+ <AppContent />
1232
+ </IntlayerProvider>
1233
+ );
1234
+
1235
+ export default App;
1236
+ ```
1237
+
1238
+ ```jsx fileName="src/App.csx" codeFormat="commonjs"
1239
+ const { FC } = require("react");
1240
+ const { IntlayerProvider, useIntlayer } = require("react-intlayer");
1241
+ const { useI18nHTMLAttributes } = require("./hooks/useI18nHTMLAttributes");
1242
+ require("./App.css");
1243
+
1244
+ const AppContent = () => {
1245
+ // Apply the hook to update the <html> tag's lang and dir attributes based on the locale.
1246
+ useI18nHTMLAttributes();
1247
+
1248
+ // ... Rest of your component
1249
+ };
1250
+
1251
+ const App = () => (
1252
+ <IntlayerProvider>
1253
+ <AppContent />
1254
+ </IntlayerProvider>
1255
+ );
1256
+
1257
+ module.exports = App;
1258
+ ```
1259
+
1260
+ By applying these changes, your application will:
1261
+
1262
+ - Ensure the **language** (`lang`) attribute correctly reflects the current locale, which is important for SEO and browser behaviour.
1263
+ - Adjust the **text direction** (`dir`) according to the locale, enhancing readability and usability for languages with different reading orders.
1264
+ - Provide a more **accessible** experience, as assistive technologies depend on these attributes to function optimally.
1265
+
1266
+ ### (Optional) Step 10: Creating a Localised Link Component
1267
+
1268
+ To ensure that your application’s navigation respects the current locale, you can create a custom `Link` component. This component automatically prefixes internal URLs with the current language, so that. For example, when a French-speaking user clicks on a link to the "About" page, they are redirected to `/fr/about` instead of `/about`.
1269
+
1270
+ This behaviour is useful for several reasons:
1271
+
1272
+ - **SEO and User Experience**: Localised URLs help search engines index language-specific pages correctly and provide users with content in their preferred language.
1273
+ - **Consistency**: By using a localised link throughout your application, you guarantee that navigation stays within the current locale, preventing unexpected language switches.
1274
+ - **Maintainability**: Centralising the localisation logic in a single component simplifies the management of URLs, making your codebase easier to maintain and extend as your application grows.
1275
+
1276
+ Below is the implementation of a localised `Link` component in TypeScript:
1277
+
1278
+ ```tsx fileName="src/components/Link.tsx" codeFormat="typescript"
1279
+ import { getLocalizedUrl } from "intlayer";
1280
+ import {
1281
+ forwardRef,
1282
+ type DetailedHTMLProps,
1283
+ type AnchorHTMLAttributes,
1284
+ } from "react";
1285
+ import { useLocale } from "react-intlayer";
1286
+
1287
+ export interface LinkProps
1288
+ extends DetailedHTMLProps<
1289
+ AnchorHTMLAttributes<HTMLAnchorElement>,
1290
+ HTMLAnchorElement
1291
+ > {}
1292
+
1293
+ /**
1294
+ * Utility function to check whether a given URL is external.
1295
+ * If the URL starts with http:// or https://, it's considered external.
1296
+ */
1297
+ export const checkIsExternalLink = (href?: string): boolean =>
1298
+ /^https?:\/\//.test(href ?? "");
1299
+
1300
+ /**
1301
+ * A custom Link component that adapts the href attribute based on the current locale.
1302
+ * For internal links, it uses `getLocalizedUrl` to prefix the URL with the locale (e.g., /fr/about).
1303
+ * This ensures that navigation stays within the same locale context.
1304
+ */
1305
+ export const Link = forwardRef<HTMLAnchorElement, LinkProps>(
1306
+ ({ href, children, ...props }, ref) => {
1307
+ const { locale } = useLocale();
1308
+ const isExternalLink = checkIsExternalLink(href);
1309
+
1310
+ // If the link is internal and a valid href is provided, get the localised URL.
1311
+ const hrefI18n =
1312
+ href && !isExternalLink ? getLocalizedUrl(href, locale) : href;
1313
+
1314
+ return (
1315
+ <a href={hrefI18n} ref={ref} {...props}>
1316
+ {children}
1317
+ </a>
1318
+ );
1319
+ }
1320
+ );
1321
+
1322
+ Link.displayName = "Link";
1323
+ ```
1324
+
1325
+ ```jsx fileName="src/components/Link.mjx" codeFormat="esm"
1326
+ import { getLocalizedUrl } from "intlayer";
1327
+ import { useLocale } from "react-intlayer";
1328
+ import { forwardRef } from "react";
1329
+
1330
+ /**
1331
+ * Utility function to check whether a given URL is external.
1332
+ * If the URL starts with http:// or https://, it's considered external.
1333
+ */
1334
+ export const checkIsExternalLink = (href?: string): boolean =>
1335
+ /^https?:\/\//.test(href ?? "");
1336
+
1337
+ /**
1338
+ * A custom Link component that adapts the href attribute based on the current locale.
1339
+ * For internal links, it uses `getLocalizedUrl` to prefix the URL with the locale (e.g., /fr/about).
1340
+ * This ensures that navigation stays within the same locale context.
1341
+ */
1342
+ export const Link = forwardRef(({ href, children, ...props }, ref) => {
1343
+
1344
+ const { getLocalizedUrl } = require("intlayer");
1345
+ const { useLocale } = require("react-intlayer");
1346
+ const { forwardRef } = require("react");
1347
+
1348
+ /**
1349
+ * Utility function to check whether a given URL is external.
1350
+ * If the URL starts with http:// or https://, it's considered external.
1351
+ */
1352
+ const checkIsExternalLink = (href) => /^https?:\/\//.test(href ?? "");
1353
+
1354
+ /**
1355
+ * A custom Link component that adapts the href attribute based on the current locale.
1356
+ * For internal links, it uses `getLocalizedUrl` to prefix the URL with the locale (e.g., /fr/about).
1357
+ * This ensures that navigation stays within the same locale context.
1358
+ */
1359
+ const Link = forwardRef(({ href, children, ...props }, ref) => {
1360
+ const { locale } = useLocale();
1361
+ const isExternalLink = checkIsExternalLink(href);
1362
+
1363
+ // If the link is internal and a valid href is provided, get the localized URL.
1364
+ const localizedHref = isExternalLink ? href : getLocalizedUrl(href, locale);
1365
+
1366
+ return (
1367
+ <a
1368
+ href={localizedHref}
1369
+ ref={ref}
1370
+ {...props}
1371
+ aria-current={isExternalLink ? "external" : undefined}
1372
+ >
1373
+ {children}
1374
+ </a>
1375
+ );
1376
+ });
1377
+
1378
+ Link.displayName = "Link";
1379
+ ```
1380
+
1381
+ #### How It Works
1382
+
1383
+ - **Detecting External Links**:
1384
+ The helper function `checkIsExternalLink` determines whether a URL is external. External links are left unchanged because they do not need localisation.
1385
+
1386
+ - **Retrieving the Current Locale**:
1387
+ The `useLocale` hook provides the current locale (e.g., `fr` for French).
1388
+
1389
+ - **Localising the URL**:
1390
+ For internal links (i.e., non-external), `getLocalizedUrl` is used to automatically prefix the URL with the current locale. This means that if your user is in French, passing `/about` as the `href` will transform it to `/fr/about`.
1391
+
1392
+ - **Returning the Link**:
1393
+ The component returns an `<a>` element with the localised URL, ensuring that navigation is consistent with the locale.
1394
+
1395
+ By integrating this `Link` component across your application, you maintain a coherent and language-aware user experience while also benefiting from improved SEO and usability.
1396
+
1397
+ ### Configure TypeScript
1398
+
1399
+ Intlayer uses module augmentation to get the benefits of TypeScript and make your codebase stronger.
1400
+
1401
+ ![alt text](https://github.com/aymericzip/intlayer/blob/main/docs/assets/autocompletion.png)
1402
+
1403
+ ![alt text](https://github.com/aymericzip/intlayer/blob/main/docs/assets/translation_error.png)
1404
+
1405
+ Ensure your TypeScript configuration includes the autogenerated types.
1406
+
1407
+ ```json5 fileName="tsconfig.json"
1408
+ {
1409
+ // ... Your existing TypeScript configurations
1410
+ "include": [
1411
+ // ... Your existing TypeScript configurations
1412
+ ".intlayer/**/*.ts", // Include the autogenerated types
1413
+ ],
1414
+ }
1415
+ ```
1416
+
1417
+ ### Git Configuration
1418
+
1419
+ It is recommended to ignore the files generated by Intlayer. This allows you to avoid committing them to your Git repository.
1420
+
1421
+ To do this, you can add the following instructions to your `.gitignore` file:
1422
+
1423
+ ```plaintext
1424
+ # Ignore the files generated by Intlayer
1425
+ .intlayer
1426
+ ```
1427
+
1428
+ ### Go Further
1429
+
1430
+ To go further, you can implement the [visual editor](https://github.com/aymericzip/intlayer/blob/main/docs/en-GB/intlayer_visual_editor.md) or externalise your content using the [CMS](https://github.com/aymericzip/intlayer/blob/main/docs/en-GB/intlayer_CMS.md).