@intlayer/docs 7.0.4-canary.0 → 7.0.5

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 (107) hide show
  1. package/blog/ar/intlayer_with_i18next.md +68 -106
  2. package/blog/ar/intlayer_with_next-i18next.md +84 -288
  3. package/blog/ar/intlayer_with_next-intl.md +58 -337
  4. package/blog/ar/intlayer_with_react-i18next.md +68 -290
  5. package/blog/ar/intlayer_with_react-intl.md +63 -266
  6. package/blog/de/intlayer_with_i18next.md +77 -97
  7. package/blog/de/intlayer_with_next-i18next.md +69 -296
  8. package/blog/de/intlayer_with_next-intl.md +59 -340
  9. package/blog/de/intlayer_with_react-i18next.md +68 -290
  10. package/blog/de/intlayer_with_react-intl.md +62 -264
  11. package/blog/en/intlayer_with_i18next.md +36 -1638
  12. package/blog/en/intlayer_with_next-i18next.md +22 -847
  13. package/blog/en/intlayer_with_next-intl.md +32 -1053
  14. package/blog/en/intlayer_with_react-i18next.md +38 -764
  15. package/blog/en/intlayer_with_react-intl.md +42 -1018
  16. package/blog/en-GB/intlayer_with_i18next.md +67 -103
  17. package/blog/en-GB/intlayer_with_next-i18next.md +71 -292
  18. package/blog/en-GB/intlayer_with_next-intl.md +58 -337
  19. package/blog/en-GB/intlayer_with_react-i18next.md +67 -289
  20. package/blog/en-GB/intlayer_with_react-intl.md +61 -264
  21. package/blog/es/intlayer_with_i18next.md +67 -103
  22. package/blog/es/intlayer_with_next-i18next.md +71 -296
  23. package/blog/es/intlayer_with_next-intl.md +57 -338
  24. package/blog/es/intlayer_with_react-i18next.md +68 -290
  25. package/blog/es/intlayer_with_react-intl.md +62 -265
  26. package/blog/fr/intlayer_with_i18next.md +66 -104
  27. package/blog/fr/intlayer_with_next-i18next.md +82 -285
  28. package/blog/fr/intlayer_with_next-intl.md +57 -338
  29. package/blog/fr/intlayer_with_react-i18next.md +67 -289
  30. package/blog/fr/intlayer_with_react-intl.md +61 -264
  31. package/blog/hi/intlayer_with_i18next.md +68 -104
  32. package/blog/hi/intlayer_with_next-i18next.md +74 -299
  33. package/blog/hi/intlayer_with_next-intl.md +57 -239
  34. package/blog/hi/intlayer_with_react-i18next.md +69 -291
  35. package/blog/hi/intlayer_with_react-intl.md +65 -268
  36. package/blog/id/intlayer_with_i18next.md +126 -0
  37. package/blog/id/intlayer_with_next-i18next.md +142 -0
  38. package/blog/id/intlayer_with_next-intl.md +113 -0
  39. package/blog/id/intlayer_with_react-i18next.md +124 -0
  40. package/blog/id/intlayer_with_react-intl.md +122 -0
  41. package/blog/it/intlayer_with_i18next.md +67 -103
  42. package/blog/it/intlayer_with_next-i18next.md +71 -296
  43. package/blog/it/intlayer_with_next-intl.md +57 -338
  44. package/blog/it/intlayer_with_react-i18next.md +68 -290
  45. package/blog/it/intlayer_with_react-intl.md +62 -265
  46. package/blog/ja/intlayer_with_i18next.md +68 -103
  47. package/blog/ja/intlayer_with_next-i18next.md +85 -283
  48. package/blog/ja/intlayer_with_next-intl.md +58 -336
  49. package/blog/ja/intlayer_with_react-i18next.md +68 -290
  50. package/blog/ja/intlayer_with_react-intl.md +62 -264
  51. package/blog/ko/intlayer_with_i18next.md +80 -96
  52. package/blog/ko/intlayer_with_next-i18next.md +85 -287
  53. package/blog/ko/intlayer_with_next-intl.md +68 -327
  54. package/blog/ko/intlayer_with_react-i18next.md +68 -290
  55. package/blog/ko/intlayer_with_react-intl.md +64 -266
  56. package/blog/pl/intlayer_with_i18next.md +126 -0
  57. package/blog/pl/intlayer_with_next-i18next.md +142 -0
  58. package/blog/pl/intlayer_with_next-intl.md +111 -0
  59. package/blog/pl/intlayer_with_react-i18next.md +124 -0
  60. package/blog/pl/intlayer_with_react-intl.md +122 -0
  61. package/blog/pt/intlayer_with_i18next.md +67 -103
  62. package/blog/pt/intlayer_with_next-i18next.md +72 -293
  63. package/blog/pt/intlayer_with_next-intl.md +57 -256
  64. package/blog/pt/intlayer_with_react-i18next.md +104 -78
  65. package/blog/pt/intlayer_with_react-intl.md +62 -266
  66. package/blog/ru/intlayer_with_i18next.md +66 -104
  67. package/blog/ru/intlayer_with_next-i18next.md +71 -296
  68. package/blog/ru/intlayer_with_next-intl.md +58 -337
  69. package/blog/ru/intlayer_with_react-i18next.md +68 -290
  70. package/blog/ru/intlayer_with_react-intl.md +62 -265
  71. package/blog/tr/intlayer_with_i18next.md +71 -107
  72. package/blog/tr/intlayer_with_next-i18next.md +72 -297
  73. package/blog/tr/intlayer_with_next-intl.md +58 -339
  74. package/blog/tr/intlayer_with_react-i18next.md +69 -291
  75. package/blog/tr/intlayer_with_react-intl.md +63 -285
  76. package/blog/vi/intlayer_with_i18next.md +126 -0
  77. package/blog/vi/intlayer_with_next-i18next.md +142 -0
  78. package/blog/vi/intlayer_with_next-intl.md +111 -0
  79. package/blog/vi/intlayer_with_react-i18next.md +124 -0
  80. package/blog/vi/intlayer_with_react-intl.md +122 -0
  81. package/blog/zh/intlayer_with_i18next.md +67 -102
  82. package/blog/zh/intlayer_with_next-i18next.md +72 -296
  83. package/blog/zh/intlayer_with_next-intl.md +58 -336
  84. package/blog/zh/intlayer_with_react-i18next.md +68 -290
  85. package/blog/zh/intlayer_with_react-intl.md +63 -106
  86. package/docs/ar/plugins/sync-json.md +244 -0
  87. package/docs/de/plugins/sync-json.md +244 -0
  88. package/docs/en/intlayer_cli.md +25 -0
  89. package/docs/en/intlayer_with_nextjs_14.md +2 -0
  90. package/docs/en/intlayer_with_nextjs_15.md +2 -0
  91. package/docs/en/intlayer_with_nextjs_16.md +2 -0
  92. package/docs/en/plugins/sync-json.md +1 -1
  93. package/docs/en-GB/plugins/sync-json.md +244 -0
  94. package/docs/es/plugins/sync-json.md +244 -0
  95. package/docs/fr/plugins/sync-json.md +244 -0
  96. package/docs/hi/plugins/sync-json.md +244 -0
  97. package/docs/id/plugins/sync-json.md +244 -0
  98. package/docs/it/plugins/sync-json.md +244 -0
  99. package/docs/ja/plugins/sync-json.md +244 -0
  100. package/docs/ko/plugins/sync-json.md +244 -0
  101. package/docs/pl/plugins/sync-json.md +244 -0
  102. package/docs/pt/plugins/sync-json.md +244 -0
  103. package/docs/ru/plugins/sync-json.md +244 -0
  104. package/docs/tr/plugins/sync-json.md +245 -0
  105. package/docs/vi/plugins/sync-json.md +244 -0
  106. package/docs/zh/plugins/sync-json.md +244 -0
  107. package/package.json +14 -14
