@intlayer/docs 6.1.5 → 6.1.6

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (284) hide show
  1. package/blog/ar/next-i18next_vs_next-intl_vs_intlayer.md +404 -173
  2. package/blog/de/next-i18next_vs_next-intl_vs_intlayer.md +262 -113
  3. package/blog/en/intlayer_with_next-i18next.mdx +431 -0
  4. package/blog/en/intlayer_with_next-intl.mdx +335 -0
  5. package/blog/en/next-i18next_vs_next-intl_vs_intlayer.md +463 -209
  6. package/blog/en-GB/next-i18next_vs_next-intl_vs_intlayer.md +38 -28
  7. package/blog/es/next-i18next_vs_next-intl_vs_intlayer.md +185 -71
  8. package/blog/fr/next-i18next_vs_next-intl_vs_intlayer.md +38 -28
  9. package/blog/it/next-i18next_vs_next-intl_vs_intlayer.md +38 -28
  10. package/blog/ja/next-i18next_vs_next-intl_vs_intlayer.md +38 -28
  11. package/blog/ko/next-i18next_vs_next-intl_vs_intlayer.md +38 -28
  12. package/blog/pt/next-i18next_vs_next-intl_vs_intlayer.md +38 -28
  13. package/blog/ru/next-i18next_vs_next-intl_vs_intlayer.md +36 -28
  14. package/blog/tr/next-i18next_vs_next-intl_vs_intlayer.md +2 -0
  15. package/blog/zh/next-i18next_vs_next-intl_vs_intlayer.md +38 -28
  16. package/dist/cjs/generated/docs.entry.cjs +32 -0
  17. package/dist/cjs/generated/docs.entry.cjs.map +1 -1
  18. package/dist/esm/generated/docs.entry.mjs +32 -0
  19. package/dist/esm/generated/docs.entry.mjs.map +1 -1
  20. package/dist/types/generated/docs.entry.d.ts +2 -0
  21. package/dist/types/generated/docs.entry.d.ts.map +1 -1
  22. package/docs/ar/component_i18n.md +186 -0
  23. package/docs/ar/intlayer_with_angular.md +2 -2
  24. package/docs/ar/intlayer_with_astro.md +246 -0
  25. package/docs/ar/intlayer_with_create_react_app.md +3 -2
  26. package/docs/ar/intlayer_with_express.md +2 -2
  27. package/docs/ar/intlayer_with_nestjs.md +2 -2
  28. package/docs/ar/intlayer_with_nextjs_14.md +2 -2
  29. package/docs/ar/intlayer_with_nextjs_15.md +2 -2
  30. package/docs/ar/intlayer_with_nextjs_page_router.md +2 -2
  31. package/docs/ar/intlayer_with_nuxt.md +2 -2
  32. package/docs/ar/intlayer_with_react_native+expo.md +11 -20
  33. package/docs/ar/intlayer_with_react_router_v7.md +195 -241
  34. package/docs/ar/intlayer_with_tanstack.md +198 -272
  35. package/docs/ar/intlayer_with_vite+preact.md +9 -9
  36. package/docs/ar/intlayer_with_vite+react.md +7 -7
  37. package/docs/ar/intlayer_with_vite+vue.md +9 -9
  38. package/docs/ar/vs_code_extension.md +48 -109
  39. package/docs/de/component_i18n.md +186 -0
  40. package/docs/de/intlayer_with_angular.md +2 -2
  41. package/docs/de/intlayer_with_astro.md +246 -0
  42. package/docs/de/intlayer_with_create_react_app.md +2 -2
  43. package/docs/de/intlayer_with_express.md +2 -2
  44. package/docs/de/intlayer_with_nestjs.md +2 -2
  45. package/docs/de/intlayer_with_nextjs_14.md +2 -2
  46. package/docs/de/intlayer_with_nextjs_15.md +2 -2
  47. package/docs/de/intlayer_with_nextjs_page_router.md +2 -2
  48. package/docs/de/intlayer_with_nuxt.md +2 -2
  49. package/docs/de/intlayer_with_react_native+expo.md +11 -20
  50. package/docs/de/intlayer_with_react_router_v7.md +193 -242
  51. package/docs/de/intlayer_with_tanstack.md +194 -266
  52. package/docs/de/intlayer_with_vite+preact.md +9 -9
  53. package/docs/de/intlayer_with_vite+react.md +9 -9
  54. package/docs/de/intlayer_with_vite+vue.md +11 -11
  55. package/docs/de/packages/vite-intlayer/index.md +3 -3
  56. package/docs/de/vs_code_extension.md +46 -107
  57. package/docs/en/component_i18n.md +186 -0
  58. package/docs/en/how_works_intlayer.md +1 -1
  59. package/docs/en/index.md +1 -1
  60. package/docs/en/intlayer_cli.md +1 -1
  61. package/docs/en/intlayer_with_angular.md +4 -4
  62. package/docs/en/intlayer_with_astro.md +246 -0
  63. package/docs/en/intlayer_with_create_react_app.md +4 -4
  64. package/docs/en/intlayer_with_express.md +3 -3
  65. package/docs/en/intlayer_with_lynx+react.md +1 -1
  66. package/docs/en/intlayer_with_nestjs.md +2 -2
  67. package/docs/en/intlayer_with_nextjs_14.md +31 -5
  68. package/docs/en/intlayer_with_nextjs_15.md +31 -5
  69. package/docs/en/intlayer_with_nextjs_page_router.md +5 -5
  70. package/docs/en/intlayer_with_nuxt.md +4 -4
  71. package/docs/en/intlayer_with_react_native+expo.md +46 -24
  72. package/docs/en/intlayer_with_react_router_v7.md +164 -211
  73. package/docs/en/intlayer_with_tanstack.md +166 -241
  74. package/docs/en/intlayer_with_vite+preact.md +12 -12
  75. package/docs/en/intlayer_with_vite+react.md +12 -12
  76. package/docs/en/intlayer_with_vite+solid.md +2 -2
  77. package/docs/en/intlayer_with_vite+svelte.md +2 -2
  78. package/docs/en/intlayer_with_vite+vue.md +12 -12
  79. package/docs/en/introduction.md +1 -1
  80. package/docs/en/packages/next-intlayer/useDictionary.md +1 -1
  81. package/docs/en/packages/next-intlayer/useIntlayer.md +1 -1
  82. package/docs/en/packages/react-intlayer/useDictionary.md +1 -1
  83. package/docs/en/packages/react-intlayer/useI18n.md +1 -1
  84. package/docs/en/packages/react-intlayer/useIntlayer.md +1 -1
  85. package/docs/en/releases/v6.md +1 -0
  86. package/docs/en/roadmap.md +1 -1
  87. package/docs/en/vs_code_extension.md +24 -114
  88. package/docs/en-GB/component_i18n.md +186 -0
  89. package/docs/en-GB/intlayer_with_angular.md +3 -3
  90. package/docs/en-GB/intlayer_with_astro.md +246 -0
  91. package/docs/en-GB/intlayer_with_create_react_app.md +5 -4
  92. package/docs/en-GB/intlayer_with_express.md +2 -2
  93. package/docs/en-GB/intlayer_with_nestjs.md +2 -2
  94. package/docs/en-GB/intlayer_with_nextjs_14.md +4 -4
  95. package/docs/en-GB/intlayer_with_nextjs_15.md +2 -2
  96. package/docs/en-GB/intlayer_with_nextjs_page_router.md +2 -2
  97. package/docs/en-GB/intlayer_with_nuxt.md +2 -2
  98. package/docs/en-GB/intlayer_with_react_native+expo.md +11 -20
  99. package/docs/en-GB/intlayer_with_react_router_v7.md +171 -220
  100. package/docs/en-GB/intlayer_with_tanstack.md +174 -248
  101. package/docs/en-GB/intlayer_with_vite+preact.md +9 -9
  102. package/docs/en-GB/intlayer_with_vite+react.md +9 -9
  103. package/docs/en-GB/intlayer_with_vite+vue.md +11 -11
  104. package/docs/en-GB/packages/next-intlayer/useIntlayer.md +1 -1
  105. package/docs/en-GB/packages/react-intlayer/useIntlayer.md +1 -1
  106. package/docs/en-GB/vs_code_extension.md +42 -103
  107. package/docs/es/component_i18n.md +182 -0
  108. package/docs/es/intlayer_with_angular.md +2 -2
  109. package/docs/es/intlayer_with_astro.md +246 -0
  110. package/docs/es/intlayer_with_create_react_app.md +3 -2
  111. package/docs/es/intlayer_with_express.md +2 -2
  112. package/docs/es/intlayer_with_nextjs_14.md +2 -2
  113. package/docs/es/intlayer_with_nextjs_15.md +2 -2
  114. package/docs/es/intlayer_with_react_native+expo.md +11 -20
  115. package/docs/es/intlayer_with_react_router_v7.md +188 -232
  116. package/docs/es/intlayer_with_tanstack.md +203 -273
  117. package/docs/es/intlayer_with_vite+preact.md +7 -7
  118. package/docs/es/intlayer_with_vite+react.md +7 -7
  119. package/docs/es/intlayer_with_vite+vue.md +9 -9
  120. package/docs/es/vs_code_extension.md +53 -114
  121. package/docs/fr/component_i18n.md +186 -0
  122. package/docs/fr/intlayer_with_angular.md +2 -2
  123. package/docs/fr/intlayer_with_astro.md +246 -0
  124. package/docs/fr/intlayer_with_create_react_app.md +3 -2
  125. package/docs/fr/intlayer_with_express.md +2 -2
  126. package/docs/fr/intlayer_with_nestjs.md +2 -2
  127. package/docs/fr/intlayer_with_nextjs_14.md +2 -2
  128. package/docs/fr/intlayer_with_react_native+expo.md +11 -20
  129. package/docs/fr/intlayer_with_react_router_v7.md +188 -248
  130. package/docs/fr/intlayer_with_tanstack.md +192 -265
  131. package/docs/fr/intlayer_with_vite+preact.md +7 -7
  132. package/docs/fr/intlayer_with_vite+react.md +7 -7
  133. package/docs/fr/intlayer_with_vite+vue.md +9 -9
  134. package/docs/fr/vs_code_extension.md +50 -111
  135. package/docs/hi/component_i18n.md +186 -0
  136. package/docs/hi/intlayer_cli.md +1 -4
  137. package/docs/hi/intlayer_with_angular.md +2 -2
  138. package/docs/hi/intlayer_with_astro.md +246 -0
  139. package/docs/hi/intlayer_with_create_react_app.md +2 -2
  140. package/docs/hi/intlayer_with_express.md +2 -2
  141. package/docs/hi/intlayer_with_nestjs.md +2 -2
  142. package/docs/hi/intlayer_with_nextjs_14.md +2 -2
  143. package/docs/hi/intlayer_with_nextjs_15.md +2 -2
  144. package/docs/hi/intlayer_with_nextjs_page_router.md +2 -2
  145. package/docs/hi/intlayer_with_nuxt.md +2 -2
  146. package/docs/hi/intlayer_with_react_native+expo.md +11 -20
  147. package/docs/hi/intlayer_with_react_router_v7.md +199 -243
  148. package/docs/hi/intlayer_with_tanstack.md +210 -285
  149. package/docs/hi/intlayer_with_vite+preact.md +9 -9
  150. package/docs/hi/intlayer_with_vite+react.md +9 -9
  151. package/docs/hi/intlayer_with_vite+solid.md +1 -1
  152. package/docs/hi/intlayer_with_vite+vue.md +11 -11
  153. package/docs/hi/vs_code_extension.md +49 -110
  154. package/docs/it/component_i18n.md +186 -0
  155. package/docs/it/intlayer_with_angular.md +2 -2
  156. package/docs/it/intlayer_with_astro.md +246 -0
  157. package/docs/it/intlayer_with_create_react_app.md +3 -2
  158. package/docs/it/intlayer_with_express.md +2 -2
  159. package/docs/it/intlayer_with_nestjs.md +2 -2
  160. package/docs/it/intlayer_with_nextjs_14.md +2 -2
  161. package/docs/it/intlayer_with_nextjs_15.md +2 -2
  162. package/docs/it/intlayer_with_nextjs_page_router.md +2 -2
  163. package/docs/it/intlayer_with_nuxt.md +2 -2
  164. package/docs/it/intlayer_with_react_native+expo.md +11 -21
  165. package/docs/it/intlayer_with_react_router_v7.md +195 -242
  166. package/docs/it/intlayer_with_tanstack.md +203 -267
  167. package/docs/it/intlayer_with_vite+preact.md +9 -9
  168. package/docs/it/intlayer_with_vite+react.md +13 -11
  169. package/docs/it/intlayer_with_vite+vue.md +11 -11
  170. package/docs/it/vs_code_extension.md +50 -111
  171. package/docs/ja/component_i18n.md +186 -0
  172. package/docs/ja/intlayer_with_angular.md +2 -2
  173. package/docs/ja/intlayer_with_astro.md +246 -0
  174. package/docs/ja/intlayer_with_create_react_app.md +3 -2
  175. package/docs/ja/intlayer_with_express.md +2 -2
  176. package/docs/ja/intlayer_with_nestjs.md +2 -2
  177. package/docs/ja/intlayer_with_nextjs_14.md +2 -2
  178. package/docs/ja/intlayer_with_nextjs_15.md +2 -2
  179. package/docs/ja/intlayer_with_nextjs_page_router.md +2 -2
  180. package/docs/ja/intlayer_with_nuxt.md +2 -2
  181. package/docs/ja/intlayer_with_react_native+expo.md +18 -29
  182. package/docs/ja/intlayer_with_react_router_v7.md +204 -250
  183. package/docs/ja/intlayer_with_tanstack.md +218 -286
  184. package/docs/ja/intlayer_with_vite+preact.md +9 -9
  185. package/docs/ja/intlayer_with_vite+react.md +11 -11
  186. package/docs/ja/intlayer_with_vite+vue.md +11 -11
  187. package/docs/ja/vs_code_extension.md +50 -111
  188. package/docs/ko/component_i18n.md +186 -0
  189. package/docs/ko/intlayer_with_angular.md +2 -2
  190. package/docs/ko/intlayer_with_astro.md +246 -0
  191. package/docs/ko/intlayer_with_create_react_app.md +3 -2
  192. package/docs/ko/intlayer_with_express.md +2 -2
  193. package/docs/ko/intlayer_with_nestjs.md +2 -2
  194. package/docs/ko/intlayer_with_nextjs_14.md +2 -2
  195. package/docs/ko/intlayer_with_nextjs_15.md +2 -2
  196. package/docs/ko/intlayer_with_nextjs_page_router.md +2 -2
  197. package/docs/ko/intlayer_with_nuxt.md +2 -2
  198. package/docs/ko/intlayer_with_react_native+expo.md +19 -28
  199. package/docs/ko/intlayer_with_react_router_v7.md +190 -244
  200. package/docs/ko/intlayer_with_tanstack.md +200 -270
  201. package/docs/ko/intlayer_with_vite+preact.md +9 -9
  202. package/docs/ko/intlayer_with_vite+react.md +9 -9
  203. package/docs/ko/intlayer_with_vite+vue.md +11 -11
  204. package/docs/ko/vs_code_extension.md +48 -109
  205. package/docs/pt/component_i18n.md +186 -0
  206. package/docs/pt/intlayer_with_angular.md +2 -2
  207. package/docs/pt/intlayer_with_astro.md +246 -0
  208. package/docs/pt/intlayer_with_create_react_app.md +3 -2
  209. package/docs/pt/intlayer_with_express.md +2 -2
  210. package/docs/pt/intlayer_with_nestjs.md +2 -2
  211. package/docs/pt/intlayer_with_nextjs_14.md +2 -2
  212. package/docs/pt/intlayer_with_nextjs_15.md +2 -2
  213. package/docs/pt/intlayer_with_nextjs_page_router.md +2 -2
  214. package/docs/pt/intlayer_with_nuxt.md +2 -2
  215. package/docs/pt/intlayer_with_react_native+expo.md +11 -20
  216. package/docs/pt/intlayer_with_react_router_v7.md +7 -13
  217. package/docs/pt/intlayer_with_tanstack.md +183 -258
  218. package/docs/pt/intlayer_with_vite+preact.md +9 -9
  219. package/docs/pt/intlayer_with_vite+react.md +9 -9
  220. package/docs/pt/intlayer_with_vite+vue.md +9 -9
  221. package/docs/pt/vs_code_extension.md +46 -107
  222. package/docs/ru/component_i18n.md +186 -0
  223. package/docs/ru/intlayer_with_angular.md +2 -2
  224. package/docs/ru/intlayer_with_astro.md +246 -0
  225. package/docs/ru/intlayer_with_create_react_app.md +3 -2
  226. package/docs/ru/intlayer_with_express.md +2 -2
  227. package/docs/ru/intlayer_with_nestjs.md +2 -2
  228. package/docs/ru/intlayer_with_nextjs_14.md +2 -2
  229. package/docs/ru/intlayer_with_nextjs_15.md +2 -2
  230. package/docs/ru/intlayer_with_nextjs_page_router.md +2 -2
  231. package/docs/ru/intlayer_with_nuxt.md +2 -2
  232. package/docs/ru/intlayer_with_react_native+expo.md +11 -20
  233. package/docs/ru/intlayer_with_react_router_v7.md +192 -238
  234. package/docs/ru/intlayer_with_tanstack.md +197 -269
  235. package/docs/ru/intlayer_with_vite+preact.md +9 -9
  236. package/docs/ru/intlayer_with_vite+react.md +9 -9
  237. package/docs/ru/intlayer_with_vite+vue.md +11 -11
  238. package/docs/ru/vs_code_extension.md +48 -109
  239. package/docs/tr/component_i18n.md +186 -0
  240. package/docs/tr/how_works_intlayer.md +1 -1
  241. package/docs/tr/index.md +1 -1
  242. package/docs/tr/intlayer_cli.md +1 -1
  243. package/docs/tr/intlayer_with_angular.md +4 -4
  244. package/docs/tr/intlayer_with_astro.md +246 -0
  245. package/docs/tr/intlayer_with_create_react_app.md +4 -4
  246. package/docs/tr/intlayer_with_express.md +3 -3
  247. package/docs/tr/intlayer_with_lynx+react.md +1 -1
  248. package/docs/tr/intlayer_with_nestjs.md +2 -2
  249. package/docs/tr/intlayer_with_nextjs_14.md +2 -2
  250. package/docs/tr/intlayer_with_nextjs_15.md +4 -4
  251. package/docs/tr/intlayer_with_nextjs_page_router.md +5 -5
  252. package/docs/tr/intlayer_with_nuxt.md +4 -4
  253. package/docs/tr/intlayer_with_react_native+expo.md +12 -21
  254. package/docs/tr/intlayer_with_react_router_v7.md +222 -267
  255. package/docs/tr/intlayer_with_tanstack.md +400 -303
  256. package/docs/tr/intlayer_with_vite+preact.md +12 -12
  257. package/docs/tr/intlayer_with_vite+react.md +12 -12
  258. package/docs/tr/intlayer_with_vite+solid.md +2 -2
  259. package/docs/tr/intlayer_with_vite+svelte.md +2 -2
  260. package/docs/tr/intlayer_with_vite+vue.md +12 -12
  261. package/docs/tr/introduction.md +1 -1
  262. package/docs/tr/packages/react-intlayer/useDictionary.md +1 -1
  263. package/docs/tr/packages/react-intlayer/useI18n.md +1 -1
  264. package/docs/tr/roadmap.md +1 -1
  265. package/docs/tr/vs_code_extension.md +54 -115
  266. package/docs/zh/component_i18n.md +186 -0
  267. package/docs/zh/intlayer_with_angular.md +2 -2
  268. package/docs/zh/intlayer_with_astro.md +246 -0
  269. package/docs/zh/intlayer_with_create_react_app.md +3 -2
  270. package/docs/zh/intlayer_with_express.md +2 -2
  271. package/docs/zh/intlayer_with_nestjs.md +2 -2
  272. package/docs/zh/intlayer_with_nextjs_14.md +2 -2
  273. package/docs/zh/intlayer_with_nextjs_15.md +2 -2
  274. package/docs/zh/intlayer_with_nextjs_page_router.md +2 -2
  275. package/docs/zh/intlayer_with_nuxt.md +2 -2
  276. package/docs/zh/intlayer_with_react_native+expo.md +19 -28
  277. package/docs/zh/intlayer_with_react_router_v7.md +200 -248
  278. package/docs/zh/intlayer_with_tanstack.md +208 -283
  279. package/docs/zh/intlayer_with_vite+preact.md +9 -9
  280. package/docs/zh/intlayer_with_vite+react.md +9 -9
  281. package/docs/zh/intlayer_with_vite+vue.md +9 -9
  282. package/docs/zh/vs_code_extension.md +51 -105
  283. package/package.json +10 -10
  284. package/src/generated/docs.entry.ts +32 -0
