@intlayer/docs 7.5.11 → 7.5.13

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 (417) hide show
  1. package/blog/ar/intlayer_with_i18next.md +0 -2
  2. package/blog/ar/intlayer_with_next-i18next.md +0 -2
  3. package/blog/ar/intlayer_with_react-i18next.md +0 -2
  4. package/blog/de/intlayer_with_i18next.md +0 -45
  5. package/blog/de/intlayer_with_next-i18next.md +0 -46
  6. package/blog/de/intlayer_with_react-i18next.md +0 -2
  7. package/blog/en/intlayer_with_i18next.md +0 -46
  8. package/blog/en/intlayer_with_next-i18next.md +0 -48
  9. package/blog/en/intlayer_with_next-intl.md +0 -44
  10. package/blog/en/intlayer_with_react-i18next.md +0 -44
  11. package/blog/en/intlayer_with_react-intl.md +0 -42
  12. package/blog/en/intlayer_with_vue-i18n.md +0 -44
  13. package/blog/en-GB/intlayer_with_i18next.md +0 -45
  14. package/blog/en-GB/intlayer_with_next-i18next.md +0 -47
  15. package/blog/en-GB/intlayer_with_next-intl.md +0 -42
  16. package/blog/en-GB/intlayer_with_react-i18next.md +0 -43
  17. package/blog/en-GB/intlayer_with_react-intl.md +0 -42
  18. package/blog/en-GB/intlayer_with_vue-i18n.md +0 -46
  19. package/blog/es/intlayer_with_i18next.md +0 -45
  20. package/blog/es/intlayer_with_next-i18next.md +0 -47
  21. package/blog/es/intlayer_with_next-intl.md +0 -42
  22. package/blog/es/intlayer_with_react-i18next.md +0 -43
  23. package/blog/es/intlayer_with_react-intl.md +0 -42
  24. package/blog/es/intlayer_with_vue-i18n.md +0 -46
  25. package/blog/fr/intlayer_with_i18next.md +0 -45
  26. package/blog/fr/intlayer_with_next-i18next.md +0 -47
  27. package/blog/fr/intlayer_with_next-intl.md +0 -42
  28. package/blog/fr/intlayer_with_react-i18next.md +0 -43
  29. package/blog/fr/intlayer_with_react-intl.md +0 -42
  30. package/blog/fr/intlayer_with_vue-i18n.md +0 -46
  31. package/blog/hi/intlayer_with_i18next.md +0 -2
  32. package/blog/hi/intlayer_with_next-i18next.md +0 -2
  33. package/blog/hi/intlayer_with_react-i18next.md +0 -2
  34. package/blog/id/intlayer_with_i18next.md +0 -2
  35. package/blog/id/intlayer_with_next-i18next.md +0 -2
  36. package/blog/id/intlayer_with_react-i18next.md +0 -2
  37. package/blog/it/intlayer_with_i18next.md +0 -2
  38. package/blog/it/intlayer_with_next-i18next.md +0 -2
  39. package/blog/it/intlayer_with_react-i18next.md +0 -2
  40. package/blog/ja/intlayer_with_i18next.md +0 -45
  41. package/blog/ja/intlayer_with_next-i18next.md +0 -46
  42. package/blog/ja/intlayer_with_next-intl.md +0 -42
  43. package/blog/ja/intlayer_with_react-i18next.md +0 -42
  44. package/blog/ja/intlayer_with_react-intl.md +0 -42
  45. package/blog/ja/intlayer_with_vue-i18n.md +0 -46
  46. package/blog/ko/intlayer_with_i18next.md +0 -2
  47. package/blog/ko/intlayer_with_next-i18next.md +0 -2
  48. package/blog/ko/intlayer_with_react-i18next.md +0 -1
  49. package/blog/pl/intlayer_with_i18next.md +0 -45
  50. package/blog/pl/intlayer_with_next-i18next.md +0 -46
  51. package/blog/pl/intlayer_with_next-intl.md +0 -42
  52. package/blog/pl/intlayer_with_react-i18next.md +0 -43
  53. package/blog/pl/intlayer_with_react-intl.md +0 -42
  54. package/blog/pl/intlayer_with_vue-i18n.md +0 -46
  55. package/blog/pt/intlayer_with_i18next.md +0 -2
  56. package/blog/pt/intlayer_with_next-i18next.md +0 -2
  57. package/blog/pt/intlayer_with_react-i18next.md +0 -2
  58. package/blog/ru/intlayer_with_i18next.md +0 -45
  59. package/blog/ru/intlayer_with_next-i18next.md +0 -47
  60. package/blog/ru/intlayer_with_next-intl.md +0 -42
  61. package/blog/ru/intlayer_with_react-i18next.md +0 -43
  62. package/blog/ru/intlayer_with_react-intl.md +0 -42
  63. package/blog/ru/intlayer_with_vue-i18n.md +0 -46
  64. package/blog/tr/intlayer_with_i18next.md +0 -2
  65. package/blog/tr/intlayer_with_next-i18next.md +0 -1
  66. package/blog/tr/intlayer_with_react-i18next.md +0 -2
  67. package/blog/uk/compiler_vs_declarative_i18n.md +224 -0
  68. package/blog/uk/i18n_using_next-i18next.md +1086 -0
  69. package/blog/uk/i18n_using_next-intl.md +760 -0
  70. package/blog/uk/index.md +69 -0
  71. package/blog/uk/internationalization_and_SEO.md +273 -0
  72. package/blog/uk/intlayer_with_i18next.md +211 -0
  73. package/blog/uk/intlayer_with_next-i18next.md +202 -0
  74. package/blog/uk/intlayer_with_next-intl.md +203 -0
  75. package/blog/uk/intlayer_with_react-i18next.md +200 -0
  76. package/blog/uk/intlayer_with_react-intl.md +202 -0
  77. package/blog/uk/intlayer_with_vue-i18n.md +206 -0
  78. package/blog/uk/l10n_platform_alternative/Lokalise.md +80 -0
  79. package/blog/uk/l10n_platform_alternative/crowdin.md +80 -0
  80. package/blog/uk/l10n_platform_alternative/phrase.md +78 -0
  81. package/blog/uk/list_i18n_technologies/CMS/drupal.md +143 -0
  82. package/blog/uk/list_i18n_technologies/CMS/wix.md +167 -0
  83. package/blog/uk/list_i18n_technologies/CMS/wordpress.md +189 -0
  84. package/blog/uk/list_i18n_technologies/frameworks/angular.md +125 -0
  85. package/blog/uk/list_i18n_technologies/frameworks/flutter.md +128 -0
  86. package/blog/uk/list_i18n_technologies/frameworks/react-native.md +217 -0
  87. package/blog/uk/list_i18n_technologies/frameworks/react.md +155 -0
  88. package/blog/uk/list_i18n_technologies/frameworks/svelte.md +145 -0
  89. package/blog/uk/list_i18n_technologies/frameworks/vue.md +144 -0
  90. package/blog/uk/next-i18next_vs_next-intl_vs_intlayer.md +1499 -0
  91. package/blog/uk/nextjs-multilingual-seo-comparison.md +360 -0
  92. package/blog/uk/rag_powered_documentation_assistant.md +288 -0
  93. package/blog/uk/react-i18next_vs_react-intl_vs_intlayer.md +164 -0
  94. package/blog/uk/vue-i18n_vs_intlayer.md +279 -0
  95. package/blog/uk/what_is_internationalization.md +167 -0
  96. package/blog/vi/intlayer_with_i18next.md +0 -2
  97. package/blog/vi/intlayer_with_next-i18next.md +0 -2
  98. package/blog/vi/intlayer_with_react-i18next.md +0 -2
  99. package/blog/zh/intlayer_with_i18next.md +0 -2
  100. package/blog/zh/intlayer_with_next-i18next.md +0 -2
  101. package/blog/zh/intlayer_with_react-i18next.md +0 -2
  102. package/blog/zh/intlayer_with_vue-i18n.md +0 -46
  103. package/dist/cjs/generated/blog.entry.cjs +58 -29
  104. package/dist/cjs/generated/blog.entry.cjs.map +1 -1
  105. package/dist/cjs/generated/docs.entry.cjs +218 -99
  106. package/dist/cjs/generated/docs.entry.cjs.map +1 -1
  107. package/dist/cjs/generated/frequentQuestions.entry.cjs +50 -15
  108. package/dist/cjs/generated/frequentQuestions.entry.cjs.map +1 -1
  109. package/dist/cjs/generated/legal.entry.cjs +4 -2
  110. package/dist/cjs/generated/legal.entry.cjs.map +1 -1
  111. package/dist/esm/generated/blog.entry.mjs +58 -29
  112. package/dist/esm/generated/blog.entry.mjs.map +1 -1
  113. package/dist/esm/generated/docs.entry.mjs +218 -99
  114. package/dist/esm/generated/docs.entry.mjs.map +1 -1
  115. package/dist/esm/generated/frequentQuestions.entry.mjs +50 -15
  116. package/dist/esm/generated/frequentQuestions.entry.mjs.map +1 -1
  117. package/dist/esm/generated/legal.entry.mjs +4 -2
  118. package/dist/esm/generated/legal.entry.mjs.map +1 -1
  119. package/dist/types/generated/blog.entry.d.ts.map +1 -1
  120. package/dist/types/generated/docs.entry.d.ts +1 -0
  121. package/dist/types/generated/docs.entry.d.ts.map +1 -1
  122. package/dist/types/generated/frequentQuestions.entry.d.ts +1 -0
  123. package/dist/types/generated/frequentQuestions.entry.d.ts.map +1 -1
  124. package/dist/types/generated/legal.entry.d.ts.map +1 -1
  125. package/docs/ar/configuration.md +6 -1
  126. package/docs/ar/dictionary/content_file.md +6 -1
  127. package/docs/ar/intlayer_with_next-i18next.md +0 -1
  128. package/docs/ar/intlayer_with_nextjs_14.md +28 -0
  129. package/docs/ar/intlayer_with_nextjs_15.md +28 -0
  130. package/docs/ar/intlayer_with_nextjs_16.md +28 -0
  131. package/docs/ar/intlayer_with_nextjs_no_locale_path.md +1159 -0
  132. package/docs/ar/plugins/sync-json.md +6 -2
  133. package/docs/de/configuration.md +6 -1
  134. package/docs/de/dictionary/content_file.md +6 -1
  135. package/docs/de/intlayer_with_next-i18next.md +0 -1
  136. package/docs/de/intlayer_with_nextjs_14.md +28 -0
  137. package/docs/de/intlayer_with_nextjs_15.md +28 -0
  138. package/docs/de/intlayer_with_nextjs_16.md +28 -0
  139. package/docs/de/intlayer_with_nextjs_no_locale_path.md +1152 -0
  140. package/docs/de/plugins/sync-json.md +6 -2
  141. package/docs/en/configuration.md +6 -1
  142. package/docs/en/dictionary/content_file.md +6 -1
  143. package/docs/en/intlayer_with_next-i18next.md +0 -1
  144. package/docs/en/intlayer_with_nextjs_14.md +28 -0
  145. package/docs/en/intlayer_with_nextjs_15.md +28 -0
  146. package/docs/en/intlayer_with_nextjs_16.md +31 -1
  147. package/docs/en/intlayer_with_nextjs_no_locale_path.md +1132 -0
  148. package/docs/en/plugins/sync-json.md +6 -2
  149. package/docs/en-GB/configuration.md +6 -1
  150. package/docs/en-GB/dictionary/content_file.md +3 -1
  151. package/docs/en-GB/intlayer_with_next-i18next.md +0 -1
  152. package/docs/en-GB/intlayer_with_nextjs_14.md +28 -0
  153. package/docs/en-GB/intlayer_with_nextjs_15.md +28 -0
  154. package/docs/en-GB/intlayer_with_nextjs_16.md +28 -0
  155. package/docs/en-GB/intlayer_with_nextjs_no_locale_path.md +1154 -0
  156. package/docs/en-GB/plugins/sync-json.md +6 -2
  157. package/docs/es/configuration.md +6 -1
  158. package/docs/es/dictionary/content_file.md +6 -1
  159. package/docs/es/intlayer_with_next-i18next.md +0 -1
  160. package/docs/es/intlayer_with_nextjs_14.md +28 -0
  161. package/docs/es/intlayer_with_nextjs_15.md +28 -0
  162. package/docs/es/intlayer_with_nextjs_16.md +28 -0
  163. package/docs/es/intlayer_with_nextjs_no_locale_path.md +1143 -0
  164. package/docs/es/plugins/sync-json.md +6 -2
  165. package/docs/fr/configuration.md +6 -1
  166. package/docs/fr/dictionary/content_file.md +3 -1
  167. package/docs/fr/intlayer_with_next-i18next.md +0 -1
  168. package/docs/fr/intlayer_with_nextjs_14.md +28 -0
  169. package/docs/fr/intlayer_with_nextjs_15.md +28 -0
  170. package/docs/fr/intlayer_with_nextjs_16.md +28 -0
  171. package/docs/fr/intlayer_with_nextjs_no_locale_path.md +1174 -0
  172. package/docs/fr/plugins/sync-json.md +9 -5
  173. package/docs/hi/configuration.md +6 -1
  174. package/docs/hi/dictionary/content_file.md +3 -1
  175. package/docs/hi/intlayer_with_next-i18next.md +0 -1
  176. package/docs/hi/intlayer_with_nextjs_14.md +28 -0
  177. package/docs/hi/intlayer_with_nextjs_15.md +28 -0
  178. package/docs/hi/intlayer_with_nextjs_16.md +28 -0
  179. package/docs/hi/intlayer_with_nextjs_no_locale_path.md +1151 -0
  180. package/docs/hi/plugins/sync-json.md +6 -2
  181. package/docs/id/configuration.md +6 -1
  182. package/docs/id/dictionary/content_file.md +3 -1
  183. package/docs/id/intlayer_with_next-i18next.md +0 -1
  184. package/docs/id/intlayer_with_nextjs_14.md +28 -0
  185. package/docs/id/intlayer_with_nextjs_15.md +28 -0
  186. package/docs/id/intlayer_with_nextjs_16.md +28 -0
  187. package/docs/id/intlayer_with_nextjs_no_locale_path.md +1154 -0
  188. package/docs/id/plugins/sync-json.md +6 -2
  189. package/docs/it/configuration.md +6 -1
  190. package/docs/it/dictionary/content_file.md +3 -1
  191. package/docs/it/intlayer_with_next-i18next.md +0 -1
  192. package/docs/it/intlayer_with_nextjs_14.md +28 -0
  193. package/docs/it/intlayer_with_nextjs_15.md +28 -0
  194. package/docs/it/intlayer_with_nextjs_16.md +28 -0
  195. package/docs/it/intlayer_with_nextjs_no_locale_path.md +1148 -0
  196. package/docs/it/plugins/sync-json.md +6 -2
  197. package/docs/ja/configuration.md +6 -1
  198. package/docs/ja/dictionary/content_file.md +3 -1
  199. package/docs/ja/intlayer_with_next-i18next.md +0 -1
  200. package/docs/ja/intlayer_with_nextjs_14.md +28 -0
  201. package/docs/ja/intlayer_with_nextjs_15.md +28 -0
  202. package/docs/ja/intlayer_with_nextjs_16.md +28 -0
  203. package/docs/ja/intlayer_with_nextjs_no_locale_path.md +1222 -0
  204. package/docs/ja/plugins/sync-json.md +6 -2
  205. package/docs/ko/configuration.md +6 -1
  206. package/docs/ko/dictionary/content_file.md +3 -1
  207. package/docs/ko/intlayer_with_next-i18next.md +0 -1
  208. package/docs/ko/intlayer_with_nextjs_14.md +28 -0
  209. package/docs/ko/intlayer_with_nextjs_15.md +28 -0
  210. package/docs/ko/intlayer_with_nextjs_16.md +28 -0
  211. package/docs/ko/intlayer_with_nextjs_no_locale_path.md +1205 -0
  212. package/docs/ko/plugins/sync-json.md +6 -2
  213. package/docs/pl/configuration.md +3 -1
  214. package/docs/pl/dictionary/content_file.md +3 -1
  215. package/docs/pl/intlayer_with_next-i18next.md +0 -1
  216. package/docs/pl/intlayer_with_nextjs_14.md +28 -0
  217. package/docs/pl/intlayer_with_nextjs_15.md +28 -0
  218. package/docs/pl/intlayer_with_nextjs_16.md +28 -0
  219. package/docs/pl/intlayer_with_nextjs_no_locale_path.md +1149 -0
  220. package/docs/pl/plugins/sync-json.md +6 -2
  221. package/docs/pt/configuration.md +6 -1
  222. package/docs/pt/dictionary/content_file.md +3 -1
  223. package/docs/pt/intlayer_with_next-i18next.md +0 -1
  224. package/docs/pt/intlayer_with_nextjs_14.md +28 -0
  225. package/docs/pt/intlayer_with_nextjs_15.md +28 -0
  226. package/docs/pt/intlayer_with_nextjs_16.md +28 -0
  227. package/docs/pt/intlayer_with_nextjs_no_locale_path.md +1152 -0
  228. package/docs/pt/plugins/sync-json.md +6 -2
  229. package/docs/ru/configuration.md +6 -1
  230. package/docs/ru/dictionary/content_file.md +6 -1
  231. package/docs/ru/intlayer_with_next-i18next.md +0 -1
  232. package/docs/ru/intlayer_with_nextjs_14.md +28 -0
  233. package/docs/ru/intlayer_with_nextjs_15.md +28 -0
  234. package/docs/ru/intlayer_with_nextjs_16.md +28 -0
  235. package/docs/ru/intlayer_with_nextjs_no_locale_path.md +1204 -0
  236. package/docs/ru/plugins/sync-json.md +6 -2
  237. package/docs/tr/configuration.md +6 -1
  238. package/docs/tr/dictionary/content_file.md +3 -1
  239. package/docs/tr/intlayer_with_next-i18next.md +0 -1
  240. package/docs/tr/intlayer_with_nextjs_14.md +28 -0
  241. package/docs/tr/intlayer_with_nextjs_15.md +28 -0
  242. package/docs/tr/intlayer_with_nextjs_16.md +28 -0
  243. package/docs/tr/intlayer_with_nextjs_no_locale_path.md +1159 -0
  244. package/docs/tr/plugins/sync-json.md +6 -2
  245. package/docs/uk/CI_CD.md +198 -0
  246. package/docs/uk/autoFill.md +307 -0
  247. package/docs/uk/bundle_optimization.md +185 -0
  248. package/docs/uk/cli/build.md +64 -0
  249. package/docs/uk/cli/ci.md +137 -0
  250. package/docs/uk/cli/configuration.md +63 -0
  251. package/docs/uk/cli/debug.md +46 -0
  252. package/docs/uk/cli/doc-review.md +43 -0
  253. package/docs/uk/cli/doc-translate.md +132 -0
  254. package/docs/uk/cli/editor.md +28 -0
  255. package/docs/uk/cli/fill.md +130 -0
  256. package/docs/uk/cli/index.md +190 -0
  257. package/docs/uk/cli/init.md +84 -0
  258. package/docs/uk/cli/list.md +90 -0
  259. package/docs/uk/cli/list_projects.md +128 -0
  260. package/docs/uk/cli/live.md +41 -0
  261. package/docs/uk/cli/login.md +157 -0
  262. package/docs/uk/cli/pull.md +78 -0
  263. package/docs/uk/cli/push.md +98 -0
  264. package/docs/uk/cli/sdk.md +71 -0
  265. package/docs/uk/cli/test.md +76 -0
  266. package/docs/uk/cli/transform.md +65 -0
  267. package/docs/uk/cli/version.md +24 -0
  268. package/docs/uk/cli/watch.md +37 -0
  269. package/docs/uk/compiler.md +133 -0
  270. package/docs/uk/component_i18n.md +194 -0
  271. package/docs/uk/configuration.md +742 -0
  272. package/docs/uk/dictionary/condition.md +237 -0
  273. package/docs/uk/dictionary/content_file.md +1134 -0
  274. package/docs/uk/dictionary/enumeration.md +245 -0
  275. package/docs/uk/dictionary/file.md +232 -0
  276. package/docs/uk/dictionary/function_fetching.md +212 -0
  277. package/docs/uk/dictionary/gender.md +273 -0
  278. package/docs/uk/dictionary/insertion.md +187 -0
  279. package/docs/uk/dictionary/markdown.md +383 -0
  280. package/docs/uk/dictionary/nesting.md +273 -0
  281. package/docs/uk/dictionary/translation.md +332 -0
  282. package/docs/uk/formatters.md +595 -0
  283. package/docs/uk/how_works_intlayer.md +256 -0
  284. package/docs/uk/index.md +175 -0
  285. package/docs/uk/interest_of_intlayer.md +297 -0
  286. package/docs/uk/intlayer_CMS.md +569 -0
  287. package/docs/uk/intlayer_visual_editor.md +292 -0
  288. package/docs/uk/intlayer_with_angular.md +710 -0
  289. package/docs/uk/intlayer_with_astro.md +256 -0
  290. package/docs/uk/intlayer_with_create_react_app.md +1258 -0
  291. package/docs/uk/intlayer_with_express.md +429 -0
  292. package/docs/uk/intlayer_with_fastify.md +446 -0
  293. package/docs/uk/intlayer_with_lynx+react.md +548 -0
  294. package/docs/uk/intlayer_with_nestjs.md +283 -0
  295. package/docs/uk/intlayer_with_next-i18next.md +640 -0
  296. package/docs/uk/intlayer_with_next-intl.md +456 -0
  297. package/docs/uk/intlayer_with_nextjs_14.md +1646 -0
  298. package/docs/uk/intlayer_with_nextjs_15.md +1910 -0
  299. package/docs/uk/intlayer_with_nextjs_16.md +1763 -0
  300. package/docs/uk/intlayer_with_nextjs_no_locale_path.md +1159 -0
  301. package/docs/uk/intlayer_with_nextjs_page_router.md +1541 -0
  302. package/docs/uk/intlayer_with_nuxt.md +711 -0
  303. package/docs/uk/intlayer_with_react_native+expo.md +715 -0
  304. package/docs/uk/intlayer_with_react_router_v7.md +600 -0
  305. package/docs/uk/intlayer_with_react_router_v7_fs_routes.md +669 -0
  306. package/docs/uk/intlayer_with_svelte_kit.md +579 -0
  307. package/docs/uk/intlayer_with_tanstack.md +818 -0
  308. package/docs/uk/intlayer_with_vite+preact.md +1748 -0
  309. package/docs/uk/intlayer_with_vite+react.md +1449 -0
  310. package/docs/uk/intlayer_with_vite+solid.md +302 -0
  311. package/docs/uk/intlayer_with_vite+svelte.md +520 -0
  312. package/docs/uk/intlayer_with_vite+vue.md +1113 -0
  313. package/docs/uk/introduction.md +222 -0
  314. package/docs/uk/locale_mapper.md +242 -0
  315. package/docs/uk/mcp_server.md +211 -0
  316. package/docs/uk/packages/express-intlayer/t.md +465 -0
  317. package/docs/uk/packages/intlayer/getConfiguration.md +145 -0
  318. package/docs/uk/packages/intlayer/getEnumeration.md +159 -0
  319. package/docs/uk/packages/intlayer/getHTMLTextDir.md +121 -0
  320. package/docs/uk/packages/intlayer/getLocaleLang.md +81 -0
  321. package/docs/uk/packages/intlayer/getLocaleName.md +135 -0
  322. package/docs/uk/packages/intlayer/getLocalizedUrl.md +338 -0
  323. package/docs/uk/packages/intlayer/getMultilingualUrls.md +359 -0
  324. package/docs/uk/packages/intlayer/getPathWithoutLocale.md +75 -0
  325. package/docs/uk/packages/intlayer/getPrefix.md +213 -0
  326. package/docs/uk/packages/intlayer/getTranslation.md +190 -0
  327. package/docs/uk/packages/intlayer/getTranslationContent.md +189 -0
  328. package/docs/uk/packages/next-intlayer/t.md +365 -0
  329. package/docs/uk/packages/next-intlayer/useDictionary.md +276 -0
  330. package/docs/uk/packages/next-intlayer/useIntlayer.md +263 -0
  331. package/docs/uk/packages/next-intlayer/useLocale.md +166 -0
  332. package/docs/uk/packages/react-intlayer/t.md +311 -0
  333. package/docs/uk/packages/react-intlayer/useDictionary.md +295 -0
  334. package/docs/uk/packages/react-intlayer/useI18n.md +250 -0
  335. package/docs/uk/packages/react-intlayer/useIntlayer.md +251 -0
  336. package/docs/uk/packages/react-intlayer/useLocale.md +210 -0
  337. package/docs/uk/per_locale_file.md +345 -0
  338. package/docs/uk/plugins/sync-json.md +398 -0
  339. package/docs/uk/readme.md +265 -0
  340. package/docs/uk/releases/v6.md +305 -0
  341. package/docs/uk/releases/v7.md +624 -0
  342. package/docs/uk/roadmap.md +346 -0
  343. package/docs/uk/testing.md +204 -0
  344. package/docs/uk/vs_code_extension.md +133 -0
  345. package/docs/vi/configuration.md +6 -1
  346. package/docs/vi/dictionary/content_file.md +6 -1
  347. package/docs/vi/intlayer_with_next-i18next.md +0 -1
  348. package/docs/vi/intlayer_with_nextjs_14.md +28 -0
  349. package/docs/vi/intlayer_with_nextjs_15.md +28 -0
  350. package/docs/vi/intlayer_with_nextjs_16.md +28 -0
  351. package/docs/vi/intlayer_with_nextjs_no_locale_path.md +1151 -0
  352. package/docs/vi/plugins/sync-json.md +6 -2
  353. package/docs/zh/configuration.md +6 -1
  354. package/docs/zh/dictionary/content_file.md +6 -1
  355. package/docs/zh/intlayer_with_next-i18next.md +0 -1
  356. package/docs/zh/intlayer_with_nextjs_14.md +28 -0
  357. package/docs/zh/intlayer_with_nextjs_15.md +28 -0
  358. package/docs/zh/intlayer_with_nextjs_16.md +28 -0
  359. package/docs/zh/intlayer_with_nextjs_no_locale_path.md +1206 -0
  360. package/docs/zh/plugins/sync-json.md +9 -5
  361. package/frequent_questions/ar/SSR_Next_no_[locale].md +1 -1
  362. package/frequent_questions/ar/error-vite-env-only.md +77 -0
  363. package/frequent_questions/de/SSR_Next_no_[locale].md +1 -1
  364. package/frequent_questions/de/error-vite-env-only.md +77 -0
  365. package/frequent_questions/en/SSR_Next_no_[locale].md +1 -1
  366. package/frequent_questions/en/error-vite-env-only.md +77 -0
  367. package/frequent_questions/en-GB/SSR_Next_no_[locale].md +1 -1
  368. package/frequent_questions/en-GB/error-vite-env-only.md +77 -0
  369. package/frequent_questions/es/SSR_Next_no_[locale].md +1 -1
  370. package/frequent_questions/es/error-vite-env-only.md +76 -0
  371. package/frequent_questions/fr/SSR_Next_no_[locale].md +1 -1
  372. package/frequent_questions/fr/error-vite-env-only.md +77 -0
  373. package/frequent_questions/hi/SSR_Next_no_[locale].md +1 -1
  374. package/frequent_questions/hi/error-vite-env-only.md +77 -0
  375. package/frequent_questions/id/SSR_Next_no_[locale].md +1 -1
  376. package/frequent_questions/id/error-vite-env-only.md +77 -0
  377. package/frequent_questions/it/SSR_Next_no_[locale].md +1 -1
  378. package/frequent_questions/it/error-vite-env-only.md +77 -0
  379. package/frequent_questions/ja/SSR_Next_no_[locale].md +1 -1
  380. package/frequent_questions/ja/error-vite-env-only.md +77 -0
  381. package/frequent_questions/ko/SSR_Next_no_[locale].md +1 -1
  382. package/frequent_questions/ko/error-vite-env-only.md +77 -0
  383. package/frequent_questions/pl/SSR_Next_no_[locale].md +1 -1
  384. package/frequent_questions/pl/error-vite-env-only.md +77 -0
  385. package/frequent_questions/pt/SSR_Next_no_[locale].md +1 -1
  386. package/frequent_questions/pt/error-vite-env-only.md +77 -0
  387. package/frequent_questions/ru/SSR_Next_no_[locale].md +1 -1
  388. package/frequent_questions/ru/error-vite-env-only.md +77 -0
  389. package/frequent_questions/tr/SSR_Next_no_[locale].md +1 -1
  390. package/frequent_questions/tr/error-vite-env-only.md +77 -0
  391. package/frequent_questions/uk/SSR_Next_no_[locale].md +104 -0
  392. package/frequent_questions/uk/array_as_content_declaration.md +72 -0
  393. package/frequent_questions/uk/build_dictionaries.md +58 -0
  394. package/frequent_questions/uk/build_error_CI_CD.md +74 -0
  395. package/frequent_questions/uk/bun_set_up.md +53 -0
  396. package/frequent_questions/uk/customized_locale_list.md +64 -0
  397. package/frequent_questions/uk/domain_routing.md +113 -0
  398. package/frequent_questions/uk/error-vite-env-only.md +77 -0
  399. package/frequent_questions/uk/esbuild_error.md +29 -0
  400. package/frequent_questions/uk/get_locale_cookie.md +142 -0
  401. package/frequent_questions/uk/intlayer_command_undefined.md +155 -0
  402. package/frequent_questions/uk/locale_incorect_in_url.md +73 -0
  403. package/frequent_questions/uk/package_version_error.md +181 -0
  404. package/frequent_questions/uk/static_rendering.md +44 -0
  405. package/frequent_questions/uk/translated_path_url.md +55 -0
  406. package/frequent_questions/uk/unknown_command.md +97 -0
  407. package/frequent_questions/vi/SSR_Next_no_[locale].md +1 -1
  408. package/frequent_questions/vi/error-vite-env-only.md +77 -0
  409. package/frequent_questions/zh/SSR_Next_no_[locale].md +1 -1
  410. package/frequent_questions/zh/error-vite-env-only.md +77 -0
  411. package/legal/uk/privacy_notice.md +83 -0
  412. package/legal/uk/terms_of_service.md +55 -0
  413. package/package.json +6 -6
  414. package/src/generated/blog.entry.ts +29 -0
  415. package/src/generated/docs.entry.ts +119 -0
  416. package/src/generated/frequentQuestions.entry.ts +35 -0
  417. package/src/generated/legal.entry.ts +2 -0