@@ -1,293 +1,111 @@
1
1
  ---
2
2
  createdAt: 2025-01-02
3
- updatedAt: 2025-06-29
4
- title: Intlayer और next-intl
5
- description: React एप्लिकेशन के लिए next-intl के साथ Intlayer को एक्सटेंशन करें
6
- keywords:
7
- - next-intl
8
- - Intlayer
9
- - अंतर्राष्ट्रीयकरण
10
- - दस्तावेज़ीकरण
11
- - Next.js
12
- - JavaScript
13
- - React
3
+ updatedAt: 2025-10-29
4
+ title: Intlayer का उपयोग करके अपने next-intl JSON अनुवादों को स्वचालित कैसे करें
5
+ description: Next.js अनुप्रयोगों में बेहतर अंतरराष्ट्रीयकरण के लिए Intlayer और next-intl के साथ अपने JSON अनुवादों को स्वचालित करें।
14
6
  slugs:
15
7
  - blog
16
8
  - intlayer-with-next-intl
9
+ history:
10
+ - version: 7.0.0
11
+ date: 2025-10-29
12
+ changes: syncJSON प्लगइन में बदलाव
17
13
  ---
18
14
 
19
- # Next.js Internationalization (i18n) with next-intl and Intlayer
15
+ # Intlayer का उपयोग करके अपने next-intl JSON अनुवादों को स्वचालित कैसे करें
20
16
 