@@ -2,10 +2,10 @@
2
2
  createdAt: 2025-09-09
3
3
  updatedAt: 2025-09-09
4
4
  title: Tanstack Start में Intlayer के साथ शुरुआत करना
5
- description: जानें कि कैसे Intlayer का उपयोग करके अपने Tanstack Start एप्लिकेशन में अंतरराष्ट्रीयकरण (i18n) जोड़ें। इस व्यापक गाइड का पालन करें ताकि आपका ऐप बहुभाषी और लोकल-आधारित रूटिंग के साथ हो।
5
+ description: जानें कि अपने Tanstack Start एप्लिकेशन में Intlayer का उपयोग करके अंतरराष्ट्रीयकरण (i18n) कैसे जोड़ें। इस व्यापक गाइड का पालन करें ताकि आपका ऐप बहुभाषी और लोकल-आधारित रूटिंग के साथ हो।
6
6
  keywords:
7
7
  - अंतरराष्ट्रीयकरण
8
- - प्रलेखन
8
+ - दस्तावेज़ीकरण
9
9
  - Intlayer
10
10
  - Tanstack Start
11
11
  - React
@@ -15,10 +15,8 @@ keywords:
15
15
  slugs:
16
16
  - doc
17
17
  - environment
18
- - vite-and-react
19
18
  - tanstack-start
