@intlayer/docs 7.5.9 → 7.5.11

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 (196) hide show
  1. package/README.md +9 -2
  2. package/dist/cjs/generated/docs.entry.cjs +57 -0
  3. package/dist/cjs/generated/docs.entry.cjs.map +1 -1
  4. package/dist/esm/generated/docs.entry.mjs +57 -0
  5. package/dist/esm/generated/docs.entry.mjs.map +1 -1
  6. package/dist/types/generated/docs.entry.d.ts +3 -0
  7. package/dist/types/generated/docs.entry.d.ts.map +1 -1
  8. package/docs/ar/cli/ci.md +137 -0
  9. package/docs/ar/cli/index.md +7 -1
  10. package/docs/ar/cli/list.md +39 -2
  11. package/docs/ar/cli/list_projects.md +131 -0
  12. package/docs/ar/cli/push.md +1 -1
  13. package/docs/ar/configuration.md +3 -3
  14. package/docs/ar/interest_of_intlayer.md +1 -1
  15. package/docs/ar/intlayer_CMS.md +25 -5
  16. package/docs/ar/intlayer_with_express.md +1 -0
  17. package/docs/ar/intlayer_with_fastify.md +516 -0
  18. package/docs/ar/readme.md +1 -1
  19. package/docs/de/cli/ci.md +137 -0
  20. package/docs/de/cli/index.md +7 -1
  21. package/docs/de/cli/list.md +39 -2
  22. package/docs/de/cli/list_projects.md +130 -0
  23. package/docs/de/cli/push.md +1 -1
  24. package/docs/de/configuration.md +3 -3
  25. package/docs/de/interest_of_intlayer.md +1 -1
  26. package/docs/de/intlayer_CMS.md +25 -5
  27. package/docs/de/intlayer_with_express.md +1 -0
  28. package/docs/de/intlayer_with_fastify.md +449 -0
  29. package/docs/de/readme.md +1 -1
  30. package/docs/en/cli/ci.md +137 -0
  31. package/docs/en/cli/index.md +14 -1
  32. package/docs/en/cli/list.md +39 -2
  33. package/docs/en/cli/list_projects.md +128 -0
  34. package/docs/en/cli/push.md +1 -1
  35. package/docs/en/configuration.md +3 -3
  36. package/docs/en/interest_of_intlayer.md +2 -2
  37. package/docs/en/intlayer_CMS.md +25 -5
  38. package/docs/en/intlayer_with_express.md +1 -0
  39. package/docs/en/intlayer_with_fastify.md +439 -0
  40. package/docs/en/readme.md +3 -1
  41. package/docs/en-GB/cli/ci.md +137 -0
  42. package/docs/en-GB/cli/index.md +7 -1
  43. package/docs/en-GB/cli/list.md +39 -2
  44. package/docs/en-GB/cli/list_projects.md +130 -0
  45. package/docs/en-GB/cli/push.md +1 -1
  46. package/docs/en-GB/configuration.md +3 -3
  47. package/docs/en-GB/interest_of_intlayer.md +1 -1
  48. package/docs/en-GB/intlayer_CMS.md +25 -5
  49. package/docs/en-GB/intlayer_with_express.md +1 -0
  50. package/docs/en-GB/intlayer_with_fastify.md +445 -0
  51. package/docs/en-GB/readme.md +3 -1
  52. package/docs/es/cli/ci.md +137 -0
  53. package/docs/es/cli/index.md +7 -1
  54. package/docs/es/cli/list.md +39 -2
  55. package/docs/es/cli/list_projects.md +130 -0
  56. package/docs/es/cli/push.md +1 -1
  57. package/docs/es/configuration.md +3 -3
  58. package/docs/es/interest_of_intlayer.md +1 -1
  59. package/docs/es/intlayer_CMS.md +25 -5
  60. package/docs/es/intlayer_with_express.md +1 -0
  61. package/docs/es/intlayer_with_fastify.md +480 -0
  62. package/docs/es/readme.md +1 -1
  63. package/docs/fr/cli/ci.md +137 -0
  64. package/docs/fr/cli/index.md +7 -1
  65. package/docs/fr/cli/list.md +39 -2
  66. package/docs/fr/cli/list_projects.md +131 -0
  67. package/docs/fr/cli/push.md +1 -1
  68. package/docs/fr/configuration.md +3 -3
  69. package/docs/fr/interest_of_intlayer.md +1 -1
  70. package/docs/fr/intlayer_CMS.md +25 -5
  71. package/docs/fr/intlayer_with_express.md +1 -0
  72. package/docs/fr/intlayer_with_fastify.md +439 -0
  73. package/docs/fr/readme.md +1 -1
  74. package/docs/hi/cli/ci.md +137 -0
  75. package/docs/hi/cli/index.md +7 -1
  76. package/docs/hi/cli/list.md +38 -1
  77. package/docs/hi/cli/list_projects.md +130 -0
  78. package/docs/hi/cli/push.md +1 -1
  79. package/docs/hi/configuration.md +3 -3
  80. package/docs/hi/interest_of_intlayer.md +1 -1
  81. package/docs/hi/intlayer_CMS.md +25 -5
  82. package/docs/hi/intlayer_with_express.md +1 -0
  83. package/docs/hi/intlayer_with_fastify.md +540 -0
  84. package/docs/hi/readme.md +1 -1
  85. package/docs/id/cli/ci.md +137 -0
  86. package/docs/id/cli/index.md +7 -1
  87. package/docs/id/cli/list.md +38 -1
  88. package/docs/id/cli/list_projects.md +128 -0
  89. package/docs/id/cli/push.md +1 -1
  90. package/docs/id/configuration.md +3 -3
  91. package/docs/id/interest_of_intlayer.md +1 -1
  92. package/docs/id/intlayer_CMS.md +25 -5
  93. package/docs/id/intlayer_with_express.md +1 -0
  94. package/docs/id/intlayer_with_fastify.md +470 -0
  95. package/docs/id/readme.md +1 -1
  96. package/docs/it/cli/ci.md +137 -0
  97. package/docs/it/cli/index.md +7 -1
  98. package/docs/it/cli/list.md +39 -2
  99. package/docs/it/cli/list_projects.md +130 -0
  100. package/docs/it/cli/push.md +1 -1
  101. package/docs/it/configuration.md +3 -3
  102. package/docs/it/interest_of_intlayer.md +1 -1
  103. package/docs/it/intlayer_CMS.md +25 -5
  104. package/docs/it/intlayer_with_express.md +1 -0
  105. package/docs/it/intlayer_with_fastify.md +445 -0
  106. package/docs/it/readme.md +1 -1
  107. package/docs/ja/cli/ci.md +137 -0
  108. package/docs/ja/cli/index.md +7 -1
  109. package/docs/ja/cli/list.md +38 -1
  110. package/docs/ja/cli/list_projects.md +136 -0
  111. package/docs/ja/cli/push.md +1 -1
  112. package/docs/ja/configuration.md +3 -3
  113. package/docs/ja/interest_of_intlayer.md +1 -1
  114. package/docs/ja/intlayer_CMS.md +25 -5
  115. package/docs/ja/intlayer_with_express.md +1 -0
  116. package/docs/ja/intlayer_with_fastify.md +516 -0
  117. package/docs/ja/readme.md +1 -1
  118. package/docs/ko/cli/ci.md +137 -0
  119. package/docs/ko/cli/index.md +7 -1
  120. package/docs/ko/cli/list.md +38 -1
  121. package/docs/ko/cli/list_projects.md +128 -0
  122. package/docs/ko/cli/push.md +1 -1
  123. package/docs/ko/configuration.md +3 -3
  124. package/docs/ko/interest_of_intlayer.md +1 -1
  125. package/docs/ko/intlayer_CMS.md +25 -5
  126. package/docs/ko/intlayer_with_express.md +1 -0
  127. package/docs/ko/intlayer_with_fastify.md +463 -0
  128. package/docs/ko/readme.md +1 -1
  129. package/docs/pl/cli/ci.md +137 -0
  130. package/docs/pl/cli/index.md +7 -1
  131. package/docs/pl/cli/list.md +39 -2
  132. package/docs/pl/cli/list_projects.md +130 -0
  133. package/docs/pl/cli/push.md +1 -1
  134. package/docs/pl/configuration.md +3 -3
  135. package/docs/pl/interest_of_intlayer.md +1 -1
  136. package/docs/pl/intlayer_CMS.md +25 -5
  137. package/docs/pl/intlayer_with_express.md +1 -0
  138. package/docs/pl/intlayer_with_fastify.md +457 -0
  139. package/docs/pl/readme.md +1 -1
  140. package/docs/pt/cli/ci.md +137 -0
  141. package/docs/pt/cli/index.md +7 -1
  142. package/docs/pt/cli/list.md +39 -2
  143. package/docs/pt/cli/list_projects.md +134 -0
  144. package/docs/pt/cli/push.md +1 -1
  145. package/docs/pt/configuration.md +3 -3
  146. package/docs/pt/interest_of_intlayer.md +1 -1
  147. package/docs/pt/intlayer_CMS.md +25 -5
  148. package/docs/pt/intlayer_with_express.md +1 -0
  149. package/docs/pt/intlayer_with_fastify.md +502 -0
  150. package/docs/pt/readme.md +1 -1
  151. package/docs/ru/cli/ci.md +137 -0
  152. package/docs/ru/cli/index.md +7 -1
  153. package/docs/ru/cli/list.md +39 -2
  154. package/docs/ru/cli/list_projects.md +130 -0
  155. package/docs/ru/cli/push.md +1 -1
  156. package/docs/ru/configuration.md +3 -3
  157. package/docs/ru/interest_of_intlayer.md +1 -1
  158. package/docs/ru/intlayer_CMS.md +25 -5
  159. package/docs/ru/intlayer_with_express.md +1 -0
  160. package/docs/ru/intlayer_with_fastify.md +468 -0
  161. package/docs/ru/readme.md +1 -1
  162. package/docs/tr/cli/ci.md +137 -0
  163. package/docs/tr/cli/index.md +7 -1
  164. package/docs/tr/cli/list.md +39 -2
  165. package/docs/tr/cli/list_projects.md +134 -0
  166. package/docs/tr/cli/push.md +1 -1
  167. package/docs/tr/configuration.md +3 -3
  168. package/docs/tr/interest_of_intlayer.md +1 -1
  169. package/docs/tr/intlayer_CMS.md +25 -5
  170. package/docs/tr/intlayer_with_express.md +1 -0
  171. package/docs/tr/intlayer_with_fastify.md +471 -0
  172. package/docs/tr/readme.md +1 -1
  173. package/docs/vi/cli/ci.md +137 -0
  174. package/docs/vi/cli/index.md +7 -1
  175. package/docs/vi/cli/list.md +38 -1
  176. package/docs/vi/cli/list_projects.md +130 -0
  177. package/docs/vi/cli/push.md +1 -1
  178. package/docs/vi/configuration.md +3 -3
  179. package/docs/vi/interest_of_intlayer.md +1 -1
  180. package/docs/vi/intlayer_CMS.md +25 -5
  181. package/docs/vi/intlayer_with_express.md +1 -0
  182. package/docs/vi/intlayer_with_fastify.md +490 -0
  183. package/docs/vi/readme.md +1 -1
  184. package/docs/zh/cli/ci.md +137 -0
  185. package/docs/zh/cli/index.md +7 -1
  186. package/docs/zh/cli/list.md +38 -1
  187. package/docs/zh/cli/list_projects.md +130 -0
  188. package/docs/zh/cli/push.md +1 -1
  189. package/docs/zh/configuration.md +3 -3
  190. package/docs/zh/interest_of_intlayer.md +1 -1
  191. package/docs/zh/intlayer_CMS.md +25 -5
  192. package/docs/zh/intlayer_with_express.md +1 -0
  193. package/docs/zh/intlayer_with_fastify.md +451 -0
  194. package/docs/zh/readme.md +1 -1
  195. package/package.json +6 -6
  196. package/src/generated/docs.entry.ts +57 -0