21
- next-intl और Intlayer दोनों ओपन-सोर्स अंतर्राष्ट्रीयकरण (i18n) ढांचे हैं जो Next.js अनुप्रयोगों के लिए डिजाइन किए गए हैं। इनका उपयोग सॉफ़्टवेयर परियोजनाओं में अनुवाद, स्थानीयकरण, और भाषा स्विचिंग प्रबंधित करने के लिए व्यापक रूप से किया जाता है।
17
+ ## Intlayer क्या है?
22
18
 
23
- ये तीन मुख्य अवधारणाओं को साझा करते हैं:
19
+ **Intlayer** एक अभिनव, ओपन-सोर्स अंतरराष्ट्रीयकरण लाइब्रेरी है जिसे पारंपरिक i18n समाधानों की कमियों को दूर करने के लिए डिज़ाइन किया गया है। यह Next.js अनुप्रयोगों में सामग्री प्रबंधन के लिए एक आधुनिक दृष्टिकोण प्रदान करता है।
24
20
 
25
- 1. **सामग्री घोषणा**: आपकी एप्लिकेशन की अनुवादनीय सामग्री को परिभाषित करने की विधि।
26
- - Intlayer में इसे `सामग्री घोषणा फ़ाइल` कहा जाता है, जो JSON, JS, या TS फ़ाइल हो सकती है जो संरचित डेटा निर्यात करती है। अधिक जानकारी के लिए [Intlayer दस्तावेज़](https://intlayer.org/fr/doc/concept/content) देखें।
27
- - next-intl में इसे `messages` या `locale messages` कहा जाता है, जो आमतौर पर JSON फ़ाइलों में होती हैं। अधिक जानकारी के लिए [next-intl दस्तावेज़](https://github.com/amannn/next-intl) देखें।
21
+ हमारे [next-i18next vs. next-intl vs. Intlayer](https://github.com/aymericzip/intlayer/blob/main/docs/blog/hi/next-i18next_vs_next-intl_vs_intlayer.md) ब्लॉग पोस्ट में next-intl के साथ एक ठोस तुलना देखें।
28
22
 
29
- 2. **उपकरण**: एप्लिकेशन में सामग्री घोषणाएं बनाने और व्याख्यित करने के लिए उपकरण, जैसे Intlayer के लिए `useIntlayer()` या `useLocale()`, और next-intl के लिए `useTranslations()`।
23
+ ## Intlayer को next-intl के साथ क्यों मिलाएं?
30
24
 
31
- 3. **प्लगइन्स और मिडलवेयर**: URL रीडायरेक्शन, बंडलिंग ऑप्टिमाइजेशन, और अन्य प्रबंधित करने के लिए सुविधाएँ, जैसे, Intlayer के लिए `intlayerMiddleware` या next-intl के लिए [`createMiddleware`](https://github.com/amannn/next-intl)।
25
+ जबकि Intlayer एक उत्कृष्ट स्वतंत्र i18n समाधान प्रदान करता है (हमारे [Next.js एकीकरण गाइड](https://github.com/aymericzip/intlayer/blob/main/docs/docs/hi/intlayer_with_nextjs_16.md) देखें), आप इसे कई कारणों से next-intl के साथ मिलाना चाह सकते हैं:
32
26
 
33
- ## Intlayer और next-intl: प्रमुख अंतरों
27
+ 1. **मौजूदा कोडबेस**: आपके पास एक स्थापित next-intl कार्यान्वयन है और आप धीरे-धीरे Intlayer के बेहतर डेवलपर अनुभव की ओर माइग्रेट करना चाहते हैं।
28
+ 2. **पुराने आवश्यकताएं**: आपके प्रोजेक्ट को मौजूदा next-intl प्लगइन्स या वर्कफ़्लोज़ के साथ संगतता की आवश्यकता है।
29
+ 3. **टीम की परिचितता**: आपकी टीम next-intl के साथ सहज है लेकिन बेहतर सामग्री प्रबंधन चाहती है।
34
30
 
35
- Intlayer अन्य i18n पुस्तकालयों की तुलना कैसे करती है Next.js के लिए (जैसे next-intl), इसके गहरे विश्लेषण के लिए [next-i18next vs. next-intl vs. Intlayer ब्लॉग पोस्ट](https://github.com/aymericzip/intlayer/blob/main/docs/blog/hi/i18next_vs_next-intl_vs_intlayer.md) देखें।
31
+ **इसके लिए, Intlayer को next-intl के लिए एक एडाप्टर के रूप में लागू किया जा सकता है ताकि CLI या CI/CD पाइपलाइनों में आपके JSON अनुवादों को स्वचालित करने, आपके अनुवादों का परीक्षण करने और अधिक में मदद मिल सके।**
36
32
 
37
- ## Intlayer के साथ next-intl संदेश कैसे उत्पन्न करें
33
+ यह गाइड आपको दिखाता है कि कैसे Intlayer की श्रेष्ठ सामग्री घोषणा प्रणाली का लाभ उठाते हुए next-intl के साथ संगतता बनाए रखी जाए।
38
34
 
39
- ### Intlayer का उपयोग next-intl के साथ क्यों करें?
35
+ ## सामग्री सूची
40
36
 
41
- Intlayer सामग्री घोषणा फ़ाइलें आमतौर पर बेहतर डेवलपर अनुभव प्रदान करती हैं। ये अधिक लचीली और रखरखाव योग्य होती हैं, जिसमें दो मुख्य लाभ होते हैं:
37
+ <TOC/>
42
38
 
43
- 1. **लचीला स्थान**: आप Intlayer सामग्री घोषणा फ़ाइल को अपनी एप्लिकेशन की फ़ाइल पेड़ में कहीं भी रख सकते हैं। इससे घटकों के नाम बदलने या हटाने में आसानी होती है, बिना उपयोग में न आने वाली या लटकी हुई संदेश फ़ाइलों को छोड़े।
39
+ ## next-intl के साथ Intlayer सेटअप करने के लिए चरण-दर-चरण गाइड
44
40
 
45
- उदाहरण फ़ाइल संरचनाएँ:
41
+ ### चरण 1: निर्भरताएँ स्थापित करें
46
42
 
47
- ```bash codeFormat="typescript"
48
- .
49
- └── src
50
- └── components
51
- └── MyComponent
52
- ├── index.content.ts # सामग्री घोषणा फ़ाइल
53
- └── index.tsx
54
- ```
55
-
56
- ```bash codeFormat="esm"
57
- .
58
- └── src
59
- └── components
60
- └── MyComponent
61
- ├── index.content.mjs # सामग्री घोषणा फ़ाइल
62
- └── index.mjx
63
- ```
64
-
65
- ```bash codeFormat="cjs"
66
- .
67
- └── src
68
- └── components
69
- └── MyComponent
70
- ├── index.content.cjs # सामग्री घोषणा फ़ाइल
71
- └── index.cjx
72
- ```
73
-
74
- ```bash codeFormat="json"
75
- .
76
- └── src
77
- └── components
78
- └── MyComponent
79
- ├── index.content.json # सामग्री घोषणा फ़ाइल
80
- └── index.jsx
81
- ```
82
-
83
- 2. **केंद्रीकृत अनुवाद**: Intlayer सभी अनुवादों को एकल सामग्री घोषणा में संग्रहीत करती है, यह सुनिश्चित करते हुए कि कोई अनुवाद गायब न हो। TypeScript परियोजनाओं में, गायब अनुवादों को प्रकार त्रुटियों के रूप में स्वचालित रूप से चिह्नित किया जाता है, जिससे डेवलपर्स को तुरंत फीडबैक मिलता है।
84
-
85
- ### स्थापना
86
-
87
- Intlayer और next-intl का उपयोग करने के लिए, दोनों पुस्तकालयों को स्थापित करें:
43
+ आवश्यक पैकेज इंस्टॉल करें:
88
44
 
89
45
  ```bash packageManager="npm"
90
- npm install intlayer next-intl
91
- ```
92
-
93
- ```bash packageManager="yarn"
94
- yarn add intlayer next-intl
46
+ npm install intlayer @intlayer/sync-json-plugin
95
47
  ```
96
48
 
97
49
  ```bash packageManager="pnpm"
98
- pnpm add intlayer next-intl
50
+ pnpm add intlayer @intlayer/sync-json-plugin
99
51
  ```
100
52
 
101
- ### Intlayer को next-intl संदेश निर्यात करने के लिए कॉन्फ़िगर करना
102
-
103
- > **नोट:** Intlayer से next-intl के लिए संदेश निर्यात करने से संरचना में थोड़े भिन्नताएँ आ सकती हैं। यदि संभव हो, तो एक Intlayer-केवल या next-intl-केवल प्रवाह बनाए रखें ताकि एकीकरण सरल हो सके। यदि आपको Intlayer से next-intl संदेश उत्पन्न करने की आवश्यकता है, तो नीचे दिए गए चरणों का पालन करें।
104
-
105
- अपने प्रोजेक्ट की जड़ में एक `intlayer.config.ts` फ़ाइल (या `.mjs` / `.cjs`) बनाएं या अपडेट करें:
106
-
107
- ```typescript fileName="intlayer.config.ts" codeFormat="typescript"
108
- import { Locales, type IntlayerConfig } from "intlayer";
53
+ ```bash packageManager="yarn"
54
+ yarn add intlayer @intlayer/sync-json-plugin
55
+ ```
109
56
 
110
- const config: IntlayerConfig = {
111
- internationalization: {
112
- locales: [Locales.ENGLISH, Locales.FRENCH, Locales.SPANISH],
113
- defaultLocale: Locales.ENGLISH,
114
- },
115
- content: {
116
- dictionaryOutput: ["next-intl"], // next-intl आउटपुट का उपयोग करें
117
- nextIntlMessagesDir: "./intl/messages", // जहां next-intl संदेशों को सहेजना है
118
- },
119
- };
57
+ **पैकेज विवरण:**
120
58
 
121
- export default config;
122
- ```
59
+ - **intlayer**: अंतरराष्ट्रीयकरण प्रबंधन, सामग्री घोषणा, और निर्माण के लिए मुख्य पुस्तकालय
60
+ - **@intlayer/sync-json-plugin**: Intlayer सामग्री घोषणाओं को next-intl संगत JSON प्रारूप में निर्यात करने के लिए प्लगइन
123
61
 
124
- ```javascript fileName="intlayer.config.mjs" codeFormat="esm"
125
- import { Locales } from "intlayer";
62
+ ### चरण 2: JSON को लपेटने के लिए Intlayer प्लगइन लागू करें
126
63
 
127
- /** @type {import('intlayer').IntlayerConfig} */
128
- const config = {
129
- internationalization: {
130
- locales: [Locales.ENGLISH, Locales.FRENCH, Locales.SPANISH],
131
- defaultLocale: Locales.ENGLISH,
132
- },
133
- content: {
134
- dictionaryOutput: ["react-intl"],
135
- nextIntlMessagesDir: "./intl/messages",
136
- },
137
- };
64
+ अपने समर्थित लोकल्स को परिभाषित करने के लिए एक Intlayer कॉन्फ़िगरेशन फ़ाइल बनाएं:
138
65
 
139
- export default config;
140
- ```
66
+ **यदि आप next-intl के लिए JSON शब्दकोश भी निर्यात करना चाहते हैं**, तो `syncJSON` प्लगइन जोड़ें:
141
67
 
142
- ```javascript fileName="intlayer.config.cjs" codeFormat="commonjs"
143
- const { Locales } = require("intlayer");
68
+ ```typescript fileName="intlayer.config.ts"
69
+ import { Locales, type IntlayerConfig } from "intlayer";
70
+ import { syncJSON } from "@intlayer/sync-json-plugin";
144
71
 
145
- /** @type {import('intlayer').IntlayerConfig} */
146
- const config = {
72
+ const config: IntlayerConfig = {
147
73
  internationalization: {
148
74
  locales: [Locales.ENGLISH, Locales.FRENCH, Locales.SPANISH],
149
75
  defaultLocale: Locales.ENGLISH,
150
76
  },
151
- content: {
152
- dictionaryOutput: ["next-intl"],
153
- nextIntlMessagesDir: "./intl/messages",
154
- },
155
- };
156
-
157
- module.exports = config;
158
- ```
159
-
160
- ### सामग्री घोषणा
161
-
162
- नीचे विभिन्न प्रारूपों में सामग्री घोषणा फ़ाइलों के उदाहरण दिए गए हैं। Intlayer इन्हें संदेश फ़ाइलों में संकलित करेगा जिन्हें next-intl उपभोग कर सकता है।
163
-
164
- ```typescript fileName="**/*.content.ts" contentDeclarationFormat="typescript"
165
- import { t, type Dictionary } from "intlayer";
166
-
167
- const content = {
168
- key: "my-component",
169
- content: {
170
- helloWorld: t({
171
- en: "Hello World",
172
- es: "Hola Mundo",
173
- fr: "Bonjour le monde",
77
+ plugins: [
78
+ syncJSON({
79
+ source: ({ key, locale }) => `./messages/${locale}/${key}.json`,
174
80
  }),
175
- },
176
- } satisfies Dictionary;
177
-
178
- export default content;
179
- ```
180
-
181
- ```javascript fileName="**/*.content.mjs" contentDeclarationFormat="esm"
182
- import { t } from "intlayer";
183
-
184
- /** @type {import('intlayer').Dictionary} */
185
- const content = {
186
- key: "my-component",
187
- content: {
188
- helloWorld: t({
189
- en: "Hello World",
190
- es: "Hola Mundo",
191
- fr: "Bonjour le monde",
192
- }),
193
- },
81
+ ],
194
82
  };
195
83
 
196
- export default content;
197
- ```
198
-
199
- ```javascript fileName="**/*.content.cjs" contentDeclarationFormat="commonjs"
200
- const { t } = require("intlayer");
201
-
202
- module.exports = {
203
- key: "my-component",
204
- content: {
205
- helloWorld: t({
206
- en: "Hello World",
207
- es: "Hola Mundo",
208
- fr: "Bonjour le monde",
209
- }),
210
- },
211
- };
84
+ export default config;
212
85
  ```
213
86
 
214
- ```json fileName="**/*.content.json" contentDeclarationFormat="json"
215
- {
216
- "$schema": "https://intlayer.org/schema.json",
217
- "key": "my-component",
218
- "content": {
219
- "helloWorld": {
220
- "nodeType": "translation",
221
- "translation": {
222
- "en": "Hello World",
223
- "fr": "Bonjour le monde",
224
- "es": "Hola Mundo"
225
- }
226
- }
227
- }
228
- }
229
- ```
87
+ `syncJSON` प्लगइन स्वचालित रूप से JSON को लपेटेगा। यह JSON फ़ाइलों को पढ़ेगा और लिखेगा बिना सामग्री संरचना को बदले।
230
88
 
231
- ### next-intl संदेशों का निर्माण
89
+ यदि आप उस JSON को intlayer सामग्री घोषणा फ़ाइलों (`.content` फ़ाइलें) के साथ सह-अस्तित्व में रखना चाहते हैं, तो Intlayer इस प्रकार आगे बढ़ेगा:
232
90
 
233
- next-intl के लिए संदेश फ़ाइलों का निर्माण करने के लिए, चलाएँ:
91
+ 1. JSON और सामग्री घोषणा दोनों फ़ाइलों को लोड करेगा और उन्हें intlayer शब्दकोश में परिवर्तित करेगा।
92
+ 2. यदि JSON और सामग्री घोषणा फ़ाइलों के बीच कोई संघर्ष होता है, तो Intlayer उन सभी शब्दकोशों को मर्ज करने की प्रक्रिया करेगा। यह प्लगइन्स की प्राथमिकता और सामग्री घोषणा फ़ाइल की प्राथमिकता पर निर्भर करता है (सभी कॉन्फ़िगर करने योग्य हैं)।
234
93
 
235
- ```bash packageManager="npm"
236
- npx intlayer dictionaries build
237
- ```
94
+ यदि JSON का अनुवाद करने के लिए CLI का उपयोग करके या CMS का उपयोग करके परिवर्तन किए जाते हैं, तो Intlayer नई अनुवादों के साथ JSON फ़ाइल को अपडेट करेगा।
238
95
 
239
- ```bash packageManager="yarn"
240
- yarn intlayer build
241
- ```
96
+ ## Git कॉन्फ़िगरेशन
242
97
 
243
- ```bash packageManager="pnpm"
244
- pnpm intlayer build
245
- ```
98
+ स्वचालित रूप से उत्पन्न Intlayer फ़ाइलों को अनदेखा करने की सलाह दी जाती है:
246
99
 
247
- इससे `./intl/messages` निर्देशिका में संसाधन उत्पन्न होंगे (जैसा कि `intlayer.config.*` में कॉन्फ़िगर किया गया है)। अपेक्षित आउटपुट:
248
-
249
- ```bash
250
- .
251
- └── intl
252
- └── messages
253
- └── hi
254
- └── my-content.json
255
- └── fr
256
- └── my-content.json
257
- └── es
258
- └── my-content.json
100
+ ```plaintext fileName=".gitignore"
101
+ # Intlayer द्वारा उत्पन्न फ़ाइलों को अनदेखा करें
102
+ .intlayer
259
103
  ```
260
104
 
261
- प्रत्येक फ़ाइल में सभी Intlayer सामग्री घोषणाओं से संकलित संदेश होते हैं। शीर्ष स्तर की कुंजियाँ आमतौर पर आपके `content.key` फ़ील्ड से मेल खाती हैं।
262
-
263
- ### अपने Next.js ऐप में next-intl का उपयोग करना
264
-
265
- > अधिक विवरण के लिए, आधिकारिक [next-intl उपयोग दस्तावेज़](https://github.com/amannn/next-intl#readme) देखें।
266
-
267
- 1. **एक Middleware बनाएँ (वैकल्पिक):**
268
- यदि आप स्वचालित स्थानीयकरण पहचान या रीडायरेक्शन प्रबंधित करना चाहते हैं, तो next-intl के [createMiddleware](https://github.com/amannn/next-intl#createMiddleware) का उपयोग करें।
269
-
270
- ```typescript fileName="middleware.ts"
271
- import createMiddleware from "next-intl/middleware";
272
- import { NextResponse } from "next/server";
273
-
274
- export default createMiddleware({
275
- locales: ["en", "fr", "es"],
276
- defaultLocale: "en",
277
- });
278
-
279
- export const config = {
280
- matcher: ["/((?!api|_next|.*\\..*).*)"],
281
- };
282
- ```
105
+ ये फ़ाइलें आपके बिल्ड प्रक्रिया के दौरान पुनः उत्पन्न की जा सकती हैं और इन्हें संस्करण नियंत्रण में कमिट करने की आवश्यकता नहीं है।
283
106
 
284
- 2. **संदेश लोड करने के लिए `layout.tsx` या `_app.tsx` बनाएँ:**
285
- यदि आप ऐप राउटर (Next.js 13+) का उपयोग कर रहे हैं, तो एक लेआउट बनाएँ:
107
+ ### VS कोड एक्सटेंशन
286
108
 
287
- ```typescript fileName="app/[locale]/layout.tsx"
288
- import { NextIntlClientProvider } from 'next-intl';
289
- import { notFound } from 'next/navigation';
290
- import React, { ReactNode } from 'react';
109
+ बेहतर डेवलपर अनुभव के लिए, आधिकारिक **Intlayer VS Code एक्सटेंशन** इंस्टॉल करें:
291
110
 
292
- export const
293
- ```
111
+ [VS कोड मार्केटप्लेस से इंस्टॉल करें](https://marketplace.visualstudio.com/items?itemName=intlayer.intlayer-vs-code-extension)