20
- applicationTemplate: https://github.com/AydinTheFirst/tanstack-start-intlayer
21
- author: AydinTheFirst
19
+ applicationTemplate: https://github.com/aymericzip/intlayer-tanstack-start-template
22
20
  ---
23
21
 
24
22
  # Intlayer और Tanstack Start के साथ अंतरराष्ट्रीयकरण (i18n) शुरू करना
@@ -27,15 +25,15 @@ author: AydinTheFirst
27
25
 
28
26
  ## Intlayer क्या है?
29
27
 
30
- **Intlayer** एक नवोन्मेषी, ओपन-सोर्स अंतरराष्ट्रीयकरण (i18n) लाइब्रेरी है जिसे आधुनिक वेब एप्लिकेशन में बहुभाषी समर्थन को सरल बनाने के लिए डिज़ाइन किया गया है।
28
+ **Intlayer** एक नवीन, ओपन-सोर्स अंतरराष्ट्रीयकरण (i18n) लाइब्रेरी है जिसे आधुनिक वेब एप्लिकेशन में बहुभाषी समर्थन को सरल बनाने के लिए डिज़ाइन किया गया है।
31
29
 
32
30
  Intlayer के साथ, आप कर सकते हैं:
33
31
 
34
- - **घोषणात्मक शब्दकोशों का उपयोग करके अनुवादों का आसानी से प्रबंधन** करें, जो कि कंपोनेंट स्तर पर होते हैं।
35
- - **मेटाडेटा, रूट्स, और सामग्री को गतिशील रूप से स्थानीयकृत** करें।
36
- - **स्वचालित रूप से उत्पन्न प्रकारों के साथ TypeScript समर्थन सुनिश्चित करें**, जिससे ऑटो-कम्प्लीशन और त्रुटि पहचान में सुधार होता है।
32
+ - **घोषणात्मक शब्दकोशों का उपयोग करके अनुवादों का आसानी से प्रबंधन करें** जो कि कंपोनेंट स्तर पर होते हैं।
33
+ - **मेटाडेटा, रूट्स, और सामग्री को गतिशील रूप से स्थानीयकृत करें**।
34
+ - **स्वचालित रूप से उत्पन्न प्रकारों के साथ TypeScript समर्थन सुनिश्चित करें**, जिससे ऑटोकम्पलीशन और त्रुटि पहचान में सुधार होता है।
37
35
  - **उन्नत सुविधाओं का लाभ उठाएं**, जैसे गतिशील लोकल पहचान और स्विचिंग।
38
- - **Tanstack Start की फ़ाइल-आधारित रूटिंग सिस्टम के साथ लोकल-आवेयर रूटिंग सक्षम करें।**
36
+ - **Tanstack Start की फ़ाइल-आधारित रूटिंग प्रणाली के साथ लोकल-आधारित रूटिंग सक्षम करें**।
39
37
 
40
38
  ---
41
39
 
@@ -63,110 +61,60 @@ pnpm add vite-intlayer --save-dev
63
61
 
64
62
  - **intlayer**
65
63
 