@@ -0,0 +1,540 @@
1
+ ---
2
+ createdAt: 2025-12-30
3
+ updatedAt: 2025-12-30
4
+ title: अपने Fastify बैकएंड का अनुवाद कैसे करें – i18n गाइड 2026
5
+ description: जानिए कि कैसे अपने Fastify बैकएंड को बहुभाषी बनाएं। अंतरराष्ट्रीयकरण (i18n) और अनुवाद करने के लिए दस्तावेज़ का पालन करें।
6
+ keywords:
7
+ - Internationalization
8
+ - Documentation
9
+ - Intlayer
10
+ - Fastify
11
+ - JavaScript
12
+ - Backend
13
+ slugs:
14
+ - doc
15
+ - environment
16
+ - fastify
17
+ applicationTemplate: https://github.com/aymericzip/intlayer-fastify-template
18
+ history:
19
+ - version: 7.6.0
20
+ date: 2025-12-31
21
+ changes: init कमांड जोड़ें
22
+ - version: 7.6.0
23
+ date: 2025-12-31
24
+ changes: इतिहास आरंभ करें
25
+ ---
26
+
27
+ # Intlayer का उपयोग करके अपने Fastify बैकएंड वेबसाइट का अनुवाद करें | Internationalization (i18n)
28
+
29
+ `fastify-intlayer` एक शक्तिशाली internationalization (i18n) प्लगइन है जो Fastify एप्लिकेशनों के लिए बनाया गया है, और यह क्लाइंट की प्राथमिकताओं के आधार पर स्थानीयकृत प्रतिक्रियाएँ प्रदान करके आपके backend सेवाओं को वैश्विक रूप से सुलभ बनाता है।
30
+
31
+ ### व्यावहारिक उपयोग के मामले
32
+
33
+ - **बैकएंड त्रुटियों को उपयोगकर्ता की भाषा में दिखाना**: जब कोई त्रुटि होती है, संदेशों को उपयोगकर्ता की मातृभाषा में दिखाने से समझ बेहतर होती है और असंतोष कम होता है। यह विशेष रूप से उन dynamic error messages के लिए उपयोगी है जिन्हें front-end components जैसे toasts या modals में दिखाया जा सकता है।
34
+ - **बहुभाषी सामग्री प्राप्त करना**: उन एप्लिकेशनों के लिए जो डेटाबेस से सामग्री खींचती हैं, internationalization यह सुनिश्चित करता है कि आप इस सामग्री को कई भाषाओं में परोस सकें। यह उन प्लेटफ़ॉर्म्स के लिए महत्वपूर्ण है जैसे e-commerce साइट्स या content management systems जिन्हें उत्पाद विवरण, लेख, और अन्य सामग्री उपयोगकर्ता की पसंदीदा भाषा में दिखाने की आवश्यकता होती है।
35
+ - **बहुभाषी ईमेल भेजना**: चाहे वह transactional emails हों, marketing campaigns हों, या notifications हों, प्राप्तकर्ता की भाषा में ईमेल भेजना engagement और प्रभावशीलता को महत्वपूर्ण रूप से बढ़ा सकता है।
36
+ - **बहुभाषी पुश सूचनाएँ**: मोबाइल एप्लिकेशनों के लिए, उपयोगकर्ता की पसंदीदा भाषा में पुश सूचनाएँ भेजना इंटरैक्शन और रिटेंशन बढ़ा सकता है। यह व्यक्तिगत स्पर्श सूचनाओं को अधिक प्रासंगिक और कार्रवाई योग्य महसूस करा सकता है।
37
+ - **अन्य संचार**: बैकएंड से किसी भी प्रकार का संचार, जैसे SMS संदेश, सिस्टम अलर्ट, या यूजर इंटरफेस अपडेट, उपयोगकर्ता की भाषा में होने पर स्पष्टता सुनिश्चित करता है और समग्र उपयोगकर्ता अनुभव को बेहतर बनाता है।
38
+
39
+ बैकएंड को अंतरराष्ट्रीयकरण करने से आपका एप्लिकेशन न केवल सांस्कृतिक भिन्नताओं का सम्मान करता है बल्कि वैश्विक बाजार की जरूरतों के साथ बेहतर ढंग से संरेखित होता है, जिससे आपकी सेवाओं को विश्व स्तर पर स्केल करने में यह एक महत्वपूर्ण कदम बन जाता है।
40
+
41
+ ## आरंभ करना
42
+
43
+ ### इंस्टॉलेशन
44
+
45
+ `fastify-intlayer` का उपयोग शुरू करने के लिए, npm का उपयोग करके पैकेज इंस्टॉल करें:
46
+
47
+ ```bash packageManager="npm"
48
+ npm install intlayer fastify-intlayer
49
+ npx intlayer init
50
+
51
+ ```
52
+
53
+ ```bash packageManager="pnpm"
54
+ pnpm add intlayer fastify-intlayer
55
+ pnpm intlayer init
56
+
57
+ ```
58
+
59
+ ```bash packageManager="yarn"
60
+ yarn add intlayer fastify-intlayer
61
+ yarn intlayer init
62
+
63
+ ```
64
+
65
+ ```bash packageManager="bun"
66
+ bun add intlayer fastify-intlayer
67
+ bunx intlayer init
68
+
69
+ ```
70
+
71
+ ### सेटअप
72
+
73
+ अपने प्रोजेक्ट रूट में `intlayer.config.ts` फ़ाइल बनाकर अंतरराष्ट्रीयकरण सेटिंग्स कॉन्फ़िगर करें:
74
+
75
+ ```typescript fileName="intlayer.config.ts" codeFormat="typescript"
76
+ import { Locales, type IntlayerConfig } from "intlayer";
77
+
78
+ const config: IntlayerConfig = {
79
+ internationalization: {
80
+ locales: [
81
+ Locales.ENGLISH,
82
+ Locales.FRENCH,
83
+ Locales.SPANISH_MEXICO,
84
+ Locales.SPANISH_SPAIN,
85
+ ],
86
+ defaultLocale: Locales.ENGLISH,
87
+ },
88
+ };
89
+
90
+ export default config;
91
+ ```
92
+
93
+ ```javascript fileName="intlayer.config.mjs" codeFormat="esm"
94
+ import { Locales } from "intlayer";
95
+
96
+ /** @type {import('intlayer').IntlayerConfig} */
97
+ const config = {
98
+ internationalization: {
99
+ locales: [
100
+ Locales.ENGLISH,
101
+ Locales.FRENCH,
102
+ Locales.SPANISH_MEXICO,
103
+ Locales.SPANISH_SPAIN,
104
+ ],
105
+ defaultLocale: Locales.ENGLISH,
106
+ },
107
+ };
108
+
109
+ export default config;
110
+ ```
111
+
112
+ ```javascript fileName="intlayer.config.cjs" codeFormat="commonjs"
113
+ const { Locales } = require("intlayer");
114
+
115
+ /** @type {import('intlayer').IntlayerConfig} */
116
+ const config = {
117
+ internationalization: {
118
+ locales: [
119
+ Locales.ENGLISH,
120
+ Locales.FRENCH,
121
+ Locales.SPANISH_MEXICO,
122
+ Locales.SPANISH_SPAIN,
123
+ ],
124
+ defaultLocale: Locales.ENGLISH,
125
+ },
126
+ };
127
+
128
+ export default config;
129
+ ```
130
+
131
+ ```javascript fileName="intlayer.config.mjs" codeFormat="esm"
132
+ import { Locales } from "intlayer";
133
+
134
+ /** @type {import('intlayer').IntlayerConfig} */
135
+ const config = {
136
+ internationalization: {
137
+ locales: [
138
+ Locales.ENGLISH,
139
+ Locales.FRENCH,
140
+ Locales.SPANISH_MEXICO,
141
+ Locales.SPANISH_SPAIN,
142
+ ],
143
+ defaultLocale: Locales.ENGLISH,
144
+ },
145
+ };
146
+
147
+ export default config;
148
+ ```
149
+
150
+ ```javascript fileName="intlayer.config.cjs" codeFormat="commonjs"
151
+ const { Locales } = require("intlayer");
152
+
153
+ /** @type {import('intlayer').IntlayerConfig} */
154
+ const config = {
155
+ internationalization: {
156
+ locales: [
157
+ Locales.ENGLISH,
158
+ Locales.FRENCH,
159
+ Locales.SPANISH_MEXICO,
160
+ Locales.SPANISH_SPAIN,
161
+ ],
162
+ defaultLocale: Locales.ENGLISH,
163
+ },
164
+ };
165
+
166
+ module.exports = config;
167
+ ```
168
+
169
+ ### अपना कंटेंट घोषित करें
170
+
171
+ अनुवाद संग्रहीत करने के लिए अपनी कंटेंट घोषणाएँ बनाएं और प्रबंधित करें:
172
+
173
+ ```typescript fileName="src/index.content.ts" contentDeclarationFormat="typescript"
174
+ import { t, type Dictionary } from "intlayer";
175
+
176
+ const indexContent = {
177
+ key: "index",
178
+ content: {
179
+ exampleOfContent: t({
180
+ hi: "अंग्रेज़ी में लौटाए गए कंटेंट का उदाहरण",
181
+ en: "Example of returned content in English",
182
+ fr: "Exemple de contenu renvoyé en français",
183
+ "es-ES": "Ejemplo de contenido devuelto en español (España)",
184
+ "es-MX": "Ejemplo de contenido devuelto en español (México)",
185
+ }),
186
+ },
187
+ } satisfies Dictionary;
188
+
189
+ export default indexContent;
190
+ ```
191
+
192
+ ```javascript fileName="src/index.content.mjs" contentDeclarationFormat="esm"
193
+ import { t } from "intlayer";
194
+
195
+ /* इस ऑब्जेक्ट का प्रकार import('intlayer').Dictionary है */
196
+ /** @type {import('intlayer').Dictionary} */
197
+ const indexContent = {
198
+ key: "index",
199
+ content: {
200
+ exampleOfContent: t({
201
+ hi: "लौटाई गई सामग्री का उदाहरण (अंग्रेज़ी)",
202
+ en: "Example of returned content in English",
203
+ fr: "Exemple de contenu renvoyé en français",
204
+ "es-ES": "Ejemplo de contenido devuelto en español (España)",
205
+ "es-MX": "Ejemplo de contenido devuelto en español (México)",
206
+ }),
207
+ },
208
+ };
209
+
210
+ export default indexContent;
211
+ ```
212
+
213
+ ```javascript fileName="src/index.content.cjs" contentDeclarationFormat="commonjs"
214
+ /* इस ऑब्जेक्ट का प्रकार import('intlayer').Dictionary है */
215
+ const { t } = require("intlayer");
216
+
217
+ /** @type {import('intlayer').Dictionary} */
218
+ const indexContent = {
219
+ key: "index",
220
+ content: {
221
+ exampleOfContent: t({
222
+ hi: "लौटाई गई सामग्री का उदाहरण (अंग्रेज़ी)",
223
+ en: "Example of returned content in English",
224
+ fr: "Exemple de contenu renvoyé en français",
225
+ "es-ES": "Ejemplo de contenido devuelto en español (España)",
226
+ "es-MX": "Ejemplo de contenido devuelto en español (México)",
227
+ }),
228
+ },
229
+ };
230
+
231
+ module.exports = indexContent;
232
+ ```
233
+
234
+ ```json fileName="src/index.content.json" contentDeclarationFormat="json"
235
+ {
236
+ "$schema": "https://intlayer.org/schema.json",
237
+ "key": "index",
238
+ "content": {
239
+ "exampleOfContent": {
240
+ "nodeType": "translation",
241
+ "translation": {
242
+ "hi": "अंग्रेज़ी में लौटाए गए कंटेंट का उदाहरण",
243
+ "en": "Example of returned content in English",
244
+ "fr": "Exemple de contenu renvoyé en français",
245
+ "es-ES": "Ejemplo de contenido devuelto en español (España)",
246
+ "es-MX": "Ejemplo de contenido devuelto en español (México)"
247
+ }
248
+ }
249
+ }
250
+ }
251
+ ```
252
+
253
+ > आपकी कंटेंट घोषणाएँ आपकी एप्लिकेशन में कहीं भी परिभाषित की जा सकती हैं बशर्ते वे `contentDir` निर्देशिका में शामिल हों (डिफ़ॉल्ट रूप से, `./src`)। और यह कंटेंट घोषणा फ़ाइल एक्सटेंशन से मेल खानी चाहिए (डिफ़ॉल्ट रूप से, `.content.{json,ts,tsx,js,jsx,mjs,mjx,cjs,cjx}`)।
254
+
255
+ > अधिक जानकारी के लिए, [कंटेंट घोषणा दस्तावेज़](https://github.com/aymericzip/intlayer/blob/main/docs/docs/hi/dictionary/content_file.md) देखें।
256
+
257
+ ### Fastify एप्लिकेशन सेटअप
258
+
259
+ अपने Fastify एप्लिकेशन को `fastify-intlayer` इस्तेमाल करने के लिए सेटअप करें:
260
+
261
+ ```typescript fileName="src/index.ts" codeFormat="typescript"
262
+ import Fastify from "fastify";
263
+ import { intlayer, t, getDictionary, getIntlayer } from "fastify-intlayer";
264
+ import dictionaryExample from "./index.content";
265
+
266
+ const fastify = Fastify({ logger: true });
267
+
268
+ // अंतरराष्ट्रीयकरण प्लगइन लोड करें
269
+ await fastify.register(intlayer);
270
+
271
+ // रूट्स
272
+ fastify.get("/t_example", async (_req, reply) => {
273
+ return t({
274
+ hi: "लौटाई गई सामग्री का उदाहरण (अंग्रेज़ी)",
275
+ en: "Example of returned content in English",
276
+ fr: "Exemple de contenu renvoyé en français",
277
+ "es-ES": "Ejemplo de contenido devuelto en español (España)",
278
+ "es-MX": "Ejemplo de contenido devuelto en español (México)",
279
+ });
280
+ });
281
+
282
+ fastify.get("/getIntlayer_example", async (_req, reply) => {
283
+ return getIntlayer("index").exampleOfContent;
284
+ });
285
+
286
+ fastify.get("/getDictionary_example", async (_req, reply) => {
287
+ return getDictionary(dictionaryExample).exampleOfContent;
288
+ });
289
+
290
+ // सर्वर शुरू करें
291
+ const start = async () => {
292
+ try {
293
+ await fastify.listen({ port: 3000 });
294
+ } catch (err) {
295
+ fastify.log.error(err);
296
+ process.exit(1);
297
+ }
298
+ };
299
+
300
+ start();
301
+ ```
302
+
303
+ ```javascript fileName="src/index.mjs" codeFormat="esm"
304
+ import Fastify from "fastify";
305
+ import { intlayer, t, getDictionary, getIntlayer } from "fastify-intlayer";
306
+ import dictionaryExample from "./index.content";
307
+
308
+ const fastify = Fastify({ logger: true });
309
+
310
+ // internationalization प्लगइन लोड करें
311
+ await fastify.register(intlayer);
312
+
313
+ // रूट्स
314
+ fastify.get("/t_example", async (_req, reply) => {
315
+ return t({
316
+ hi: "अंग्रेज़ी में लौटाए गए कंटेंट का उदाहरण",
317
+ en: "Example of returned content in English",
318
+ fr: "Exemple de contenu renvoyé en français",
319
+ "es-ES": "Ejemplo de contenido devuelto en español (España)",
320
+ "es-MX": "Ejemplo de contenido devuelto en español (México)",
321
+ });
322
+ });
323
+
324
+ fastify.get("/getIntlayer_example", async (_req, reply) => {
325
+ return getIntlayer("index").exampleOfContent;
326
+ });
327
+
328
+ fastify.get("/getDictionary_example", async (_req, reply) => {
329
+ return getDictionary(dictionaryExample).exampleOfContent;
330
+ });
331
+
332
+ // सर्वर आरंभ करें
333
+ const start = async () => {
334
+ try {
335
+ await fastify.listen({ port: 3000 });
336
+ } catch (err) {
337
+ fastify.log.error(err);
338
+ process.exit(1);
339
+ }
340
+ };
341
+
342
+ start();
343
+ ```
344
+
345
+ ```javascript fileName="src/index.cjs" codeFormat="commonjs"
346
+ const Fastify = require("fastify");
347
+ const { intlayer, t, getDictionary, getIntlayer } = require("fastify-intlayer");
348
+ const dictionaryExample = require("./index.content");
349
+
350
+ const fastify = Fastify({ logger: true });
351
+
352
+ // async/await के लिए सर्वर स्टार्ट रैपर
353
+ const start = async () => {
354
+ try {
355
+ // अंतरराष्ट्रीयकरण प्लगइन लोड करें
356
+ await fastify.register(intlayer);
357
+
358
+ // रूट्स
359
+ fastify.get("/t_example", async (_req, reply) => {
360
+ return t({
361
+ hi: "वापस की गई सामग्री का उदाहरण (अंग्रेज़ी में)",
362
+ en: "Example of returned content in English",
363
+ fr: "Exemple de contenu renvoyé en français",
364
+ "es-ES": "Ejemplo de contenido devuelto en español (España)",
365
+ "es-MX": "Ejemplo de contenido devuelto en español (México)",
366
+ });
367
+ });
368
+
369
+ fastify.get("/getIntlayer_example", async (_req, reply) => {
370
+ return getIntlayer("index").exampleOfContent;
371
+ });
372
+
373
+ fastify.get("/getDictionary_example", async (_req, reply) => {
374
+ return getDictionary(dictionaryExample).exampleOfContent;
375
+ });
376
+
377
+ await fastify.listen({ port: 3000 });
378
+ } catch (err) {
379
+ fastify.log.error(err);
380
+ process.exit(1);
381
+ }
382
+ };
383
+
384
+ start();
385
+ ```
386
+
387
+ ### संगतता
388
+
389
+ `fastify-intlayer` पूरी तरह से संगत है:
390
+
391
+ - [`react-intlayer`](<https://www.google.com/search?q=%5Bhttps://github.com/aymericzip/intlayer/blob/main/docs/docs/hi/packages/react-intlayer/index.md%5D(https://github.com/aymericzip/intlayer/blob/main/docs/docs/hi/packages/react-intlayer/index.md)>) React अनुप्रयोगों के लिए
392
+ - [`next-intlayer`](<https://www.google.com/search?q=%5Bhttps://github.com/aymericzip/intlayer/blob/main/docs/docs/hi/packages/next-intlayer/index.md%5D(https://github.com/aymericzip/intlayer/blob/main/docs/docs/hi/packages/next-intlayer/index.md)>) Next.js अनुप्रयोगों के लिए
393
+
394
+ /// [`react-intlayer`](<https://www.google.com/search?q=%5Bhttps://github.com/aymericzip/intlayer/blob/main/docs/docs/hi/packages/react-intlayer/index.md%5D(https://github.com/aymericzip/intlayer/blob/main/docs/docs/hi/packages/react-intlayer/index.md)>) React एप्लिकेशन के लिए
395
+
396
+ - [`next-intlayer`](<https://www.google.com/search?q=%5Bhttps://github.com/aymericzip/intlayer/blob/main/docs/docs/hi/packages/next-intlayer/index.md%5D(https://github.com/aymericzip/intlayer/blob/main/docs/docs/hi/packages/next-intlayer/index.md)>) Next.js एप्लिकेशन के लिए
397
+ - [`vite-intlayer`](<https://www.google.com/search?q=%5Bhttps://github.com/aymericzip/intlayer/blob/main/docs/docs/hi/packages/vite-intlayer/index.md%5D(https://github.com/aymericzip/intlayer/blob/main/docs/docs/hi/packages/vite-intlayer/index.md)>) Vite अनुप्रयोगों के लिए
398
+
399
+ यह किसी भी internationalization समाधान के साथ विभिन्न वातावरणों में—ब्राउज़र और API अनुरोधों सहित—सहज रूप से काम करता है। आप middleware को हेडर या कुकीज़ के माध्यम से locale का पता लगाने के लिए अनुकूलित कर सकते हैं:
400
+
401
+ ```typescript fileName="intlayer.config.ts" codeFormat="typescript"
402
+ import { Locales, type IntlayerConfig } from "intlayer";
403
+
404
+ const config: IntlayerConfig = {
405
+ // ... अन्य कॉन्फ़िगरेशन विकल्प
406
+ middleware: {
407
+ headerName: "my-locale-header",
408
+ cookieName: "my-locale-cookie",
409
+ },
410
+ };
411
+
412
+ export default config;
413
+ ```
414
+
415
+ ```javascript fileName="intlayer.config.mjs" codeFormat="esm"
416
+ import { Locales } from "intlayer";
417
+
418
+ /** @type {import('intlayer').IntlayerConfig} */
419
+ const config = {
420
+ // ... अन्य कॉन्फ़िगरेशन विकल्प
421
+ middleware: {
422
+ headerName: "my-locale-header",
423
+ cookieName: "my-locale-cookie",
424
+ },
425
+ };
426
+
427
+ export default config;
428
+ ```
429
+
430
+ ```javascript fileName="intlayer.config.cjs" codeFormat="commonjs"
431
+ const { Locales } = require("intlayer");
432
+
433
+ /** @type {import('intlayer').IntlayerConfig} */
434
+ const config = {
435
+ // ... अन्य कॉन्फ़िगरेशन विकल्प
436
+ middleware: {
437
+ headerName: "my-locale-header",
438
+ cookieName: "my-locale-cookie",
439
+ },
440
+ };
441
+
442
+ module.exports = config;
443
+ ```
444
+
445
+ डिफ़ॉल्ट रूप से, `fastify-intlayer` क्लाइंट की प्राथमिक भाषा निर्धारित करने के लिए `Accept-Language` हेडर की व्याख्या करेगा।
446
+
447
+ ```javascript fileName="intlayer.config.mjs" codeFormat="esm"
448
+ import { Locales } from "intlayer";
449
+
450
+ /** @type {import('intlayer').IntlayerConfig} */
451
+ const config = {
452
+ // ... अन्य कॉन्फ़िगरेशन विकल्प
453
+ middleware: {
454
+ headerName: "my-locale-header",
455
+ cookieName: "my-locale-cookie",
456
+ },
457
+ };
458
+
459
+ export default config;
460
+ ```
461
+
462
+ ```javascript fileName="intlayer.config.cjs" codeFormat="commonjs"
463
+ const { Locales } = require("intlayer");
464
+
465
+ /** @type {import('intlayer').IntlayerConfig} */
466
+ const config = {
467
+ // ... अन्य कॉन्फ़िगरेशन विकल्प
468
+ middleware: {
469
+ headerName: "my-locale-header",
470
+ cookieName: "my-locale-cookie",
471
+ },
472
+ };
473
+
474
+ module.exports = config;
475
+ ```
476
+
477
+ डिफ़ॉल्ट रूप से, `fastify-intlayer` क्लाइंट की पसंदीदा भाषा निर्धारित करने के लिए `Accept-Language` हेडर की व्याख्या करेगा।
478
+
479
+ > कॉन्फ़िगरेशन और उन्नत विषयों पर अधिक जानकारी के लिए, हमारी [डॉक्यूमेंटेशन](https://github.com/aymericzip/intlayer/blob/main/docs/docs/hi/configuration.md) देखें।
480
+
481
+ ### TypeScript को कॉन्फ़िगर करें
482
+
483
+ `fastify-intlayer` अंतरराष्ट्रीयकरण प्रक्रिया को बेहतर बनाने के लिए TypeScript की मजबूत क्षमताओं का उपयोग करता है। TypeScript की static typing यह सुनिश्चित करती है कि हर अनुवाद कुंजी शामिल हो, जिससे गायब अनुवादों का जोखिम कम होता है और मेंटेनबिलिटी सुधरती है।
484
+
485
+ सुनिश्चित करें कि ऑटो-जेनरेट किए गए टाइप्स (डिफ़ॉल्ट रूप से ./types/intlayer.d.ts पर) आपकी tsconfig.json फ़ाइल में शामिल किए गए हैं।
486
+
487
+ ```json5 fileName="tsconfig.json"
488
+ {
489
+ // ... आपका मौजूदा TypeScript कॉन्फ़िगरेशन
490
+ "include": [
491
+ // ... आपका मौजूदा TypeScript कॉन्फ़िगरेशन
492
+ ".intlayer/**/*.ts", // ऑटो-जनरेटेड टाइप्स को शामिल करें
493
+ ],
494
+ }
495
+ ```
496
+
497
+ ### VS Code एक्सटेंशन
498
+
499
+ Intlayer के साथ अपने विकास अनुभव को बेहतर बनाने के लिए, आप आधिकारिक **Intlayer VS Code Extension** को इंस्टॉल कर सकते हैं।
500
+
501
+ [VS Code Marketplace से इंस्टॉल करें](https://marketplace.visualstudio.com/items?itemName=intlayer.intlayer-vs-code-extension)
502
+
503
+ यह एक्सटेंशन प्रदान करता है:
504
+
505
+ - अनुवाद कुंजियों के लिए **Autocompletion**।
506
+ - ग़ायब अनुवादों के लिए **Real-time error detection**।
507
+ - अनुवादित सामग्री के **Inline previews**।
508
+ - अनुवादों को आसानी से बनाने और अपडेट करने के लिए **Quick actions**।
509
+
510
+ एक्सटेंशन का उपयोग कैसे करें, इसके बारे में अधिक जानकारी के लिए देखें: [Intlayer VS Code Extension प्रलेखन](https://intlayer.org/doc/vs-code-extension).
511
+
512
+ ### Git कॉन्फ़िगरेशन
513
+
514
+ सिफारिश की जाती है कि Intlayer द्वारा जनरेट की गई फाइलों को ignore किया जाए। इससे आप उन्हें अपने Git रिपॉज़िटरी में commit करने से बच सकते हैं।
515
+
516
+ ### VS Code एक्सटेंशन
517
+
518
+ Intlayer के साथ अपने डेवलपमेंट अनुभव को बेहतर बनाने के लिए, आप आधिकारिक **Intlayer VS Code Extension** इंस्टॉल कर सकते हैं।
519
+
520
+ [VS Code Marketplace से इंस्टॉल करें](https://marketplace.visualstudio.com/items?itemName=intlayer.intlayer-vs-code-extension)
521
+
522
+ यह एक्सटेंशन प्रदान करता है:
523
+
524
+ - **Autocompletion**: अनुवाद कुंजियों के लिए स्वत: सुझाव।
525
+ - **Real-time error detection**: गायब अनुवादों के लिए वास्तविक समय में त्रुटि पहचान।
526
+ - **Inline previews**: अनुवादित सामग्री का इनलाइन पूर्वावलोकन।
527
+ - **Quick actions**: अनुवाद को आसानी से बनाने और अपडेट करने के लिए त्वरित क्रियाएं।
528
+
529
+ एक्सटेंशन का उपयोग कैसे करें इस पर अधिक जानकारी के लिए, देखें [Intlayer VS Code Extension documentation](https://intlayer.org/doc/vs-code-extension).
530
+
531
+ ### Git कॉन्फ़िगरेशन
532
+
533
+ सुझाव दिया जाता है कि Intlayer द्वारा उत्पन्न फ़ाइलों को ignore किया जाए। इससे आप उन्हें अपने Git रिपॉज़िटरी में commit करने से बच सकते हैं।
534
+
535
+ इसके लिए, आप अपनी `.gitignore` फ़ाइल में निम्न निर्देश जोड़ सकते हैं:
536
+
537
+ ```plaintext fileName=".gitignore"
538
+ # Intlayer द्वारा उत्पन्न फ़ाइलों को अनदेखा करें
539
+ .intlayer
540
+ ```
package/docs/hi/readme.md CHANGED
@@ -50,7 +50,7 @@ Intlayer एक **आधुनिक i18n समाधान** है वेब
50
50
  | विशेषता | विवरण |
51
51
  | --------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
52
52
  | <img src="https://github.com/aymericzip/intlayer/blob/main/docs/assets/frameworks.png?raw=true" alt="Feature" width="700"> | **क्रॉस-फ्रेमवर्क समर्थन**<br><br>Intlayer सभी प्रमुख फ्रेमवर्क और लाइब्रेरी के साथ संगत है, जिनमें Next.js, React, Vite, Vue.js, Nuxt, Preact, Express, और अन्य शामिल हैं। |
53
- | <img src="https://github.com/aymericzip/intlayer/blob/main/docs/assets/javascript_content_management.png?raw=true" alt="Feature" width="700"> | **जावास्क्रिप्ट-संचालित सामग्री प्रबंधन**<br><br>अपने कंटेंट को प्रभावी ढंग से परिभाषित और प्रबंधित करने के लिए जावास्क्रिप्ट की लचीलापन का उपयोग करें। <br><br> - [सामग्री घोषणा](https://intlayer.org/doc/concept/content) |
53
+ | <img src="https://github.com/aymericzip/intlayer/blob/main/docs/assets/javascript_content_management.jpg?raw=true" alt="Feature" width="700"> | **जावास्क्रिप्ट-संचालित सामग्री प्रबंधन**<br><br>अपने कंटेंट को प्रभावी ढंग से परिभाषित और प्रबंधित करने के लिए जावास्क्रिप्ट की लचीलापन का उपयोग करें। <br><br> - [सामग्री घोषणा](https://intlayer.org/doc/concept/content) |
54
54
  | <img src="https://github.com/aymericzip/intlayer/blob/main/docs/assets/per_locale_content_declaration_file.png?raw=true" alt="Feature" width="700"> | **प्रति-स्थान सामग्री घोषणा फ़ाइल**<br><br>स्वचालित जनरेशन से पहले अपनी सामग्री को एक बार घोषित करके अपने विकास को तेज़ करें।<br><br> - [प्रति-स्थान सामग्री घोषणा फ़ाइल](https://intlayer.org/doc/concept/per-locale-file) |
55
55
  | <img src="https://github.com/aymericzip/intlayer/blob/main/docs/assets/autocompletion.png?raw=true" alt="Feature" width="700"> | **टाइप-सेफ वातावरण**<br><br>TypeScript का उपयोग करें ताकि आपकी सामग्री परिभाषाएँ और कोड त्रुटि-मुक्त हों, साथ ही IDE ऑटोकम्प्लीशन का लाभ भी प्राप्त करें।<br><br> - [TypeScript कॉन्फ़िगरेशन](https://intlayer.org/doc/environment/vite-and-react#configure-typescript) |
56
56
  | <img src="https://github.com/aymericzip/intlayer/blob/main/docs/assets/config_file.png?raw=true" alt="Feature" width="700"> | **सरल सेटअप**<br><br>न्यूनतम कॉन्फ़िगरेशन के साथ जल्दी से शुरू करें। अंतरराष्ट्रीयकरण, रूटिंग, AI, बिल्ड, और सामग्री प्रबंधन के लिए सेटिंग्स को आसानी से समायोजित करें। <br><br> - [Next.js एकीकरण का अन्वेषण करें](https://intlayer.org/doc/environment/nextjs) |