@@ -0,0 +1,1151 @@
1
+ ---
2
+ createdAt: 2026-01-10
3
+ updatedAt: 2026-01-10
4
+ title: अपने Next.js 16 ऐप का अनुवाद कैसे करें (पृष्ठ पथ में [locale] के बिना) – i18n मार्गदर्शिका 2026
5
+ description: जानें कि अपने Next.js 16 वेबसाइट को पृष्ठ पथ में [locale] के बिना बहुभाषी कैसे बनाना है। अंतर्राष्ट्रीयकरण (i18n) और अनुवाद के लिए इस दस्तावेज़ का पालन करें।
6
+ keywords:
7
+ - अंतर्राष्ट्रीयकरण
8
+ - डॉक्यूमेंटेशन
9
+ - Intlayer
10
+ - Next.js 16
11
+ - JavaScript
12
+ - React
13
+ slugs:
14
+ - doc
15
+ - environment
16
+ - nextjs
17
+ - no-locale-path
18
+ applicationTemplate: https://github.com/aymericzip/intlayer-next-no-lolale-path-template
19
+ youtubeVideo: https://www.youtube.com/watch?v=e_PPG7PTqGU
20
+ history:
21
+ - version: 1.0.0
22
+ date: 2026-01-10
23
+ changes: प्रारंभिक रिलीज़
24
+ ---
25
+
26
+ # Intlayer का उपयोग करके अपने Next.js 16 वेबसाइट का अनुवाद (पृष्ठ पथ में [locale] के बिना) | अंतर्राष्ट्रीयकरण (i18n)
27
+
28
+ <Tab defaultTab="video">
29
+ <TabItem label="वीडियो" value="video">
30
+
31
+ <iframe title="Next.js के लिए सबसे अच्छा i18n समाधान? 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/e_PPG7PTqGU?autoplay=0&amp;origin=http://intlayer.org&amp;controls=0&amp;rel=1"/>
32
+
33
+ </TabItem>
34
+ <TabItem label="कोड" value="code">
35
+
36
+ <iframe
37
+ src="https://stackblitz.com/github/aymericzip/intlayer-next-16-no-locale-path-template?embed=1&ctl=1&file=intlayer.config.ts"
38
+ className="m-auto overflow-hidden rounded-lg border-0 max-md:size-full max-md:h-[700px] md:aspect-16/9 md:w-full"
39
+ title="Demo CodeSandbox - Intlayer का उपयोग करके अपने एप्लिकेशन को अंतर्राष्ट्रीयकृत कैसे करें"
40
+ sandbox="allow-forms allow-modals allow-popups allow-presentation allow-same-origin allow-scripts"
41
+ loading="lazy"
42
+ />
43
+
44
+ </TabItem>
45
+ </Tab>
46
+
47
+ GitHub पर [Application Template](https://github.com/aymericzip/intlayer-next-no-lolale-path-template) देखें।
48
+
49
+ ## सामग्री सूची
50
+
51
+ <TOC/>
52
+
53
+ ## Intlayer क्या है?
54
+
55
+ **Intlayer** एक नवोन्मेषी, ओपन-सोर्स इंटरनेशनलाइज़ेशन (i18n) लाइब्रेरी है, जो आधुनिक वेब ऐप्लिकेशंस में बहुभाषी समर्थन को सरल बनाने के लिए डिज़ाइन की गई है। Intlayer नवीनतम **Next.js 16** फ्रेमवर्क के साथ सहजता से एकीकृत होता है, जिसमें इसका शक्तिशाली **App Router** भी शामिल है। यह प्रभावी रेंडरिंग के लिए **Server Components** के साथ काम करने के लिए अनुकूलित है और [**Turbopack**](https://nextjs.org/docs/architecture/turbopack) के साथ पूरी तरह संगत है।
56
+
57
+ Intlayer के साथ, आप कर सकते हैं:
58
+
59
+ - **अनुवादों का प्रबंधन आसानी से करें** कम्पोनेंट स्तर पर घोषणात्मक शब्दकोशों का उपयोग करके।
60
+ - **मेटाडेटा, routes, और सामग्री को डायनामिक रूप से लोकलाइज़ करें**।
61
+ - **क्लाइंट-साइड और सर्वर-साइड दोनों कंपोनेंट्स में अनुवादों तक पहुँचें**।
62
+ - **ऑटोजेनरेटेड टाइप्स के साथ TypeScript समर्थन सुनिश्चित करें**, जिससे ऑटोकम्प्लीशन और त्रुटि पहचान बेहतर होती है।
63
+ - **उन्नत सुविधाओं का लाभ उठाएँ**, जैसे डायनेमिक locale का पता लगाना और स्विच करना।
64
+
65
+ > Intlayer Next.js 12, 13, 14, और 16 के साथ संगत है। यदि आप Next.js Page Router का उपयोग कर रहे हैं, तो आप इस [guide](https://github.com/aymericzip/intlayer/blob/main/docs/docs/hi/intlayer_with_nextjs_page_router.md) को देख सकते हैं। Next.js 12, 13, 14 के App Router के लिए, इस [guide](https://github.com/aymericzip/intlayer/blob/main/docs/docs/hi/intlayer_with_nextjs_14.md) को देखें।
66
+
67
+ ---
68
+
69
+ ## Next.js एप्लिकेशन में Intlayer सेटअप करने के चरण-दर-चरण मार्गदर्शन
70
+
71
+ ### चरण 1: Dependencies इंस्टॉल करें
72
+
73
+ आवश्यक पैकेज npm का उपयोग करके इंस्टॉल करें:
74
+
75
+ ```bash packageManager="npm"
76
+ npm install intlayer next-intlayer
77
+ npx intlayer init
78
+ ```
79
+
80
+ ```bash packageManager="pnpm"
81
+ pnpm add intlayer next-intlayer
82
+ pnpm intlayer init
83
+ ```
84
+
85
+ ```bash packageManager="yarn"
86
+ yarn add intlayer next-intlayer
87
+ yarn intlayer init
88
+ ```
89
+
90
+ ```bash packageManager="bun"
91
+ bun add intlayer next-intlayer
92
+ bunx intlayer init
93
+ ```
94
+
95
+ - **intlayer**
96
+
97
+ यह मुख्य पैकेज है जो कॉन्फ़िगरेशन प्रबंधन, अनुवाद, [सामग्री घोषणा](https://github.com/aymericzip/intlayer/blob/main/docs/docs/hi/dictionary/content_file.md), transpilation, और [CLI कमांड्स](https://github.com/aymericzip/intlayer/blob/main/docs/docs/hi/cli/index.md) के लिए internationalization उपकरण प्रदान करता है।
98
+
99
+ - **next-intlayer**
100
+
101
+ यह पैकेज Intlayer को Next.js के साथ एकीकृत करता है। यह Next.js इंटरनेशनलाइज़ेशन के लिए context providers और hooks प्रदान करता है। इसके अलावा, इसमें Next.js प्लगइन शामिल है जो Intlayer को [Webpack](https://webpack.js.org/) या [Turbopack](https://nextjs.org/docs/app/api-reference/turbopack) के साथ एकीकृत करता है, साथ ही उपयोगकर्ता की पसंदीदा locale का पता लगाने, कुकीज़ प्रबंधित करने और URL रीडायरेक्शन को संभालने के लिए एक proxy भी शामिल है।
102
+
103
+ ### चरण 2: अपने प्रोजेक्ट को कॉन्फ़िगर करें
104
+
105
+ यहाँ वह अंतिम संरचना है जो हम बनाएँगे:
106
+
107
+ ```bash
108
+ .
109
+ ├── src
110
+ │ ├── app
111
+ │ │ ├── layout.tsx
112
+ │ │ ├── page.content.ts
113
+ │ │ └── page.tsx
114
+ │ ├── components
115
+ │ │ ├── clientComponentExample
116
+ │ │ │ ├── client-component-example.content.ts
117
+ │ │ │ └── ClientComponentExample.tsx
118
+ │ │ ├── localeSwitcher
119
+ │ │ │ ├── localeSwitcher.content.ts
120
+ │ │ │ └── LocaleSwitcher.tsx
121
+ │ │ └── serverComponentExample
122
+ │ │ ├── server-component-example.content.ts
123
+ │ │ └── ServerComponentExample.tsx
124
+ │ └── proxy.ts
125
+ ├── intlayer.config.ts
126
+ ├── next.config.ts
127
+ ├── package.json
128
+ └── tsconfig.json
129
+ ```
130
+
131
+ > अगर आप locale routing नहीं चाहते हैं, तो intlayer को एक सरल provider / hook के रूप में उपयोग किया जा सकता है। अधिक जानकारी के लिए [इस गाइड](https://github.com/aymericzip/intlayer/blob/main/docs/docs/hi/intlayer_with_nextjs_no_locale_path.md) देखें।
132
+
133
+ अपने एप्लिकेशन की भाषाओं को कॉन्फ़िगर करने के लिए एक config फ़ाइल बनाएं:
134
+
135
+ ```typescript fileName="intlayer.config.ts" codeFormat="typescript"
136
+ import { Locales, type IntlayerConfig } from "intlayer";
137
+
138
+ const config: IntlayerConfig = {
139
+ internationalization: {
140
+ locales: [
141
+ Locales.ENGLISH,
142
+ Locales.FRENCH,
143
+ Locales.SPANISH,
144
+ // आपके अन्य locales
145
+ ],
146
+ defaultLocale: Locales.ENGLISH,
147
+ },
148
+ routing: {
149
+ mode: "search-params", // या `no-prefix` - middleware का पता लगाने के लिए उपयोगी
150
+ },
151
+ };
152
+
153
+ export default config;
154
+ ```
155
+
156
+ ```javascript fileName="intlayer.config.mjs" codeFormat="esm"
157
+ import { Locales } from "intlayer";
158
+
159
+ /** @type {import('intlayer').IntlayerConfig} */
160
+ const config = {
161
+ internationalization: {
162
+ locales: [
163
+ Locales.ENGLISH,
164
+ Locales.FRENCH,
165
+ Locales.SPANISH,
166
+ // आपके अन्य locales
167
+ ],
168
+ defaultLocale: Locales.ENGLISH,
169
+ },
170
+ routing: {
171
+ mode: "search-params", // या `no-prefix` - middleware का पता लगाने के लिए उपयोगी
172
+ },
173
+ };
174
+
175
+ export default config;
176
+ ```
177
+
178
+ ```javascript fileName="intlayer.config.cjs" codeFormat="commonjs"
179
+ const { Locales } = require("intlayer");
180
+
181
+ /** @type {import('intlayer').IntlayerConfig} */
182
+ const config = {
183
+ internationalization: {
184
+ locales: [
185
+ Locales.ENGLISH,
186
+ Locales.FRENCH,
187
+ Locales.SPANISH,
188
+ // आपके अन्य locales
189
+ ],
190
+ defaultLocale: Locales.ENGLISH,
191
+ },
192
+ routing: {
193
+ mode: "search-params", // या `no-prefix` - middleware का पता लगाने के लिए उपयोगी
194
+ },
195
+ };
196
+
197
+ module.exports = config;
198
+ ```
199
+
200
+ > इस कॉन्फ़िगरेशन फाइल के माध्यम से, आप localized URLs, proxy redirection, cookie नाम, अपनी सामग्री घोषणाओं का स्थान और एक्सटेंशन, कंसोल में Intlayer लॉग को अक्षम करना, और भी बहुत कुछ सेट कर सकते हैं। उपलब्ध पैरामीटरों की पूरी सूची के लिए, [कॉन्फ़िगरेशन दस्तावेज़](https://github.com/aymericzip/intlayer/blob/main/docs/docs/hi/configuration.md) देखें।
201
+
202
+ ### चरण 3: अपने Next.js कॉन्फ़िगरेशन में Intlayer को एकीकृत करें
203
+
204
+ अपने Next.js सेटअप को Intlayer का उपयोग करने के लिए कॉन्फ़िगर करें:
205
+
206
+ ```typescript fileName="next.config.ts" codeFormat="typescript"
207
+ import type { NextConfig } from "next";
208
+ import { withIntlayer } from "next-intlayer/server";
209
+
210
+ const nextConfig: NextConfig = {
211
+ /* कॉन्फ़िग विकल्प यहाँ */
212
+ };
213
+
214
+ export default withIntlayer(nextConfig);
215
+ ```
216
+
217
+ ```typescript fileName="next.config.mjs" codeFormat="esm"
218
+ import { withIntlayer } from "next-intlayer/server";
219
+
220
+ /** @type {import('next').NextConfig} */
221
+ const nextConfig = {
222
+ /* कॉन्फ़िग विकल्प यहाँ */
223
+ };
224
+
225
+ export default withIntlayer(nextConfig);
226
+ ```
227
+
228
+ ```typescript fileName="next.config.cjs" codeFormat="commonjs"
229
+ const { withIntlayer } = require("next-intlayer/server");
230
+
231
+ /** @type {import('next').NextConfig} */
232
+ const nextConfig = {
233
+ /* कॉन्फ़िग विकल्प यहाँ */
234
+ };
235
+
236
+ module.exports = withIntlayer(nextConfig);
237
+ ```
238
+
239
+ > `withIntlayer()` Next.js प्लगइन का उपयोग Intlayer को Next.js के साथ इंटीग्रेट करने के लिए किया जाता है। यह content declaration files के निर्माण को सुनिश्चित करता है और development मोड में उनका मॉनिटरिंग करता है। यह [Webpack](https://webpack.js.org/) या [Turbopack](https://nextjs.org/docs/app/api-reference/turbopack) वातावरण में Intlayer के environment variables को परिभाषित करता है। साथ ही यह performance को ऑप्टिमाइज़ करने के लिए aliases प्रदान करता है और server components के साथ संगतता सुनिश्चित करता है।
240
+ >
241
+ > `withIntlayer()` फ़ंक्शन एक promise फ़ंक्शन है। यह build शुरू होने से पहले Intlayer डिक्शनरीज़ को तैयार करने की अनुमति देता है। यदि आप इसे अन्य plugins के साथ उपयोग करना चाहते हैं, तो आप इसे await कर सकते हैं। उदाहरण:
242
+ >
243
+ > ```ts
244
+ > const nextConfig = await withIntlayer(nextConfig);
245
+ > const nextConfigWithOtherPlugins = withOtherPlugins(nextConfig);
246
+ >
247
+ > export default nextConfigWithOtherPlugins;
248
+ > ```
249
+ >
250
+ > यदि आप इसे synchronous तरीके से उपयोग करना चाहते हैं, तो आप `withIntlayerSync()` फ़ंक्शन का उपयोग कर सकते हैं। उदाहरण:
251
+ >
252
+ > ```ts
253
+ > const nextConfig = withIntlayerSync(nextConfig);
254
+ > const nextConfigWithOtherPlugins = withOtherPlugins(nextConfig);
255
+ >
256
+ > export default nextConfigWithOtherPlugins;
257
+ > ```
258
+ >
259
+ > Intlayer स्वचालित रूप से पहचानता है कि आपका प्रोजेक्ट **webpack** या **Turbopack** का उपयोग कर रहा है या नहीं — यह कमांड-लाइन फ्लैग `--webpack`, `--turbo`, या `--turbopack`, साथ ही आपकी वर्तमान **Next.js version** के आधार पर निर्धारित होता है।
260
+ >
261
+ > यदि `next>=16` है और आप **Rspack** का उपयोग कर रहे हैं, तो आपको स्पष्ट रूप से Intlayer को webpack कॉन्फ़िगरेशन उपयोग करने के लिए मजबूर करना होगा — इसके लिए Turbopack को अक्षम करें:
262
+ >
263
+ > ```ts
264
+ > withRspack(withIntlayer(nextConfig, { enableTurbopack: false }));
265
+ > ```
266
+
267
+ ### चरण 4: डायनामिक Locale रूट्स परिभाषित करें
268
+
269
+ `RootLayout` से सब कुछ हटाएँ और इसे निम्नलिखित कोड से बदलें:
270
+
271
+ ```tsx {3} fileName="src/app/layout.tsx" codeFormat="typescript"
272
+ import type { Metadata } from "next";
273
+ import type { ReactNode } from "react";
274
+ import "./globals.css";
275
+ import { IntlayerClientProvider, LocalPromiseParams } from "next-intlayer";
276
+ import { getHTMLTextDir, getIntlayer } from "intlayer";
277
+ import { getLocale } from "next-intlayer/server";
278
+ export { generateStaticParams } from "next-intlayer";
279
+
280
+ export const generateMetadata = async ({
281
+ params,
282
+ }: LocalPromiseParams): Promise<Metadata> => {
283
+ const { locale } = await params;
284
+ const { title, description, keywords } = getIntlayer("metadata", locale);
285
+
286
+ return {
287
+ title,
288
+ description,
289
+ keywords,
290
+ };
291
+ };
292
+
293
+ const RootLayout = async ({
294
+ children,
295
+ }: Readonly<{
296
+ children: ReactNode;
297
+ }>) => {
298
+ const locale = await getLocale();
299
+
300
+ return (
301
+ <html lang={locale} dir={getHTMLTextDir(locale)}>
302
+ <IntlayerClientProvider defaultLocale={locale}>
303
+ <body>{children}</body>
304
+ </IntlayerClientProvider>
305
+ </html>
306
+ );
307
+ };
308
+
309
+ export default RootLayout;
310
+ ```
311
+
312
+ ```jsx {3} fileName="src/app/layout.mjx" codeFormat="esm"
313
+ import "./globals.css";
314
+ import { IntlayerClientProvider } from "next-intlayer";
315
+ import { getHTMLTextDir, getIntlayer } from "intlayer";
316
+ import { getLocale } from "next-intlayer/server";
317
+ export { generateStaticParams } from "next-intlayer";
318
+
319
+ export const generateMetadata = async ({ params }) => {
320
+ const { locale } = await params;
321
+ const { title, description, keywords } = getIntlayer("metadata", locale);
322
+
323
+ return {
324
+ title,
325
+ description,
326
+ keywords,
327
+ };
328
+ };
329
+
330
+ const RootLayout = async ({ children }) => {
331
+ const locale = await getLocale();
332
+
333
+ return (
334
+ <html lang={locale} dir={getHTMLTextDir(locale)}>
335
+ <IntlayerClientProvider defaultLocale={locale}>
336
+ <body>{children}</body>
337
+ </IntlayerClientProvider>
338
+ </html>
339
+ );
340
+ };
341
+
342
+ export default RootLayout;
343
+ ```
344
+
345
+ ```jsx {1,8} fileName="src/app/layout.csx" codeFormat="commonjs"
346
+ require("./globals.css");
347
+ const { IntlayerClientProvider } = require("next-intlayer");
348
+ const { getHTMLTextDir, getIntlayer } = require("intlayer");
349
+ const { getLocale } = require("next-intlayer/server");
350
+ const { generateStaticParams } = require("next-intlayer");
351
+
352
+ const generateMetadata = async ({ params }) => {
353
+ const { locale } = await params;
354
+ const { title, description, keywords } = getIntlayer("metadata", locale);
355
+
356
+ return {
357
+ title,
358
+ description,
359
+ keywords,
360
+ };
361
+ };
362
+
363
+ const RootLayout = async ({ children }) => {
364
+ const locale = await getLocale();
365
+
366
+ return (
367
+ <html lang={locale} dir={getHTMLTextDir(locale)}>
368
+ <IntlayerClientProvider defaultLocale={locale}>
369
+ <body>{children}</body>
370
+ </IntlayerClientProvider>
371
+ </html>
372
+ );
373
+ };
374
+
375
+ module.exports = {
376
+ default: RootLayout,
377
+ generateStaticParams,
378
+ generateMetadata,
379
+ };
380
+ ```
381
+
382
+ ### चरण 5: अपनी सामग्री घोषित करें
383
+
384
+ अनुवाद संग्रहीत करने के लिए अपनी सामग्री घोषणाएँ बनाएं और प्रबंधित करें:
385
+
386
+ ```tsx fileName="src/app/metadata.content.ts" contentDeclarationFormat="typescript"
387
+ import { t, type Dictionary } from "intlayer";
388
+ import { Metadata } from "next";
389
+
390
+ const metadataContent = {
391
+ key: "metadata",
392
+ content: {
393
+ title: t({
394
+ hi: "मेरा प्रोजेक्ट शीर्षक",
395
+ en: "My Project Title",
396
+ fr: "Le Titre de mon Projet",
397
+ es: "El Título de mi Proyecto",
398
+ }),
399
+
400
+ description: t({
401
+ hi: "हमारा अभिनव प्लेटफ़ॉर्म खोजें जिसे आपके वर्कफ़्लो को सुव्यवस्थित करने और उत्पादकता बढ़ाने के लिए डिज़ाइन किया गया है।",
402
+ en: "Discover our innovative platform designed to streamline your workflow and boost productivity.",
403
+ fr: "Découvrez notre plateforme innovante conçue pour simplifier votre flux de travail et booster votre productivité.",
404
+ es: "Descubra nuestra plataforma innovadora diseñada para simplificar su flujo de trabajo y aumentar su productividad.",
405
+ }),
406
+
407
+ keywords: t({
408
+ hi: ["नवाचार", "उत्पादकता", "वर्कफ़्लो", "SaaS"],
409
+ en: ["innovation", "productivity", "workflow", "SaaS"],
410
+ hi: ["नवाचार", "उत्पादकता", "कार्यप्रवाह", "SaaS"],
411
+ fr: ["innovation", "productivité", "flux de travail", "SaaS"],
412
+ es: ["innovación", "productividad", "flujo de trabajo", "SaaS"],
413
+ }),
414
+ },
415
+ } as Dictionary<Metadata>;
416
+
417
+ export default metadataContent;
418
+ ```
419
+
420
+ ```tsx fileName="src/app/metadata.content.mjs" contentDeclarationFormat="typescript"
421
+ import { t, type Dictionary } from "intlayer";
422
+
423
+ /** @type {import('intlayer').Dictionary<import('next').Metadata>} */
424
+ const metadataContent = {
425
+ key: "metadata",
426
+ content: {
427
+ title: t({
428
+ hi: "मेरा प्रोजेक्ट शीर्षक",
429
+ en: "My Project Title",
430
+ fr: "Le Titre de mon Projet",
431
+ es: "El Título de mi Proyecto",
432
+ }),
433
+
434
+ description: t({
435
+ hi: "हमारे नवाचारी प्लेटफ़ॉर्म की खोज करें जो आपके कार्यप्रवाह को सुव्यवस्थित करने और उत्पादकता बढ़ाने के लिए डिज़ाइन किया गया है।",
436
+ en: "Discover our innovative platform designed to streamline your workflow and boost productivity.",
437
+ hi: "हमारा अभिनव प्लेटफ़ॉर्म खोजें जो आपके वर्कफ़्लो को सुव्यवस्थित करने और उत्पादकता बढ़ाने के लिए डिज़ाइन किया गया है।",
438
+ fr: "Découvrez notre plateforme innovante conçue pour simplifier votre flux de travail et booster votre productivité.",
439
+ es: "Descubra su plataforma innovadora diseñada para simplificar su flujo de trabajo y aumentar su productividad.",
440
+ }),
441
+
442
+ keywords: t({
443
+ hi: ["नवाचार", "उत्पादकता", "वर्कफ़्लो", "SaaS"],
444
+ en: ["innovation", "productivity", "workflow", "SaaS"],
445
+ fr: ["innovation", "productivité", "flux de travail", "SaaS"],
446
+ es: ["innovación", "productividad", "flujo de trabajo", "SaaS"],
447
+ }),
448
+ },
449
+ };
450
+
451
+ export default metadataContent;
452
+ ```
453
+
454
+ ```javascript fileName="src/app/metadata.content.cjs" contentDeclarationFormat="commonjs"
455
+ const { t } = require("intlayer");
456
+
457
+ /** @type {import('intlayer').Dictionary<import('next').Metadata>} */
458
+ const metadataContent = {
459
+ key: "metadata",
460
+ content: {
461
+ title: t({
462
+ hi: "मेरे प्रोजेक्ट का शीर्षक",
463
+ en: "My Project Title",
464
+ fr: "Le Titre de mon Projet",
465
+ es: "El Título de mi Proyecto",
466
+ }),
467
+
468
+ description: t({
469
+ hi: "हमारे अभिनव प्लेटफ़ॉर्म को खोजें, जिसे आपके वर्कफ़्लो को सुव्यवस्थित करने और उत्पादकता बढ़ाने के लिए डिज़ाइन किया गया है।",
470
+ en: "Discover our innovative platform designed to streamline your workflow and boost productivity.",
471
+ fr: "Découvrez notre plateforme innovante conçue pour simplifier votre flux de travail et booster votre productivité.",
472
+ es: "Descubra nuestra plataforma innovadora diseñada para simplificar su flujo de trabajo y aumentar su productividad.",
473
+ }),
474
+
475
+ keywords: t({
476
+ hi: ["नवप्रवर्तन", "उत्पादकता", "वर्कफ़्लो", "SaaS"],
477
+ en: ["innovation", "productivity", "workflow", "SaaS"],
478
+ fr: ["innovation", "productivité", "flux de travail", "SaaS"],
479
+ es: ["innovación", "productividad", "flujo de trabajo", "SaaS"],
480
+ }),
481
+ },
482
+ };
483
+
484
+ module.exports = metadataContent;
485
+ ```
486
+
487
+ ```json fileName="src/app/metadata.content.json" contentDeclarationFormat="json"
488
+ {
489
+ "key": "metadata",
490
+ "content": {
491
+ "title": {
492
+ "nodeType": "translation",
493
+ "translation": {
494
+ "hi": "मेरा प्रोजेक्ट शीर्षक",
495
+ "en": "My Project Title",
496
+ "fr": "Le Titre de mon Projet",
497
+ "es": "El Título de mi Proyecto"
498
+ }
499
+ },
500
+ "description": {
501
+ "nodeType": "translation",
502
+ "translation": {
503
+ "hi": "हमारे नवाचारी प्लेटफ़ॉर्म की खोज करें जो आपके वर्कफ़्लो को सरल बनाने और उत्पादकता बढ़ाने के लिए डिज़ाइन किया गया है।",
504
+ "en": "Discover our innovative platform designed to streamline your workflow and boost productivity.",
505
+ "fr": "Découvrez notre plateforme innovante conçue pour simplifier votre flux de travail et booster votre productivité.",
506
+ "es": "Descubra nuestra plataforma innovadora diseñada para simplificar su flujo de trabajo y aumentar su productividad."
507
+ }
508
+ },
509
+ "keywords": {
510
+ "nodeType": "translation",
511
+ "translation": {
512
+ "hi": ["नवाचार", "उत्पादकता", "कार्यप्रवाह", "SaaS"],
513
+ "en": ["innovation", "productivity", "workflow", "SaaS"],
514
+ "fr": ["innovation", "productivité", "flux de travail", "SaaS"],
515
+ "es": ["innovación", "productividad", "flujo de trabajo", "SaaS"]
516
+ }
517
+ }
518
+ }
519
+ }
520
+ ```
521
+
522
+ ```tsx fileName="src/app/page.content.ts" contentDeclarationFormat="typescript"
523
+ import { t, type Dictionary } from "intlayer";
524
+
525
+ const pageContent = {
526
+ key: "page",
527
+ content: {
528
+ getStarted: {
529
+ main: t({
530
+ hi: "संपादन करके शुरू करें",
531
+ en: "Get started by editing",
532
+ fr: "Commencez par éditer",
533
+ es: "Comience por editar",
534
+ }),
535
+ pageLink: "src/app/page.tsx",
536
+ },
537
+ },
538
+ } satisfies Dictionary;
539
+
540
+ export default pageContent;
541
+ ```
542
+
543
+ ```javascript fileName="src/app/page.content.mjs" contentDeclarationFormat="esm"
544
+ import { t } from "intlayer";
545
+
546
+ /** @type {import('intlayer').Dictionary} */
547
+ const pageContent = {
548
+ key: "page",
549
+ content: {
550
+ getStarted: {
551
+ main: t({
552
+ hi: "संपादन करके शुरू करें",
553
+ en: "Get started by editing",
554
+ fr: "Commencez par éditer",
555
+ es: "Comience por editar",
556
+ }),
557
+ pageLink: "src/app/page.tsx",
558
+ },
559
+ },
560
+ };
561
+
562
+ export default pageContent;
563
+ ```
564
+
565
+ ```javascript fileName="src/app/page.content.cjs" contentDeclarationFormat="commonjs"
566
+ const { t } = require("intlayer");
567
+
568
+ /** @type {import('intlayer').Dictionary} */
569
+ const pageContent = {
570
+ key: "page",
571
+ content: {
572
+ getStarted: {
573
+ main: t({
574
+ hi: "संपादन करके शुरू करें",
575
+ en: "Get started by editing",
576
+ fr: "Commencez par éditer",
577
+ hi: "संपादन करके शुरू करें",
578
+ es: "Comience por editar",
579
+ }),
580
+ pageLink: "src/app/page.tsx",
581
+ },
582
+ },
583
+ };
584
+
585
+ module.exports = pageContent;
586
+ ```
587
+
588
+ ```json fileName="src/app/page.content.json" contentDeclarationFormat="json"
589
+ {
590
+ "$schema": "https://intlayer.org/schema.json",
591
+ "key": "page",
592
+ "content": {
593
+ "getStarted": {
594
+ "nodeType": "translation",
595
+ "translation": {
596
+ "hi": "संपादन करके शुरू करें",
597
+ "en": "Get started by editing",
598
+ "fr": "Commencez par éditer",
599
+ "es": "Comience por editar"
600
+ }
601
+ },
602
+ "pageLink": "src/app/page.tsx"
603
+ }
604
+ }
605
+ ```
606
+
607
+ > आपकी content घोषणाएँ आपकी एप्लिकेशन में कहीं भी परिभाषित की जा सकती हैं, बशर्ते वे `contentDir` निर्देशिका (डिफ़ॉल्ट: `./src`) में शामिल हों। और content declaration फ़ाइल एक्सटेंशन से मेल खानी चाहिए (डिफ़ॉल्ट: `.content.{json,ts,tsx,js,jsx,mjs,mjx,cjs,cjx}`)।
608
+ >
609
+ > अधिक जानकारी के लिए, [content declaration दस्तावेज़](https://github.com/aymericzip/intlayer/blob/main/docs/docs/hi/dictionary/content_file.md) देखें।
610
+
611
+ ### चरण 6: अपने कोड में Content का उपयोग करें
612
+
613
+ अपने कंटेंट डिक्शनरीज़ को पूरे एप्लिकेशन में एक्सेस करें:
614
+
615
+ ```tsx fileName="src/app/page.tsx" codeFormat="typescript"
616
+ import type { FC } from "react";
617
+ import { ClientComponentExample } from "@components/clientComponentExample/ClientComponentExample";
618
+ import { ServerComponentExample } from "@components/serverComponentExample/ServerComponentExample";
619
+ import {
620
+ IntlayerServerProvider,
621
+ useIntlayer,
622
+ getLocale,
623
+ } from "next-intlayer/server";
624
+ import { NextPage } from "next";
625
+ import { headers, cookies } from "next/headers";
626
+
627
+ const PageContent: FC = () => {
628
+ const content = useIntlayer("page");
629
+
630
+ return (
631
+ <>
632
+ <p>{content.getStarted.main}</p>
633
+ <code>{content.getStarted.pageLink}</code>
634
+ </>
635
+ );
636
+ };
637
+
638
+ const Page: NextPage = async () => {
639
+ const locale = await getLocale();
640
+
641
+ return (
642
+ <IntlayerServerProvider locale={locale}>
643
+ <PageContent />
644
+ <ServerComponentExample />
645
+ <ClientComponentExample />
646
+ </IntlayerServerProvider>
647
+ );
648
+ };
649
+
650
+ export default Page;
651
+ ```
652
+
653
+ ```jsx fileName="src/app/page.mjx" codeFormat="esm"
654
+ import { ClientComponentExample } from "@components/clientComponentExample/ClientComponentExample";
655
+ import { ServerComponentExample } from "@components/serverComponentExample/ServerComponentExample";
656
+ import { IntlayerServerProvider, useIntlayer } from "next-intlayer/server";
657
+ import { getLocale } from "intlayer";
658
+ import { headers, cookies } from "next/headers";
659
+ import { NextPage } from "next";
660
+
661
+ const Page: NextPage = async () => {
662
+ const content = useIntlayer("page");
663
+
664
+ return (
665
+ <>
666
+ <p>{content.getStarted.main}</p>
667
+ <code>{content.getStarted.pageLink}</code>
668
+ </>
669
+ );
670
+ };
671
+
672
+ const Page = async () => {
673
+
674
+ const locale = await getLocale();
675
+
676
+ return (
677
+ <IntlayerServerProvider locale={locale}>
678
+ <PageContent />
679
+ <ServerComponentExample />
680
+ <ClientComponentExample />
681
+ </IntlayerServerProvider>
682
+ );
683
+ };
684
+
685
+ export default Page;
686
+ ```
687
+
688
+ ```jsx fileName="src/app/page.csx" codeFormat="commonjs"
689
+ import { ClientComponentExample } from "@components/clientComponentExample/ClientComponentExample";
690
+ import { ServerComponentExample } from "@components/serverComponentExample/ServerComponentExample";
691
+ import { IntlayerServerProvider, useIntlayer, getLocale } from "next-intlayer/server";
692
+ import { NextPage } from "next";
693
+ import { headers, cookies } from "next/headers";
694
+
695
+ const Page: NextPage = async () => {
696
+ const content = useIntlayer("page");
697
+
698
+ return (
699
+ <>
700
+ <p>{content.getStarted.main}</p>
701
+ <code>{content.getStarted.pageLink}</code>
702
+ </>
703
+ );
704
+ };
705
+
706
+ const Page: NextPage = async () => {
707
+ const locale = await getLocale();
708
+
709
+ return (
710
+ <IntlayerServerProvider locale={locale}>
711
+ <PageContent />
712
+ <ServerComponentExample />
713
+ <ClientComponentExample />
714
+ </IntlayerServerProvider>
715
+ );
716
+ };
717
+ ```
718
+
719
+ - **`IntlayerClientProvider`** क्लाइंट-साइड कॉम्पोनेंट्स को locale प्रदान करने के लिए उपयोग किया जाता है। इसे किसी भी पैरेंट कॉम्पोनेंट में रखा जा सकता है, जिसमें layout भी शामिल है। हालांकि, इसे layout में रखना अनुशंसित है क्योंकि Next.js पृष्ठों के बीच layout को साझा करता है, जिससे यह अधिक कुशल हो जाता है। layout में `IntlayerClientProvider` का उपयोग करने से आप इसे हर पृष्ठ के लिए फिर से इनिशियलाइज़ करने से बचते हैं, प्रदर्शन में सुधार होता है और आपके एप्लिकेशन में एक सुसंगत localization context बना रहता है।
720
+ - **`IntlayerServerProvider`** का उपयोग सर्वर चाइल्ड को locale प्रदान करने के लिए किया जाता है। इसे layout में सेट नहीं किया जा सकता।
721
+
722
+ > Layout और page एक सामान्य server context साझा नहीं कर सकते क्योंकि server context सिस्टम per-request data store (via [React's cache](https://react.dev/reference/react/cache) mechanism) पर आधारित है, जिससे एप्लिकेशन के अलग-अलग segments के लिए हर "context" पुनः बनाया जाता है। provider को किसी साझा layout में रखने से यह isolation टूट जाएगी, और आपके server components तक server context मानों का सही propagation असंभव हो जाएगा।
723
+
724
+ ```tsx {4,7} fileName="src/components/clientComponentExample/ClientComponentExample.tsx" codeFormat="typescript"
725
+ "use client";
726
+
727
+ import type { FC } from "react";
728
+ import { useIntlayer } from "next-intlayer";
729
+
730
+ export const ClientComponentExample: FC = () => {
731
+ const content = useIntlayer("client-component-example"); // संबंधित कंटेंट घोषणा बनाएं
732
+
733
+ return (
734
+ <div>
735
+ <h2>{content.title}</h2>
736
+ <p>{content.content}</p>
737
+ </div>
738
+ );
739
+ };
740
+ ```
741
+
742
+ ```jsx {3,6} fileName="src/components/clientComponentExample/ClientComponentExample.mjx" codeFormat="esm"
743
+ "use client";
744
+
745
+ import { useIntlayer } from "next-intlayer";
746
+
747
+ const ClientComponentExample = () => {
748
+ const content = useIntlayer("client-component-example"); // संबंधित कंटेंट घोषणा बनाएं
749
+
750
+ return (
751
+ <div>
752
+ <h2>{content.title}</h2>
753
+ <p>{content.content}</p>
754
+ </div>
755
+ );
756
+ };
757
+ ```
758
+
759
+ ```jsx {3,6} fileName="src/components/clientComponentExample/ClientComponentExample.csx" codeFormat="commonjs"
760
+ "use client";
761
+
762
+ const { useIntlayer } = require("next-intlayer");
763
+
764
+ const ClientComponentExample = () => {
765
+ const content = useIntlayer("client-component-example"); // संबंधित सामग्री घोषणा बनाएं
766
+
767
+ return (
768
+ <div>
769
+ <h2>{content.title}</h2>
770
+ <p>{content.content}</p>
771
+ </div>
772
+ );
773
+ };
774
+ ```
775
+
776
+ ```tsx {2} fileName="src/components/serverComponentExample/ServerComponentExample.tsx" codeFormat="typescript"
777
+ import type { FC } from "react";
778
+ import { useIntlayer } from "next-intlayer/server";
779
+
780
+ export const ServerComponentExample: FC = () => {
781
+ const content = useIntlayer("server-component-example"); // संबंधित सामग्री घोषणा बनाएं
782
+
783
+ return (
784
+ <div>
785
+ <h2>{content.title}</h2>
786
+ <p>{content.content}</p>
787
+ </div>
788
+ );
789
+ };
790
+ ```
791
+
792
+ ```jsx {1} fileName="src/components/serverComponentExample/ServerComponentExample.mjx" codeFormat="esm"
793
+ import { useIntlayer } from "next-intlayer/server";
794
+
795
+ const ServerComponentExample = () => {
796
+ const content = useIntlayer("server-component-example"); // संबंधित कंटेंट घोषणा बनाएँ
797
+
798
+ return (
799
+ <div>
800
+ <h2>{content.title}</h2>
801
+ <p>{content.content}</p>
802
+ </div>
803
+ );
804
+ };
805
+ ```
806
+
807
+ ```jsx {1} fileName="src/components/serverComponentExample/ServerComponentExample.csx" codeFormat="commonjs"
808
+ const { useIntlayer } = require("next-intlayer/server");
809
+
810
+ const ServerComponentExample = () => {
811
+ const content = useIntlayer("server-component-example"); // संबंधित कंटेंट घोषणा बनाएँ
812
+
813
+ return (
814
+ <div>
815
+ <h2>{content.title}</h2>
816
+ <p>{content.content}</p>
817
+ </div>
818
+ );
819
+ };
820
+ ```
821
+
822
+ > यदि आप अपनी सामग्री को `string` गुण में उपयोग करना चाहते हैं, जैसे `alt`, `title`, `href`, `aria-label`, आदि, तो आपको फ़ंक्शन के मान को कॉल करना होगा, उदाहरण के लिए:
823
+
824
+ > ```jsx
825
+ > <img src={content.image.src.value} alt={content.image.value} />
826
+ > ```
827
+
828
+ > `useIntlayer` हुक के बारे में अधिक जानने के लिए, [डॉक्यूमेंटेशन](https://github.com/aymericzip/intlayer/blob/main/docs/docs/hi/packages/next-intlayer/useIntlayer.md) देखें।
829
+
830
+ ### (वैकल्पिक) चरण 7: लोकल की पहचान के लिए प्रॉक्सी कॉन्फ़िगर करें
831
+
832
+ उपयोगकर्ता की पसंदीदा भाषा (locale) का पता लगाने के लिए प्रॉक्सी सेट करें:
833
+
834
+ ```typescript fileName="src/proxy.ts" codeFormat="typescript"
835
+ export { intlayerProxy as proxy } from "next-intlayer/proxy";
836
+
837
+ export const config = {
838
+ matcher:
839
+ "/((?!api|static|assets|robots|sitemap|sw|service-worker|manifest|.*\\..*|_next).*)",
840
+ };
841
+ ```
842
+
843
+ ```javascript fileName="src/proxy.mjs" codeFormat="esm"
844
+ export { intlayerProxy as proxy } from "next-intlayer/proxy";
845
+
846
+ export const config = {
847
+ matcher:
848
+ "/((?!api|static|assets|robots|sitemap|sw|service-worker|manifest|.*\\..*|_next).*)",
849
+ };
850
+ ```
851
+
852
+ ```javascript fileName="src/proxy.cjs" codeFormat="commonjs"
853
+ const { intlayerProxy } = require("next-intlayer/proxy");
854
+
855
+ const config = {
856
+ matcher:
857
+ "/((?!api|static|assets|robots|sitemap|sw|service-worker|manifest|.*\\..*|_next).*)",
858
+ };
859
+
860
+ module.exports = { proxy: intlayerProxy, config };
861
+ ```
862
+
863
+ > `intlayerProxy` का उपयोग उपयोगकर्ता की पसंदीदा locale का पता लगाने और उन्हें उस उपयुक्त URL पर रीडायरेक्ट करने के लिए किया जाता है जैसा कि [configuration](https://github.com/aymericzip/intlayer/blob/main/docs/docs/hi/configuration.md) में निर्दिष्ट है। इसके अतिरिक्त, यह उपयोगकर्ता की पसंदीदा locale को कुकी में सहेजने की सुविधा भी देता है।
864
+
865
+ > यदि आपको कई प्रॉक्सीज़ को श्रृंखलाबद्ध करना है (उदाहरण के लिए, प्रमाणीकरण या कस्टम प्रॉक्सी के साथ `intlayerProxy`), तो Intlayer अब `multipleProxies` नामक एक सहायक प्रदान करता है।
866
+
867
+ ```ts
868
+ import { multipleProxies, intlayerProxy } from "next-intlayer/proxy";
869
+ import { customProxy } from "@utils/customProxy";
870
+
871
+ export const proxy = multipleProxies([intlayerProxy, customProxy]);
872
+ ```
873
+
874
+ ### (वैकल्पिक) चरण 8: अपनी सामग्री की भाषा बदलें
875
+
876
+ Next.js में अपने कंटेंट की भाषा बदलने के लिए, सुझाई गई विधि यह है कि उपयोगकर्ताओं को उपयुक्त स्थानीयकृत पेज पर रीडायरेक्ट करने के लिए `Link` कंपोनेंट का उपयोग करें। `Link` कंपोनेंट पेज की प्रीफेचिंग सक्षम करता है, जिससे पूरा पेज रीलोड होने से बचता है।
877
+
878
+ ```tsx fileName="src/components/localeSwitcher/LocaleSwitcher.tsx" codeFormat="typescript"
879
+ "use client";
880
+
881
+ import type { FC } from "react";
882
+ import { Locales, getHTMLTextDir, getLocaleName } from "intlayer";
883
+ import { useLocale } from "next-intlayer";
884
+
885
+ export const LocaleSwitcher: FC = () => {
886
+ const { locale, availableLocales, setLocale } = useLocale({
887
+ onChange: () => window.location.reload(),
888
+ });
889
+
890
+ return (
891
+ <div>
892
+ <button popoverTarget="localePopover">{getLocaleName(locale)}</button>
893
+ <div id="localePopover" popover="auto">
894
+ {availableLocales.map((localeItem) => (
895
+ <button
896
+ key={localeItem}
897
+ aria-current={locale === localeItem ? "page" : undefined}
898
+ onClick={() => setLocale(localeItem)}
899
+ >
900
+ <span>
901
+ {/* Locale - उदाहरण: FR */}
902
+ {localeItem}
903
+ </span>
904
+ <span>
905
+ {/* Language in its own Locale - उदाहरण: Français */}
906
+ {getLocaleName(localeItem, locale)}
907
+ </span>
908
+ <span dir={getHTMLTextDir(localeItem)} lang={localeItem}>
909
+ {/* Language in current Locale - उदाहरण: Francés (वर्तमान Locale: Locales.SPANISH) */}
910
+ {getLocaleName(localeItem)}
911
+ </span>
912
+ <span dir="ltr" lang={Locales.ENGLISH}>
913
+ {/* अंग्रेज़ी में भाषा - उदाहरण: French */}
914
+ {getLocaleName(localeItem, Locales.ENGLISH)}
915
+ </span>
916
+ </button>
917
+ ))}
918
+ </div>
919
+ </div>
920
+ );
921
+ };
922
+ ```
923
+
924
+ ```jsx fileName="src/components/localeSwitcher/LocaleSwitcher.msx" codeFormat="esm"
925
+ "use client";
926
+
927
+ import { Locales, getHTMLTextDir, getLocaleName } from "intlayer";
928
+ import { useLocale } from "next-intlayer";
929
+
930
+ export const LocaleSwitcher = () => {
931
+ const { locale, availableLocales, setLocale } = useLocale({
932
+ onChange: () => window.location.reload(),
933
+ });
934
+
935
+ return (
936
+ <div>
937
+ <button popoverTarget="localePopover">{getLocaleName(locale)}</button>
938
+ <div id="localePopover" popover="auto">
939
+ {availableLocales.map((localeItem) => (
940
+ <button
941
+ key={localeItem}
942
+ aria-current={locale === localeItem ? "page" : undefined}
943
+ onClick={() => setLocale(localeItem)}
944
+ >
945
+ <span>
946
+ {/* लोकल - उदाहरण: FR */}
947
+ {localeItem}
948
+ </span>
949
+ <span>
950
+ {/* भाषा अपने ही लोकल में - उदाहरण: Français */}
951
+ {getLocaleName(localeItem, locale)}
952
+ </span>
953
+ <span dir={getHTMLTextDir(localeItem)} lang={localeItem}>
954
+ {/* वर्तमान लोकल में भाषा - उदाहरण: Francés जब वर्तमान लोकल Locales.SPANISH पर सेट हो */}
955
+ {getLocaleName(localeItem)}
956
+ </span>
957
+ <span dir="ltr" lang={Locales.ENGLISH}>
958
+ {/* अंग्रेजी में भाषा - उदाहरण: French */}
959
+ {getLocaleName(localeItem, Locales.ENGLISH)}
960
+ </span>
961
+ </button>
962
+ ))}
963
+ </div>
964
+ </div>
965
+ );
966
+ };
967
+ ```
968
+
969
+ ```jsx fileName="src/components/localeSwitcher/LocaleSwitcher.csx" codeFormat="commonjs"
970
+ "use client";
971
+
972
+ const { Locales, getHTMLTextDir, getLocaleName } = require("intlayer");
973
+ const { useLocale } = require("next-intlayer");
974
+
975
+ export const LocaleSwitcher = () => {
976
+ const path
977
+ const { locale availableLocales, setLocale } = useLocale({
978
+ onChange: ()=> window.location.reload(),
979
+ });
980
+
981
+ return (
982
+ <div>
983
+ <button popoverTarget="localePopover">{getLocaleName(locale)}</button>
984
+ <div id="localePopover" popover="auto">
985
+ {availableLocales.map((localeItem) => (
986
+ <button
987
+ key={localeItem}
988
+ aria-current={locale === localeItem ? "page" : undefined}
989
+ onClick={() => setLocale(localeItem)}
990
+ >
991
+ <span>
992
+ {/* लोकेल - उदाहरण: FR */}
993
+ {localeItem}
994
+ </span>
995
+ <span>
996
+ {/* अपनी लोकेल में भाषा - उदाहरण: Français */}
997
+ {getLocaleName(localeItem, locale)}
998
+ </span>
999
+ <span dir={getHTMLTextDir(localeItem)} lang={localeItem}>
1000
+ {/* वर्तमान लोकेल में भाषा - उदाहरण: Francés जब वर्तमान लोकेल Locales.SPANISH पर सेट हो */}
1001
+ {getLocaleName(localeItem)}
1002
+ </span>
1003
+ <span dir="ltr" lang={Locales.ENGLISH}>
1004
+ {/* अंग्रेजी में भाषा - उदाहरण: French */}
1005
+ {getLocaleName(localeItem, Locales.ENGLISH)}
1006
+ </span>
1007
+ </button>
1008
+ ))}
1009
+ </div>
1010
+ </div>
1011
+ );
1012
+ };
1013
+ ```
1014
+
1015
+ > एक वैकल्पिक तरीका है `useLocale` हुक द्वारा प्रदान किए गए `setLocale` फ़ंक्शन का उपयोग करना। यह फ़ंक्शन पेज को prefetch करने की अनुमति नहीं देगा। अधिक जानकारी के लिए [`useLocale` हुक दस्तावेज़](https://github.com/aymericzip/intlayer/blob/main/docs/docs/hi/packages/next-intlayer/useLocale.md) देखें।
1016
+
1017
+ > डॉक्यूमेंटेशन संदर्भ:
1018
+ >
1019
+ > - [`useLocale` हुक](https://github.com/aymericzip/intlayer/blob/main/docs/docs/hi/packages/next-intlayer/useLocale.md)
1020
+ > - [`getLocaleName` हुक](https://github.com/aymericzip/intlayer/blob/main/docs/docs/hi/packages/next-intlayer/getLocaleName.md)
1021
+ > - [`getLocalizedUrl` हुक](https://github.com/aymericzip/intlayer/blob/main/docs/docs/hi/packages/next-intlayer/getLocalizedUrl.md)
1022
+ > - [`getHTMLTextDir` hook](https://github.com/aymericzip/intlayer/blob/main/docs/docs/hi/packages/intlayer/getHTMLTextDir.md)
1023
+ > - [`hrefLang` attribute](https://developers.google.com/search/docs/specialty/international/localized-versions?hl=fr)
1024
+ > - [`lang` attribute](https://developer.mozilla.org/en-US/docs/Web/HTML/Global_attributes/lang)
1025
+ > - [`dir` attribute](https://developer.mozilla.org/en-US/docs/Web/HTML/Global_attributes/dir)
1026
+ > - [`aria-current` attribute](https://developer.mozilla.org/en-US/docs/Web/Accessibility/ARIA/Attributes/aria-current)
1027
+
1028
+ ### (वैकल्पिक) चरण 9: Server Actions में वर्तमान locale प्राप्त करें
1029
+
1030
+ यदि आपको Server Action के अंदर सक्रिय locale की आवश्यकता है (उदा., ईमेल लोकलाइज़ करने या locale-aware लॉजिक चलाने के लिए), तो `next-intlayer/server` से `getLocale` को कॉल करें:
1031
+
1032
+ ```tsx fileName="src/app/actions/getLocale.ts" codeFormat="typescript"
1033
+ "use server";
1034
+
1035
+ import { getLocale } from "next-intlayer/server";
1036
+
1037
+ export const myServerAction = async () => {
1038
+ const locale = await getLocale();
1039
+
1040
+ // locale के साथ कुछ करें
1041
+ };
1042
+ ```
1043
+
1044
+ > `getLocale` फ़ंक्शन उपयोगकर्ता की locale निर्धारित करने के लिए एक क्रमिक रणनीति का पालन करता है:
1045
+ >
1046
+ > 1. सबसे पहले, यह प्रॉक्सी द्वारा सेट किए गए संभव locale मान के लिए request headers की जाँच करता है
1047
+ > 2. अगर headers में कोई locale नहीं मिलता, तो यह cookies में संग्रहीत locale की तलाश करता है
1048
+ > 3. यदि कोई cookie नहीं मिलता, तो यह उपयोगकर्ता की पसंदीदा भाषा का पता लगाने का प्रयास करता है, जो उनके ब्राउज़र सेटिंग्स से ली जाती है
1049
+ > 4. अंततः, यह एप्लिकेशन में कॉन्फ़िगर किए गए डिफ़ॉल्ट locale पर लौट आता है
1050
+ >
1051
+ > यह सुनिश्चित करता है कि उपलब्ध संदर्भ के आधार पर सबसे उपयुक्त लोकल चुना जाए।
1052
+
1053
+ ### (वैकल्पिक) चरण 10: अपने बंडल आकार का अनुकूलन करें
1054
+
1055
+ जब आप `next-intlayer` का उपयोग करते हैं, तो डिक्शनरी डिफ़ॉल्ट रूप से हर पेज के बंडल में शामिल की जाती हैं। बंडल आकार को अनुकूलित करने के लिए, Intlayer एक वैकल्पिक SWC प्लगइन प्रदान करता है जो मैक्रो का उपयोग करके बुद्धिमत्ता से `useIntlayer` कॉल्स को बदल देता है। यह सुनिश्चित करता है कि डिक्शनरी केवल उन पेजों के बंडलों में शामिल हों जो वास्तव में उनका उपयोग करते हैं।
1056
+
1057
+ इस अनुकूलन को सक्षम करने के लिए, `@intlayer/swc` पैकेज इंस्टॉल करें। एक बार इंस्टॉल होने पर, `next-intlayer` स्वचालित रूप से प्लगइन का पता लगा कर उपयोग कर लेगा:
1058
+
1059
+ ```bash packageManager="npm"
1060
+ npm install @intlayer/swc --save-dev
1061
+ npx intlayer init
1062
+ ```
1063
+
1064
+ ```bash packageManager="pnpm"
1065
+ pnpm add @intlayer/swc --save-dev
1066
+ pnpm intlayer init
1067
+ ```
1068
+
1069
+ ```bash packageManager="yarn"
1070
+ yarn add @intlayer/swc --save-dev
1071
+ yarn intlayer init
1072
+ ```
1073
+
1074
+ ```bash packageManager="bun"
1075
+ bun add @intlayer/swc --dev
1076
+ bunx intlayer init
1077
+ ```
1078
+
1079
+ > नोट: यह अनुकूलन केवल Next.js 13 और उससे ऊपर के लिए उपलब्ध है।
1080
+
1081
+ > नोट: यह पैकेज डिफ़ॉल्ट रूप से स्थापित नहीं होता क्योंकि Next.js पर SWC प्लगइन्स अभी भी प्रायोगिक हैं। भविष्य में यह बदल सकता है।
1082
+
1083
+ > नोट: यदि आप विकल्प को `importMode: 'dynamic'` या `importMode: 'live'` के रूप में सेट करते हैं, तो यह Suspense पर निर्भर करेगा, इसलिए आपको अपने `useIntlayer` कॉल्स को एक `Suspense` बाउंड्री में रैप करना होगा। इसका मतलब है कि आप अपने Page / Layout कॉम्पोनेंट के शीर्ष स्तर पर सीधे `useIntlayer` का उपयोग नहीं कर पाएंगे।
1084
+
1085
+ ### Turbopack पर डिक्शनरी परिवर्तनों की निगरानी
1086
+
1087
+ जब आप Turbopack को अपने development server के रूप में `next dev` कमांड के साथ उपयोग करते हैं, तो dictionary में किए गए परिवर्तन डिफ़ॉल्ट रूप से स्वतः पहचान में नहीं आते।
1088
+
1089
+ यह सीमा इसलिए होती है क्योंकि Turbopack आपके content files में बदलावों की निगरानी करने के लिए webpack plugins को parallel रूप से नहीं चला सकता। इस समस्याओं का समाधान करने के लिए, आपको `intlayer watch` कमांड का उपयोग करना होगा ताकि development server और Intlayer build watcher दोनों एक ही समय पर चल सकें।
1090
+
1091
+ ```json5 fileName="package.json"
1092
+ {
1093
+ // ... Your existing package.json configurations
1094
+ "scripts": {
1095
+ // ... Your existing scripts configurations
1096
+ "dev": "intlayer watch --with 'next dev'",
1097
+ },
1098
+ }
1099
+ ```
1100
+
1101
+ > यदि आप next-intlayer@<=6.x.x का उपयोग कर रहे हैं, तो Next.js 16 ऐप्लिकेशन को Turbopack के साथ सही ढंग से कार्य करने के लिए `--turbopack` फ्लैग बनाए रखना आवश्यक है। इस सीमा से बचने के लिए हम next-intlayer@>=7.x.x का उपयोग करने की सलाह देते हैं।
1102
+
1103
+ ### TypeScript कॉन्फ़िगर करें
1104
+
1105
+ Intlayer TypeScript के फायदे उठाने और आपके कोडबेस को मजबूत बनाने के लिए module augmentation का उपयोग करता है।
1106
+
1107
+ ![ऑटोकम्प्लीशन](https://github.com/aymericzip/intlayer/blob/main/docs/assets/autocompletion.png?raw=true)
1108
+
1109
+ ![अनुवाद त्रुटि](https://github.com/aymericzip/intlayer/blob/main/docs/assets/translation_error.png?raw=true)
1110
+
1111
+ सुनिश्चित करें कि आपका TypeScript कॉन्फ़िगरेशन autogenerated types को शामिल करता है।
1112
+
1113
+ ```json5 fileName="tsconfig.json"
1114
+ {
1115
+ // ... आपके मौजूदा TypeScript कॉन्फ़िगरेशन
1116
+ "include": [
1117
+ // ... आपके मौजूदा TypeScript कॉन्फ़िगरेशन
1118
+ ".intlayer/**/*.ts", // स्वचालित रूप से जनरेट किए गए प्रकार शामिल करें
1119
+ ],
1120
+ }
1121
+ ```
1122
+
1123
+ ### Git कॉन्फ़िगरेशन
1124
+
1125
+ सुझाव दिया जाता है कि Intlayer द्वारा जनरेट की गई फाइलों को नज़रअंदाज़ किया जाए। इससे आप इन्हें अपने Git रिपॉज़िटरी में कमिट करने से बच सकते हैं।
1126
+
1127
+ इसके लिए, आप अपने `.gitignore` फ़ाइल में निम्न निर्देश जोड़ सकते हैं:
1128
+
1129
+ ```plaintext fileName=".gitignore"
1130
+ # Intlayer द्वारा जनरेट की गई फ़ाइलों को नज़रअंदाज़ करें
1131
+ .intlayer
1132
+ ```
1133
+
1134
+ ### VS Code एक्सटेंशन
1135
+
1136
+ Intlayer के साथ अपने डेवलपमेंट अनुभव को बेहतर बनाने के लिए, आप आधिकारिक **Intlayer VS Code Extension** स्थापित कर सकते हैं।
1137
+
1138
+ [Install from the VS Code Marketplace](https://marketplace.visualstudio.com/items?itemName=intlayer.intlayer-vs-code-extension)
1139
+
1140
+ यह एक्सटेंशन प्रदान करता है:
1141
+
1142
+ - **Autocompletion** अनुवाद कुंजियों के लिए।
1143
+ - गायब अनुवादों के लिए **Real-time error detection**।
1144
+ - **इनलाइन प्रीव्यू** अनुवादित सामग्री का पूर्वावलोकन।
1145
+ - **क्विक एक्शन्स** अनुवादों को आसानी से बनाने और अपडेट करने के लिए।
1146
+
1147
+ एक्सटेंशन का उपयोग कैसे करें, इस बारे में अधिक जानकारी के लिए, देखें [Intlayer VS Code Extension दस्तावेज़](https://intlayer.org/doc/vs-code-extension).
1148
+
1149
+ ### आगे बढ़ें
1150
+
1151
+ और आगे बढ़ने के लिए, आप [विज़ुअल एडिटर](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) का उपयोग करके अपनी सामग्री को externalize कर सकते हैं।