66
- कोर पैकेज जो कॉन्फ़िगरेशन प्रबंधन, अनुवाद, [सामग्री घोषणा](https://github.com/aymericzip/intlayer/blob/main/docs/docs/hi/dictionary/get_started.md), ट्रांसपाइलेशन, और [CLI कमांड](https://github.com/aymericzip/intlayer/blob/main/docs/docs/hi/intlayer_cli.md) के लिए अंतरराष्ट्रीयकरण उपकरण प्रदान करता है।
64
+ मुख्य पैकेज जो कॉन्फ़िगरेशन प्रबंधन, अनुवाद, [सामग्री घोषणा](https://github.com/aymericzip/intlayer/blob/main/docs/docs/en/dictionary/content_file.md), ट्रांसपाइलेशन, और [CLI कमांड्स](https://github.com/aymericzip/intlayer/blob/main/docs/docs/en/intlayer_cli.md) के लिए अंतरराष्ट्रीयकरण उपकरण प्रदान करता है।
67
65
 
68
66
  - **react-intlayer**
69
67
  वह पैकेज जो Intlayer को React एप्लिकेशन के साथ एकीकृत करता है। यह React अंतरराष्ट्रीयकरण के लिए संदर्भ प्रदाता और हुक्स प्रदान करता है।
70
68
 
71
69
  - **vite-intlayer**
72
- इसमें Vite प्लगइन शामिल है जो Intlayer को [Vite बंडलर](https://vite.dev/guide/why.html#why-bundle-for-production) के साथ एकीकृत करता है, साथ ही उपयोगकर्ता की पसंदीदा लोकल का पता लगाने, कुकीज़ प्रबंधित करने, और URL पुनर्निर्देशन को संभालने के लिए मिडलवेयर भी शामिल है।
70
+ इसमें Vite प्लगइन शामिल है जो Intlayer को [Vite बंडलर](https://vite.dev/guide/why.html#why-bundle-for-production) के साथ एकीकृत करता है, साथ ही उपयोगकर्ता की पसंदीदा भाषा का पता लगाने, कुकीज़ प्रबंधित करने, और URL पुनर्निर्देशन को संभालने के लिए मिडलवेयर भी शामिल है।
73
71
 
74
- ### चरण 3: अपने प्रोजेक्ट का कॉन्फ़िगरेशन
72
+ ### चरण 3: अपने प्रोजेक्ट का कॉन्फ़िगरेशन सेट करें
75
73
 
76
- अपने एप्लिकेशन की भाषाओं को कॉन्फ़िगर करने के लिए एक कॉन्फ़िग फ़ाइल बनाएं:
74
+ अपने एप्लिकेशन की भाषाओं को कॉन्फ़िगर करने के लिए एक कॉन्फ़िग फाइल बनाएं:
77
75
 
78
- ```typescript fileName="intlayer.config.ts" codeFormat="typescript"
76
+ ```typescript fileName="intlayer.config.ts"
79
77
  import type { IntlayerConfig } from "intlayer";
80
78
 
81
79
  import { Locales } from "intlayer";
82
80
 
83
81
  const config: IntlayerConfig = {
84
82
  internationalization: {
85
- defaultLocale: Locales.ENGLISH, // डिफ़ॉल्ट भाषा
86
- locales: [
87
- Locales.ENGLISH, // अंग्रेज़ी
88
- Locales.FRENCH, // फ्रेंच
89
- Locales.SPANISH, // स्पेनिश
90
- // आपकी अन्य भाषाएँ
91
- ],
83
+ defaultLocale: Locales.ENGLISH,
84
+ locales: [Locales.ENGLISH, Locales.FRENCH, Locales.SPANISH],
92
85
  },
93
86
  };
94
87
 
95
88
  export default config;
96
89
  ```
97
90
 
98
- ```javascript fileName="intlayer.config.mjs" codeFormat="esm"
99
- import { Locales } from "intlayer";
100
-
101
- /** @type {import('intlayer').IntlayerConfig} */
102
- const config = {
103
- internationalization: {
104
- defaultLocale: Locales.ENGLISH, // डिफ़ॉल्ट भाषा
105
- locales: [
106
- Locales.ENGLISH, // अंग्रेज़ी
107
- Locales.FRENCH, // फ्रेंच
108
- Locales.SPANISH, // स्पेनिश
109
- // आपकी अन्य भाषाएँ
110
- ],
111
- },
112
- };
113
-
114
- export default config;
115
- ```
116
-
117
- ```javascript fileName="intlayer.config.cjs" codeFormat="commonjs"
118
- const { Locales } = require("intlayer");
119
-
120
- /** @type {import('intlayer').IntlayerConfig} */
121
- const config = {
122
- internationalization: {
123
- defaultLocale: Locales.ENGLISH, // डिफ़ॉल्ट भाषा
124
- locales: [
125
- Locales.ENGLISH, // अंग्रेज़ी
126
- Locales.FRENCH, // फ्रेंच
127
- Locales.SPANISH, // स्पेनिश
128
- // आपकी अन्य भाषाएँ
129
- ],
130
- },
131
- };
132
-
133
- module.exports = config;
134
- ```
135
-
136
- > इस कॉन्फ़िगरेशन फ़ाइल के माध्यम से, आप स्थानीयकृत URL, मिडलवेयर पुनर्निर्देशन, कुकी नाम, आपकी सामग्री घोषणाओं का स्थान और एक्सटेंशन सेट कर सकते हैं, कंसोल में Intlayer लॉग को अक्षम कर सकते हैं, और भी बहुत कुछ। उपलब्ध सभी पैरामीटर की पूरी सूची के लिए, [कॉन्फ़िगरेशन दस्तावेज़](https://github.com/aymericzip/intlayer/blob/main/docs/docs/hi/configuration.md) देखें।
91
+ > इस कॉन्फ़िगरेशन फ़ाइल के माध्यम से, आप स्थानीयकृत URL, मिडलवेयर पुनर्निर्देशन, कुकी नाम, अपनी सामग्री घोषणाओं का स्थान और एक्सटेंशन सेट कर सकते हैं, कंसोल में Intlayer लॉग को अक्षम कर सकते हैं, और भी बहुत कुछ। उपलब्ध सभी पैरामीटर की पूरी सूची के लिए, [कॉन्फ़िगरेशन दस्तावेज़](https://github.com/aymericzip/intlayer/blob/main/docs/docs/hi/configuration.md) देखें।
137
92
 
138
93
  ### चरण 4: अपने Vite कॉन्फ़िगरेशन में Intlayer को एकीकृत करें
139
94
 
140
95
  अपने कॉन्फ़िगरेशन में intlayer प्लगइन जोड़ें:
141
96
 
142
- ```typescript fileName="vite.config.ts" codeFormat="typescript"
97
+ ```typescript fileName="vite.config.ts"
143
98
  import { reactRouter } from "@react-router/dev/vite";
144
99
  import { defineConfig } from "vite";
145
- import { intlayerMiddlewarePlugin, intlayer } from "vite-intlayer";
100
+ import { intlayer } from "vite-intlayer";
146
101
  import tsconfigPaths from "vite-tsconfig-paths";
147
102
 
148
103
  export default defineConfig({
149
- plugins: [
150
- reactRouter(),
151
- tsconfigPaths(),
152
- intlayer(),
153
- intlayerMiddlewarePlugin(),
154
- ],
104
+ plugins: [reactRouter(), tsconfigPaths(), intlayer()],
155
105
  });
156
106
  ```
157
107
 
158
- > `intlayer()` Vite प्लगइन का उपयोग Intlayer को Vite के साथ एकीकृत करने के लिए किया जाता है। यह सामग्री घोषणा फ़ाइलों के निर्माण को सुनिश्चित करता है और विकास मोड में उनकी निगरानी करता है। यह Vite एप्लिकेशन के भीतर Intlayer पर्यावरण चर को परिभाषित करता है। इसके अतिरिक्त, यह प्रदर्शन को बेहतर बनाने के लिए उपनाम प्रदान करता है।
108
+ > `intlayer()` Vite प्लगइन का उपयोग Intlayer को Vite के साथ एकीकृत करने के लिए किया जाता है। यह कंटेंट घोषणा फ़ाइलों के निर्माण को सुनिश्चित करता है और विकास मोड में उनकी निगरानी करता है। यह Vite एप्लिकेशन के भीतर Intlayer पर्यावरण चर को परिभाषित करता है। इसके अतिरिक्त, यह प्रदर्शन को अनुकूलित करने के लिए उपनाम प्रदान करता है।
159
109
 
160
- ### चरण 5: लेआउट कॉम्पोनेंट बनाएं
110
+ ### चरण 5: लेआउट कंपोनेंट बनाएं
161
111
 
162
112
  अपने रूट लेआउट और स्थानीय-विशिष्ट लेआउट सेट करें:
163
113
 
164
114
  #### रूट लेआउट
165
115
 
166
- ```tsx fileName="src/routes/{-$locale}/route.tsx" codeFormat="typescript"
167
- // src/routes/{-$locale}/route.tsx
116
+ ```tsx fileName="src/routes/{-$locale}/route.tsx"
168
117
  import { createFileRoute, Navigate, Outlet } from "@tanstack/react-router";
169
- import { configuration } from "intlayer";
170
118
  import { IntlayerProvider, useLocale } from "react-intlayer";
171
119
 
172
120
  import { useI18nHTMLAttributes } from "@/hooks/useI18nHTMLAttributes";
@@ -176,10 +124,11 @@ export const Route = createFileRoute("/{-$locale}")({
176
124
  });
177
125
 
178
126
  function LayoutComponent() {
127
+ const { defaultLocale } = useLocale();
179
128
  const { locale } = Route.useParams();
180
129
 
181
130
  return (
182
- <IntlayerProvider locale={locale}>
131
+ <IntlayerProvider locale={defaultLocale}>
183
132
  <Outlet />
184
133
  </IntlayerProvider>
185
134
  );
@@ -188,9 +137,9 @@ function LayoutComponent() {
188
137
 
189
138
  ### चरण 6: अपनी सामग्री घोषित करें
190
139
 
191
- अपने अनुवादों को संग्रहीत करने के लिए अपनी सामग्री घोषणाएँ बनाएं और प्रबंधित करें:
140
+ अनुवाद संग्रहीत करने के लिए अपनी सामग्री घोषणाएँ बनाएं और प्रबंधित करें:
192
141
 
193
- ```tsx fileName="src/contents/page.content.ts" contentDeclarationFormat="typescript"
142
+ ```tsx fileName="src/contents/page.content.ts"
194
143
  import type { Dictionary } from "intlayer";
195
144
 
196
145
  import { t } from "intlayer";
@@ -204,20 +153,20 @@ const appContent = {
204
153
  fr: "À propos",
205
154
  }),
206
155
  home: t({
207
- en: "होम",
156
+ en: "Home",
208
157
  es: "Inicio",
209
158
  fr: "Accueil",
210
159
  }),
211
160
  },
212
161
  meta: {
213
162
  description: t({
214
- en: "यह Intlayer को TanStack Router के साथ उपयोग करने का एक उदाहरण है",
163
+ en: "This is an example of using Intlayer with TanStack Router",
215
164
  es: "Este es un ejemplo de uso de Intlayer con TanStack Router",
216
165
  fr: "Ceci est un exemple d'utilisation d'Intlayer avec TanStack Router",
217
166
  }),
218
167
  },
219
168
  title: t({
220
- en: "Intlayer + TanStack Router में आपका स्वागत है",
169
+ en: "Welcome to Intlayer + TanStack Router",
221
170
  es: "Bienvenido a Intlayer + TanStack Router",
222
171
  fr: "Bienvenue à Intlayer + TanStack Router",
223
172
  }),
@@ -228,67 +177,107 @@ const appContent = {
228
177
  export default appContent;
229
178
  ```
230
179
 
231
- > आपकी सामग्री घोषणाएँ आपके एप्लिकेशन में कहीं भी परिभाषित की जा सकती हैं जब वे `contentDir` निर्देशिका में शामिल हो जाती हैं (डिफ़ॉल्ट रूप से, `./app`) और सामग्री घोषणा फ़ाइल एक्सटेंशन से मेल खाती हैं (डिफ़ॉल्ट रूप से, `.content.{json,ts,tsx,js,jsx,mjs,mjx,cjs,cjx}`)।
180
+ > आपकी सामग्री घोषणाएँ आपकी एप्लिकेशन में कहीं भी परिभाषित की जा सकती हैं जब तक कि वे `contentDir` निर्देशिका (डिफ़ॉल्ट रूप से, `./app`) में शामिल हों। और सामग्री घोषणा फ़ाइल एक्सटेंशन से मेल खाती हों (डिफ़ॉल्ट रूप से, `.content.{json,ts,tsx,js,jsx,mjs,mjx,cjs,cjx}`)।
232
181
 
233
- > अधिक विवरण के लिए, [सामग्री घोषणा दस्तावेज़](https://github.com/aymericzip/intlayer/blob/main/docs/docs/hi/dictionary/get_started.md) देखें।
182
+ > अधिक विवरण के लिए, [सामग्री घोषणा प्रलेखन](https://github.com/aymericzip/intlayer/blob/main/docs/docs/hi/dictionary/get_started.md) देखें।
234
183
 
235
- ### चरण 7: स्थानीय-ज्ञानी (Locale-Aware) घटक और हुक बनाएं
184
+ ### चरण 7: स्थानीय-जानकारी वाले घटक और हुक बनाएं
236
185
 
237
- स्थानीय-ज्ञानी नेविगेशन के लिए एक `LocalizedLink` घटक बनाएं:
186
+ स्थानीय-जानकारी वाली नेविगेशन के लिए `LocalizedLink` घटक बनाएं:
238
187
 
239
- ```tsx fileName="src/components/localized-link.tsx" codeFormat="typescript"
240
- // src/components/localized-link.tsx
241
- // eslint-disable-next-line no-restricted-imports
242
- import { Link, type LinkProps } from "@tanstack/react-router";
243
- import { getLocalizedUrl } from "intlayer";
244
- import { useLocale } from "react-intlayer";
188
+ ```tsx fileName="src/components/localized-link.tsx"
189
+ import type { FC } from "react";
190
+
191
+ import { Link, type LinkComponentProps } from "@tanstack/react-router";
192
+ import { useLocale } from "react.intlayer";
193
+
194
+ export const LOCALE_ROUTE = "{-$locale}" as const;
195
+
196
+ // मुख्य उपयोगिता
197
+ export type RemoveLocaleParam<T> = T extends string
198
+ ? RemoveLocaleFromString<T>
199
+ : T;
200
+
201
+ export type To = RemoveLocaleParam<LinkComponentProps["to"]>;
202
+
203
+ type CollapseDoubleSlashes<S extends string> =
204
+ S extends `${infer H}//${infer T}` ? CollapseDoubleSlashes<`${H}/${T}`> : S;
245
205
 
246
206
  type LocalizedLinkProps = {
247
- to: string;
248
- } & Omit<LinkProps, "to">;
207
+ to?: To;
208
+ } & Omit<LinkComponentProps, "to">;
249
209
 
250
- export function LocalizedLink(props: LocalizedLinkProps) {
251
- const { locale } = useLocale();
210
+ // सहायक
211
+ type RemoveAll<
212
+ S extends string,
213
+ Sub extends string,
214
+ > = S extends `${infer H}${Sub}${infer T}` ? RemoveAll<`${H}${T}`, Sub> : S;
252
215
 
253
- const isExternal = (to: string) => {
254
- return /^(https?:)?\/\//.test(to);
255
- };
216
+ type RemoveLocaleFromString<S extends string> = CollapseDoubleSlashes<
217
+ RemoveAll<S, typeof LOCALE_ROUTE>
218
+ >;
256
219
 
257
- const to = isExternal(props.to)
258
- ? props.to
259
- : getLocalizedUrl(props.to, locale);
220
+ export const LocalizedLink: FC<LocalizedLinkProps> = (props) => {
221
+ const { locale } = useLocale();
260
222
 
261
- return <Link {...props} to={to as LinkProps["to"]} />;
262
- }
223
+ return (
224
+ <Link
225
+ {...props}
226
+ params={{
227
+ locale,
228
+ ...(typeof props?.params === "object" ? props?.params : {}),
229
+ }}
230
+ to={`/${LOCALE_ROUTE}${props.to}` as LinkComponentProps["to"]}
231
+ />
232
+ );
233
+ };
263
234
  ```
264
235
 
265
- प्रोग्रामेटिक नेविगेशन के लिए `useLocalizedNavigate` हुक बनाएं:
236
+ इस कॉम्पोनेंट के दो उद्देश्य हैं:
266
237
 
267
- ```tsx fileName="src/hooks/useLocalizedNavigate.tsx" codeFormat="typescript"
268
- // src/hooks/useLocalizedNavigate.tsx
269
- // eslint-disable-next-line no-restricted-imports
270
- import { NavigateOptions, useNavigate } from "@tanstack/react-router";
271
- import { getLocalizedUrl } from "intlayer";
272
- import { useLocale } from "react-intlayer";
238
+ - URL से अनावश्यक `{-$locale}` उपसर्ग को हटाना।
239
+ - URL में locale पैरामीटर डालना ताकि उपयोगकर्ता सीधे स्थानीयकृत रूट पर पुनः निर्देशित हो सके।
240
+
241
+ फिर हम प्रोग्रामेटिक नेविगेशन के लिए `useLocalizedNavigate` हुक बना सकते हैं:
273
242
 
274
- type LocalizedNavigateOptions = {
275
- to: string;
276
- } & Omit<NavigateOptions, "to">;
243
+ ```tsx fileName="src/hooks/useLocalizedNavigate.tsx"
244
+ import { useLocale } from "react.intlayer";
245
+ import { useNavigate } from "@tanstack/react-router";
246
+ import { LOCALE_ROUTE } from "@/components/localized-link";
247
+ import type { FileRouteTypes } from "@/routeTree.gen";
277
248
 
278
249
  export const useLocalizedNavigate = () => {
279
250
  const navigate = useNavigate();
251
+
280
252
  const { locale } = useLocale();
281
253
 
282
- const isExternal = (to: string) => {
283
- return /^(https?:)?\/\//.test(to);
284
- };
254
+ type StripLocalePrefix<T extends string> = T extends
255
+ | `/${typeof LOCALE_ROUTE}`
256
+ | `/${typeof LOCALE_ROUTE}/`
257
+ ? "/" // URL से locale उपसर्ग को हटाने के लिए प्रकार
258
+ : T extends `/${typeof LOCALE_ROUTE}/${infer Rest}`
259
+ ? `/${Rest}`
260
+ : never;
261
+
262
+ type LocalizedTo = StripLocalePrefix<FileRouteTypes["to"]>;
263
+
264
+ interface LocalizedNavigate {
265
+ (to: LocalizedTo): ReturnType<typeof navigate>;
266
+ (
267
+ opts: { to: LocalizedTo } & Record<string, unknown>
268
+ ): ReturnType<typeof navigate>;
269
+ }
285
270
 
286
- const localizedNavigate = (options: LocalizedNavigateOptions) => {
287
- const to = isExternal(options.to)
288
- ? options.to
289
- : getLocalizedUrl(options.to, locale);
271
+ const localizedNavigate: LocalizedNavigate = (args: any) => {
272
+ if (typeof args === "string") {
273
+ return navigate({ to: `/${LOCALE_ROUTE}${args}`, params: { locale } });
274
+ }
290
275
 
291
- navigate({ ...options, to: to as NavigateOptions["to"] });
276
+ const { to, ...rest } = args;
277
+
278
+ const localedTo = `/${LOCALE_ROUTE}${to}` as any;
279
+
280
+ return navigate({ to: localedTo, params: { locale, ...rest } as any });
292
281
  };
293
282
 
294
283
  return localizedNavigate;
@@ -297,25 +286,11 @@ export const useLocalizedNavigate = () => {
297
286
 
298
287
  ### चरण 8: अपने पृष्ठों में Intlayer का उपयोग करें
299
288
 
300
- अपने एप्लिकेशन में अपने कंटेंट डिक्शनरीज़ तक पहुँचें:
301
-
302
- #### रूट रीडायरेक्ट पेज
303
-
304
- ```tsx fileName="src/routes/page.tsx" codeFormat="typescript"
305
- // src/routes/page.tsx
306
- import { useLocale } from "react-intlayer";
307
- import { Navigate } from "react-router";
308
-
309
- export default function Page() {
310
- const { locale } = useLocale();
311
-
312
- return <Navigate replace to={locale} />;
313
- }
314
- ```
289
+ अपने एप्लिकेशन में अपने सामग्री शब्दकोशों तक पहुंचें:
315
290
 
316
291
  #### स्थानीयकृत होम पेज
317
292
 
318
- ```tsx fileName="src/routes/{-$locale}/index.tsx" codeFormat="typescript"
293
+ ```tsx fileName="src/routes/{-$locale}/index.tsx"
319
294
  import { createFileRoute } from "@tanstack/react-router";
320
295
  import { getIntlayer } from "intlayer";
321
296
  import { useIntlayer } from "react-intlayer";
@@ -344,16 +319,15 @@ function RouteComponent() {
344
319
  const navigate = useLocalizedNavigate();
345
320
 
346
321
  return (
347
- <div className="grid place-items-center h-screen">
348
- <div className="flex flex-col gap-4 items-center text-center">
322
+ <div>
323
+ <div>
349
324
  {content.title}
350
325
  <LocaleSwitcher />
351
- <div className="flex gap-4">
352
- <a href="/">इंडेक्स</a>
326
+ <div>
353
327
  <LocalizedLink to="/">{content.links.home}</LocalizedLink>
354
328
  <LocalizedLink to="/about">{content.links.about}</LocalizedLink>
355
329
  </div>
356
- <div className="flex gap-4">
330
+ <div>
357
331
  <button onClick={() => navigate({ to: "/" })}>
358
332
  {content.links.home}
359
333
  </button>
@@ -369,52 +343,60 @@ function RouteComponent() {
369
343
 
370
344
  > `useIntlayer` हुक के बारे में अधिक जानने के लिए, [दस्तावेज़](https://github.com/aymericzip/intlayer/blob/main/docs/docs/hi/packages/react-intlayer/useIntlayer.md) देखें।
371
345
 
372
- ### चरण 9: एक लोकल स्विचर कंपोनेंट बनाएं
346
+ ### चरण 9: एक लोकल स्विचर कॉम्पोनेंट बनाएं
347
+
348
+ उपयोगकर्ताओं को भाषाएँ बदलने की अनुमति देने के लिए एक कॉम्पोनेंट बनाएं:
373
349
 
374
- उपयोगकर्ताओं को भाषाएं बदलने की अनुमति देने के लिए एक कंपोनेंट बनाएं:
350
+ ```tsx fileName="src/components/locale-switcher.tsx"
351
+ import type { FC } from "react";
375
352
 
376
- ```tsx fileName="src/components/locale-switcher.tsx" codeFormat="typescript"
377
353
  import { useLocation } from "@tanstack/react-router";
378
- import {
379
- getHTMLTextDir,
380
- getLocaleName,
381
- getLocalizedUrl,
382
- Locales,
383
- } from "intlayer";
384
- import { useIntlayer, useLocale } from "react-intlayer";
385
-
386
- export default function LocaleSwitcher() {
387
- const { pathname, searchStr } = useLocation();
388
- const content = useIntlayer("locale-switcher");
389
-
390
- const { availableLocales, locale, setLocale } = useLocale({
391
- onLocaleChange: (newLocale) => {
392
- const pathWithLocale = getLocalizedUrl(pathname + searchStr, newLocale);
393
- location.replace(pathWithLocale);
394
- },
395
- });
354
+ import { getHTMLTextDir, getLocaleName, getPathWithoutLocale } from "intlayer";
355
+ import { setLocaleCookie, useIntlayer, useLocale } from "react-intlayer";
356
+
357
+ import { LocalizedLink, To } from "./localized-link";
358
+
359
+ export const LocaleSwitcher: FC = () => {
360
+ const { localeSwitcherLabel } = useIntlayer("locale-switcher");
361
+ const { pathname } = useLocation();
362
+
363
+ const { availableLocales, locale } = useLocale();
364
+
365
+ const pathWithoutLocale = getPathWithoutLocale(pathname);
396
366
 
397
367
  return (
398
- <select
399
- aria-label={content.label.toString()}
400
- onChange={(e) => setLocale(e.target.value)}
401
- value={locale}
402
- >
403
- {availableLocales.map((localeItem) => (
404
- <option
405
- dir={getHTMLTextDir(localeItem)}
406
- key={localeItem}
407
- lang={localeItem}
408
- value={localeItem}
409
- >
410
- {/* उदाहरण: Français (फ्रेंच) */}
411
- {getLocaleName(localeItem, locale)} (
412
- {getLocaleName(localeItem, Locales.ENGLISH)})
413
- </option>
368
+ <ol>
369
+ {availableLocales.map((localeEl) => (
370
+ <li key={localeEl}>
371
+ <LocalizedLink
372
+ aria-current={localeEl === locale ? "page" : undefined}
373
+ aria-label={`${localeSwitcherLabel.value} ${getLocaleName(localeEl)}`}
374
+ onClick={() => setLocaleCookie(localeEl)}
375
+ params={{ locale: localeEl }}
376
+ to={pathWithoutLocale as To}
377
+ >
378
+ <span>
379
+ {/* लोकल - उदाहरण के लिए FR */}
380
+ {localeItem}
381
+ </span>
382
+ <span>
383
+ {/* अपनी लोकल में भाषा - उदाहरण के लिए Français */}
384
+ {getLocaleName(localeItem, locale)}
385
+ </span>
386
+ <span dir={getHTMLTextDir(localeItem)} lang={localeItem}>
387
+ {/* वर्तमान लोकल में भाषा - उदाहरण के लिए Francés जब वर्तमान लोकल Locales.SPANISH सेट हो */}
388
+ {getLocaleName(localeItem)}
389
+ </span>
390
+ <span dir="ltr" lang={Locales.ENGLISH}>
391
+ {/* अंग्रेज़ी में भाषा - उदाहरण के लिए French */}
392
+ {getLocaleName(localeItem, Locales.ENGLISH)}
393
+ </span>
394
+ </LocalizedLink>
395
+ </li>
414
396
  ))}
415
- </select>
397
+ </ol>
416
398
  );
417
- }
399
+ };
418
400
  ```
419
401
 
420
402
  > `useLocale` हुक के बारे में अधिक जानने के लिए, [दस्तावेज़](https://github.com/aymericzip/intlayer/blob/main/docs/docs/hi/packages/react-intlayer/useLocale.md) देखें।
@@ -423,7 +405,7 @@ export default function LocaleSwitcher() {
423
405
 
424
406
  HTML lang और dir एट्रिब्यूट्स को प्रबंधित करने के लिए एक हुक बनाएं:
425
407
 
426
- ```tsx fileName="src/hooks/useI18nHTMLAttributes.tsx" codeFormat="typescript"
408
+ ```tsx fileName="src/hooks/useI18nHTMLAttributes.tsx"
427
409
  // src/hooks/useI18nHTMLAttributes.tsx
428
410
  import { getHTMLTextDir } from "intlayer";
429
411
  import { useEffect } from "react";
@@ -441,9 +423,8 @@ export const useI18nHTMLAttributes = () => {
441
423
 
442
424
  फिर इसे अपने रूट कॉम्पोनेंट में उपयोग करें:
443
425
 
444
- ```tsx fileName="src/routes/{-$locale}/index.tsx" codeFormat="typescript"
426
+ ```tsx fileName="src/routes/{-$locale}/index.tsx"
445
427
  import { createFileRoute, Navigate, Outlet } from "@tanstack/react-router";
446
- import { configuration } from "intlayer";
447
428
  import { IntlayerProvider, useLocale } from "react-intlayer";
448
429
 
449
430
  import { useI18nHTMLAttributes } from "@/hooks/useI18nHTMLAttributes"; // हुक को इम्पोर्ट करें
@@ -455,153 +436,96 @@ export const Route = createFileRoute("/{-$locale}")({
455
436
  function LayoutComponent() {
456
437
  useI18nHTMLAttributes(); // इस लाइन को जोड़ें
457
438
 
439
+ const { defaultLocale } = useLocale();
458
440
  const { locale } = Route.useParams();
459
441
 
460
442
  return (
461
- <IntlayerProvider locale={locale}>
443
+ <IntlayerProvider locale={locale ?? defaultLocale}>
462
444
  <Outlet />
463
445
  </IntlayerProvider>
464
446
  );
465
447
  }
466
448
  ```
467
449
 
468
- ### चरण 11: अपनी एप्लिकेशन को बिल्ड और रन करें
450
+ ---
469
451
 
470
- कंटेंट डिक्शनरीज़ बनाएं और अपनी एप्लिकेशन चलाएं:
452
+ ### चरण 11: मिडलवेयर जोड़ें (वैकल्पिक)
471
453
 
472
- ```bash packageManager="npm"
473
- # Intlayer डिक्शनरीज़ बनाएं
474
- npm run intlayer:build
454
+ आप अपने एप्लिकेशन में सर्वर-साइड रूटिंग जोड़ने के लिए `intlayerMiddleware` का भी उपयोग कर सकते हैं। यह प्लगइन URL के आधार पर वर्तमान लोकल का स्वचालित रूप से पता लगाएगा और उपयुक्त लोकल कुकी सेट करेगा। यदि कोई लोकल निर्दिष्ट नहीं है, तो प्लगइन उपयोगकर्ता के ब्राउज़र भाषा प्राथमिकताओं के आधार पर सबसे उपयुक्त लोकल निर्धारित करेगा। यदि कोई लोकल पता नहीं चलता है, तो यह डिफ़ॉल्ट लोकल पर पुनः निर्देशित करेगा।
475
455
 
476
- # डेवलपमेंट सर्वर शुरू करें
477
- npm run dev
478
- ```
456
+ > ध्यान दें कि उत्पादन में `intlayerMiddleware` का उपयोग करने के लिए, आपको `vite-intlayer` पैकेज को `devDependencies` से `dependencies` में स्विच करना होगा।
479
457
 
480
- ```bash packageManager="pnpm"
481
- # Intlayer डिक्शनरीज़ बनाएं
482
- pnpm intlayer:build
458
+ ```typescript {3,7} fileName="vite.config.ts"
459
+ import { reactRouter } from "@react-router/dev/vite";
460
+ import tailwindcss from "@tailwindcss/vite";
461
+ import { defineConfig } from "vite";
462
+ import { intlayer, intlayerMiddleware } from "vite-intlayer";
463
+ import tsconfigPaths from "vite-tsconfig-paths";
483
464
 
484
- # डेवलपमेंट सर्वर शुरू करें
485
- pnpm dev
465
+ export default defineConfig({
466
+ plugins: [
467
+ tailwindcss(),
468
+ reactRouter(),
469
+ tsconfigPaths(),
470
+ intlayer(),
471
+ intlayerMiddleware(),
472
+ ],
473
+ });
486
474
  ```
487
475
 
488
- ```bash packageManager="yarn"
489
- # Intlayer डिक्शनरीज़ बनाएं
490
- yarn intlayer:build
491
-
492
- # डेवलपमेंट सर्वर शुरू करें
493
- yarn dev
494
- ```
476
+ ---
495
477
 
496
- ### चरण 12: TypeScript कॉन्फ़िगर करें (वैकल्पिक)
478
+ ### चरण 12: टाइपस्क्रिप्ट कॉन्फ़िगर करें (वैकल्पिक)
497
479
 
498
- Intlayer मॉड्यूल ऑगमेंटेशन का उपयोग करता है ताकि TypeScript के लाभ प्राप्त किए जा सकें और आपका कोडबेस मजबूत बनाया जा सके।
480
+ Intlayer टाइपस्क्रिप्ट के लाभ प्राप्त करने और आपके कोडबेस को मजबूत बनाने के लिए मॉड्यूल ऑगमेंटेशन का उपयोग करता है।
499
481
 
500
- सुनिश्चित करें कि आपकी TypeScript कॉन्फ़िगरेशन में ऑटो-जेनरेटेड टाइप्स शामिल हैं:
482
+ सुनिश्चित करें कि आपकी टाइपस्क्रिप्ट कॉन्फ़िगरेशन में स्वचालित रूप से जनरेट किए गए प्रकार शामिल हैं:
501
483
 
502
484
  ```json5 fileName="tsconfig.json"
503
485
  {
504
- compilerOptions: {
505
- // ... आपकी मौजूदा TypeScript कॉन्फ़िगरेशन
506
- },
486
+ // ... आपकी मौजूदा कॉन्फ़िगरेशन
507
487
  include: [
508
- // ... आपकी मौजूदा शामिल की गई फाइलें
509
- ".intlayer/**/*.ts", // ऑटो-जेनरेटेड टाइप्स शामिल करें
488
+ // ... आपकी मौजूदा शामिल सूची
489
+ ".intlayer/**/*.ts", // स्वचालित रूप से जनरेट किए गए प्रकार शामिल करें
510
490
  ],
511
491
  }
512
492
  ```
513
493
 
514
- ### Git कॉन्फ़िगरेशन
494
+ ---
495
+
496
+ ### गिट कॉन्फ़िगरेशन
515
497
 
516
- यह अनुशंसित है कि Intlayer द्वारा जनरेट की गई फाइलों को अनदेखा किया जाए। इससे आप उन्हें अपनी Git रिपॉजिटरी में कमिट करने से बच सकते हैं।
498
+ यह अनुशंसित है कि Intlayer द्वारा जनरेट की गई फाइलों को अनदेखा किया जाए। इससे आप उन्हें अपनी गिट रिपॉजिटरी में कमिट करने से बच सकते हैं।
517
499
 
518
- इसके लिए, आप अपनी `.gitignore` फाइल में निम्नलिखित निर्देश जोड़ सकते हैं:
500
+ इसे करने के लिए, आप अपनी `.gitignore` फ़ाइल में निम्नलिखित निर्देश जोड़ सकते हैं:
519
501
 
520
502
  ```plaintext fileName=".gitignore"
521
- # Intlayer द्वारा जनरेट की गई फाइलों को अनदेखा करें
503
+ # Intlayer द्वारा जनरेट की गई फ़ाइलों को अनदेखा करें
522
504
  .intlayer
523
505
  ```
524
506
 
525
507
  ---
526
508
 
527
- ### चरण 13: रीडायरेक्शन बनाएं (वैकल्पिक)
528
-
529
- ```typescript fileName="src/routes/{-$locale}/rotue.tsx" codeFormat="typescript"
530
- function LayoutComponent() {
531
- useI18nHTMLAttributes();
532
-
533
- const { locale } = Route.useParams();
534
- const { locale: selectedLocale } = useLocale();
535
- const { defaultLocale } = configuration.internationalization;
536
- const { prefixDefault } = configuration.middleware;
537
-
538
- // यदि prefixDefault true है और URL में कोई locale मौजूद नहीं है, तो डिफ़ॉल्ट locale पर पुनर्निर्देशित करें
539
- if (selectedLocale === defaultLocale && !locale && prefixDefault) {
540
- return <Navigate replace to={defaultLocale} />;
541
- }
542
-
543
- // यदि URL में locale चयनित locale से मेल नहीं खाता है, तो चयनित locale पर पुनर्निर्देशित करें
544
- if (selectedLocale !== defaultLocale && !locale) {
545
- return <Navigate replace to={selectedLocale} />;
546
- }
547
-
548
- return (
549
- <IntlayerProvider locale={locale}>
550
- <Outlet />
551
- </IntlayerProvider>
552
- );
553
- }
554
- ```
555
-
556
- ## प्रोडक्शन डिप्लॉयमेंट
557
-
558
- जब आप अपनी एप्लिकेशन को डिप्लॉय कर रहे हों:
559
-
560
- 1. **अपनी एप्लिकेशन बनाएं:**
561
-
562
- ```bash
563
- npm run build
564
- ```
565
-
566
- 2. **Intlayer शब्दकोश बनाएं:**
567
-
568
- ```bash
569
- npm run intlayer:build
570
- ```
571
-
572
- 3. **यदि प्रोडक्शन में मिडलवेयर का उपयोग कर रहे हैं तो `vite-intlayer` को dependencies में जोड़ें:**
573
- ```bash
574
- npm install vite-intlayer --save
575
- ```
576
-
577
- अब आपकी एप्लिकेशन निम्नलिखित का समर्थन करेगी:
578
-
579
- - **URL संरचना**: `/en`, `/en/about`, `/tr`, `/tr/about`
580
- - **ब्राउज़र प्राथमिकताओं के आधार पर स्वचालित लोकल डिटेक्शन**
581
- - **Tanstack Start के साथ लोकल-संज्ञानी रूटिंग**
582
- - **स्वचालित जनरेट किए गए प्रकारों के साथ TypeScript समर्थन**
583
- - **सर्वर-साइड रेंडरिंग के साथ उचित लोकल हैंडलिंग**
584
-
585
509
  ## VS कोड एक्सटेंशन
586
510
 
587
- Intlayer के साथ अपने विकास अनुभव को बेहतर बनाने के लिए, आप आधिकारिक **Intlayer VS Code एक्सटेंशन** इंस्टॉल कर सकते हैं।
511
+ Intlayer के साथ अपने विकास अनुभव को बेहतर बनाने के लिए, आप आधिकारिक **Intlayer VS कोड एक्सटेंशन** इंस्टॉल कर सकते हैं।
588
512
 
589
- [VS Code मार्केटप्लेस से इंस्टॉल करें](https://marketplace.visualstudio.com/items?itemName=intlayer.intlayer-vs-code-extension)
513
+ [VS कोड मार्केटप्लेस से इंस्टॉल करें](https://marketplace.visualstudio.com/items?itemName=intlayer.intlayer-vs-code-extension)
590
514
 
591
515
  यह एक्सटेंशन प्रदान करता है:
592
516
 
593
- - अनुवाद कुंजियों के लिए **ऑटोकंप्लीशन**।
594
- - गायब अनुवादों के लिए **रीयल-टाइम त्रुटि पहचान**।
517
+ - अनुवाद कुंजियों के लिए **ऑटोकम्प्लीशन**।
518
+ - गायब अनुवादों के लिए **रीयल-टाइम त्रुटि पता लगाना**।
595
519
  - अनुवादित सामग्री के **इनलाइन पूर्वावलोकन**।
596
520
  - अनुवादों को आसानी से बनाने और अपडेट करने के लिए **त्वरित क्रियाएं**।
597
521
 
598
- एक्सटेंशन का उपयोग कैसे करें, इसके लिए अधिक जानकारी के लिए देखें [Intlayer VS Code एक्सटेंशन दस्तावेज़](https://intlayer.org/doc/vs-code-extension)
522
+ विस्तार से जानने के लिए कि एक्सटेंशन का उपयोग कैसे करें, कृपया [Intlayer VS कोड एक्सटेंशन दस्तावेज़](https://intlayer.org/doc/vs-code-extension) देखें।
599
523
 
600
524
  ---
601
525
 
602
526
  ## आगे बढ़ें
603
527
 
604
- आगे बढ़ने के लिए, आप [विज़ुअल एडिटर](https://github.com/aymericzip/intlayer/blob/main/docs/docs/hi/intlayer_visual_editor.md) को लागू कर सकते हैं या अपने कंटेंट को [CMS](https://github.com/aymericzip/intlayer/blob/main/docs/docs/hi/intlayer_CMS.md) का उपयोग करके बाहरी रूप से प्रबंधित कर सकते हैं।
528
+ आगे बढ़ने के लिए, आप [विज़ुअल एडिटर](https://github.com/aymericzip/intlayer/blob/main/docs/docs/en/intlayer_visual_editor.md) को लागू कर सकते हैं या अपनी सामग्री को [CMS](https://github.com/aymericzip/intlayer/blob/main/docs/docs/en/intlayer_CMS.md) का उपयोग करके बाहरी रूप से प्रबंधित कर सकते हैं।
605
529
 
606
530
  ---
607
531
 
@@ -609,15 +533,16 @@ Intlayer के साथ अपने विकास अनुभव को
609
533
 
610
534
  - [Intlayer दस्तावेज़](https://intlayer.org)
611
535
  - [Tanstack Start दस्तावेज़](https://reactrouter.com/)
612
- - [useIntlayer हुक](https://github.com/aymericzip/intlayer/blob/main/docs/docs/hi/packages/react-intlayer/useIntlayer.md)
536
+ - [useIntlayer हुक](https://github.com/aymericzip/intlayer/blob/main/docs/docs/en/packages/react-intlayer/useIntlayer.md)
613
537
  - [useLocale हुक](https://github.com/aymericzip/intlayer/blob/main/docs/docs/hi/packages/react-intlayer/useLocale.md)
614
538
  - [सामग्री घोषणा](https://github.com/aymericzip/intlayer/blob/main/docs/docs/hi/dictionary/get_started.md)
615
539
  - [कॉन्फ़िगरेशन](https://github.com/aymericzip/intlayer/blob/main/docs/docs/hi/configuration.md)
616
540
 
617
- यह व्यापक गाइड आपको Intlayer को Tanstack Start के साथ पूरी तरह से अंतरराष्ट्रीयकृत एप्लिकेशन के लिए एकीकृत करने के लिए आवश्यक सभी जानकारी प्रदान करता है, जिसमें स्थानीय-जानकारी रूटिंग और TypeScript समर्थन शामिल है।
541
+ यह व्यापक मार्गदर्शिका आपको Intlayer को Tanstack Start के साथ पूरी तरह से अंतरराष्ट्रीयकृत एप्लिकेशन के लिए एकीकृत करने के लिए आवश्यक सभी जानकारी प्रदान करती है, जिसमें स्थानीय-जानकारी रूटिंग और TypeScript समर्थन शामिल है।
618
542
 
619
543
  ## दस्तावेज़ इतिहास
620
544
 
621
- | संस्करण | तिथि | परिवर्तन |
622
- | ------- | ---------- | ------------------------------- |
623
- | 5.8.1 | 2025-09-09 | Tanstack Start के लिए जोड़ा गया |
545
+ | संस्करण | तिथि | परिवर्तन |
546
+ | ------- | ---------- | --------------------------- |
547
+ | 6.5.2 | 2025-10-03 | दस्तावेज़ अपडेट |
548
+ | 5.8.1 | 2025-09-09 | Tanstack Start के लिए जोड़ा |