@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,471 @@
1
+ ---
2
+ createdAt: 2025-12-30
3
+ updatedAt: 2025-12-30
4
+ title: Fastify backend'inizi nasıl çevirirsiniz – i18n rehberi 2026
5
+ description: Fastify backend'inizi çok dilli hale getirmenin yollarını keşfedin. Uluslararasılaştırma (i18n) ve çeviri için dokümantasyonu takip edin.
6
+ keywords:
7
+ - Uluslararasılaştırma
8
+ - Dokümantasyon
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 komutu eklendi
22
+ - version: 7.6.0
23
+ date: 2025-12-31
24
+ changes: Geçmiş başlatıldı
25
+ ---
26
+
27
+ # Fastify backend sitenizi Intlayer ile çevirin | Uluslararasılaştırma (i18n)
28
+
29
+ `fastify-intlayer`, Fastify uygulamaları için güçlü bir uluslararasılaştırma (i18n) eklentisidir; istemci tercihlerine göre yerelleştirilmiş yanıtlar sağlayarak backend servislerinizi küresel olarak erişilebilir hale getirmek için tasarlanmıştır.
30
+
31
+ ### Pratik Kullanım Örnekleri
32
+
33
+ - **Kullanıcının Dilinde Backend Hatalarını Gösterme**: Bir hata oluştuğunda, mesajları kullanıcının ana dilinde göstermek anlayışı artırır ve kullanıcı sıkıntısını azaltır. Bu, özellikle toast veya modal gibi ön yüz bileşenlerinde gösterilebilecek dinamik hata mesajları için kullanışlıdır.
34
+
35
+ `fastify-intlayer`, Fastify uygulamaları için güçlü bir uluslararasılaştırma (i18n) eklentisidir; istemcinin tercihleri doğrultusunda yerelleştirilmiş yanıtlar sunarak backend servislerinizi küresel olarak erişilebilir kılmak için tasarlanmıştır.
36
+
37
+ ### Pratik Kullanım Senaryoları
38
+
39
+ - **Kullanıcının Dilinde Backend Hatalarını Gösterme**: Bir hata oluştuğunda, mesajların kullanıcının ana dilinde gösterilmesi anlayışı artırır ve hayal kırıklığını azaltır. Bu, özellikle toasts veya modallar gibi ön yüz bileşenlerinde gösterilebilecek dinamik hata mesajları için çok yararlıdır.
40
+ - **Çok Dilli İçerik Alma**: Database'den içerik çeken uygulamalar için uluslararasılaştırma, bu içeriği birden fazla dilde sunmanızı sağlar. Bu, e-commerce siteleri veya content management systems gibi ürün açıklamalarını, makaleleri ve diğer içerikleri kullanıcının tercih ettiği dilde göstermek zorunda olan platformlar için kritiktir.
41
+ - **Çok Dilli E-Posta Gönderimi**: İster transactional e-postalar, ister pazarlama kampanyaları veya bildirimler olsun, alıcının dilinde e-posta göndermek etkileşimi ve etkinliği önemli ölçüde artırabilir.
42
+ - **Çok Dilli Push Bildirimleri**: Mobil uygulamalarda, kullanıcının tercih ettiği dilde push bildirimleri göndermek etkileşimi ve kullanıcı elde tutmayı artırabilir. Bu kişisel dokunuş, bildirimlerin daha ilgili ve uygulanabilir hissettirmesini sağlar.
43
+ - **Diğer İletişimler**: SMS mesajları, sistem uyarıları veya kullanıcı arayüzü güncellemeleri gibi backend'den gelen her türlü iletişim, kullanıcının dilinde olduğunda netlik sağlar ve genel kullanıcı deneyimini iyileştirir.
44
+
45
+ Backend'i uluslararasılaştırarak, uygulamanız yalnızca kültürel farklılıklara saygı göstermekle kalmaz, aynı zamanda küresel pazar ihtiyaçlarıyla daha iyi uyum sağlar; bu da hizmetlerinizi dünya çapında ölçeklendirmenin önemli bir adımıdır.
46
+
47
+ ## Başlarken
48
+
49
+ ### Kurulum
50
+
51
+ `fastify-intlayer`'ı kullanmaya başlamak için paketi npm ile kurun:
52
+
53
+ ```bash packageManager="npm"
54
+ npm install intlayer fastify-intlayer
55
+ npx intlayer init
56
+
57
+ ```
58
+
59
+ ```bash packageManager="pnpm"
60
+ pnpm add intlayer fastify-intlayer
61
+ pnpm intlayer init
62
+
63
+ ```
64
+
65
+ ```bash packageManager="yarn"
66
+ yarn add intlayer fastify-intlayer
67
+ yarn intlayer init
68
+
69
+ ```
70
+
71
+ ```bash packageManager="bun"
72
+ bun add intlayer fastify-intlayer
73
+ bunx intlayer init
74
+
75
+ ```
76
+
77
+ ### Kurulum
78
+
79
+ Uluslararasılaştırma ayarlarını proje kök dizininizde bir `intlayer.config.ts` oluşturarak yapılandırın:
80
+
81
+ ```typescript fileName="intlayer.config.ts" codeFormat="typescript"
82
+ import { Locales, type IntlayerConfig } from "intlayer";
83
+
84
+ const config: IntlayerConfig = {
85
+ internationalization: {
86
+ locales: [
87
+ Locales.ENGLISH,
88
+ Locales.FRENCH,
89
+ Locales.SPANISH_MEXICO,
90
+ Locales.SPANISH_SPAIN,
91
+ ],
92
+ defaultLocale: Locales.ENGLISH,
93
+ },
94
+ };
95
+
96
+ export default config;
97
+ ```
98
+
99
+ ```javascript fileName="intlayer.config.mjs" codeFormat="esm"
100
+ import { Locales } from "intlayer";
101
+
102
+ /** @type {import('intlayer').IntlayerConfig} - Intlayer yapılandırma türü */
103
+ const config = {
104
+ internationalization: {
105
+ locales: [
106
+ Locales.ENGLISH,
107
+ Locales.FRENCH,
108
+ Locales.SPANISH_MEXICO,
109
+ Locales.SPANISH_SPAIN,
110
+ ],
111
+ defaultLocale: Locales.ENGLISH,
112
+ },
113
+ };
114
+
115
+ export default config;
116
+ ```
117
+
118
+ ```javascript fileName="intlayer.config.cjs" codeFormat="commonjs"
119
+ const { Locales } = require("intlayer");
120
+
121
+ /** @type {import('intlayer').IntlayerConfig} - Intlayer yapılandırma türü */
122
+ const config = {
123
+ internationalization: {
124
+ locales: [
125
+ Locales.ENGLISH,
126
+ Locales.FRENCH,
127
+ Locales.SPANISH_MEXICO,
128
+ Locales.SPANISH_SPAIN,
129
+ ],
130
+ defaultLocale: Locales.ENGLISH,
131
+ },
132
+ };
133
+
134
+ module.exports = config;
135
+ ```
136
+
137
+ ### İçeriğinizi Tanımlayın
138
+
139
+ Çevirileri depolamak için içerik tanımlamalarınızı oluşturun ve yönetin:
140
+
141
+ ```typescript fileName="src/index.content.ts" contentDeclarationFormat="typescript"
142
+ import { t, type Dictionary } from "intlayer";
143
+
144
+ const indexContent = {
145
+ key: "index",
146
+ content: {
147
+ exampleOfContent: t({
148
+ tr: "İngilizce döndürülen içeriğin örneği",
149
+ en: "Example of returned content in English",
150
+ fr: "Exemple de contenu renvoyé en français",
151
+ "es-ES": "Ejemplo de contenido devuelto en español (España)",
152
+ "es-MX": "Ejemplo de contenido devuelto en español (México)",
153
+ }),
154
+ },
155
+ } satisfies Dictionary;
156
+
157
+ export default indexContent;
158
+ ```
159
+
160
+ ```javascript fileName="src/index.content.mjs" contentDeclarationFormat="esm"
161
+ import { t } from "intlayer";
162
+
163
+ /** @type {import('intlayer').Dictionary} */
164
+ const indexContent = {
165
+ key: "index",
166
+ content: {
167
+ exampleOfContent: t({
168
+ tr: "İngilizce döndürülen içeriğin örneği",
169
+ en: "Example of returned content in English",
170
+ fr: "Exemple de contenu renvoyé en français",
171
+ "es-ES": "Ejemplo de contenido devuelto en español (España)",
172
+ "es-MX": "Ejemplo de contenido devuelto en español (México)",
173
+ }),
174
+ },
175
+ };
176
+
177
+ export default indexContent;
178
+
179
+
180
+ /** @type {import('intlayer').Dictionary} */
181
+ const indexContent = {
182
+ key: "index",
183
+ content: {
184
+ exampleOfContent: t({
185
+ tr: "Döndürülen içeriğin Türkçe örneği",
186
+ en: "Example of returned content in English",
187
+ fr: "Exemple de contenu renvoyé en français",
188
+ "es-ES": "Ejemplo de contenido devuelto en español (España)",
189
+ "es-MX": "Ejemplo de contenido devuelto en español (México)",
190
+ }),
191
+ },
192
+ };
193
+
194
+ export default indexContent;
195
+ ```
196
+
197
+ ```javascript fileName="src/index.content.cjs" contentDeclarationFormat="commonjs"
198
+ const { t } = require("intlayer");
199
+
200
+ /** @type {import('intlayer').Dictionary} */
201
+ const indexContent = {
202
+ key: "index",
203
+ content: {
204
+ exampleOfContent: t({
205
+ tr: "Döndürülen içeriğin Türkçe örneği",
206
+ en: "Example of returned content in English",
207
+ fr: "Exemple de contenu renvoyé en français",
208
+ "es-ES": "Ejemplo de contenido devuelto en español (España)",
209
+ "es-MX": "Ejemplo de contenido devuelto en español (México)",
210
+ }),
211
+ },
212
+ };
213
+
214
+ module.exports = indexContent;
215
+ ```
216
+
217
+ ```json fileName="src/index.content.json" contentDeclarationFormat="json"
218
+ {
219
+ "$schema": "https://intlayer.org/schema.json",
220
+ "key": "index",
221
+ "content": {
222
+ "exampleOfContent": {
223
+ "nodeType": "translation",
224
+ "translation": {
225
+ "tr": "İngilizce döndürülen içerik örneği",
226
+ "en": "Example of returned content in English",
227
+ "fr": "Exemple de contenu renvoyé en français",
228
+ "es-ES": "Ejemplo de contenido devuelto en español (España)",
229
+ "es-MX": "Ejemplo de contenido devuelto en español (México)"
230
+ }
231
+ }
232
+ }
233
+ }
234
+ ```
235
+
236
+ > İçerik beyanlarınızı, uygulamanızda `contentDir` dizinine (varsayılan olarak `./src`) dahil edildikleri sürece istediğiniz yere tanımlayabilirsiniz. Ve içerik beyanı dosya uzantısıyla eşleşmelidir (varsayılan olarak `.content.{json,ts,tsx,js,jsx,mjs,mjx,cjs,cjx}`).
237
+
238
+ > Daha fazla ayrıntı için [içerik beyanı belgelerine](https://github.com/aymericzip/intlayer/blob/main/docs/docs/tr/dictionary/content_file.md) bakın.
239
+
240
+ ### Fastify Uygulama Kurulumu
241
+
242
+ Fastify uygulamanızı `fastify-intlayer` kullanacak şekilde ayarlayın:
243
+
244
+ ```typescript fileName="src/index.ts" codeFormat="typescript"
245
+ import Fastify from "fastify";
246
+ import { intlayer, t, getDictionary, getIntlayer } from "fastify-intlayer";
247
+ import dictionaryExample from "./index.content";
248
+
249
+ const fastify = Fastify({ logger: true });
250
+
251
+ // Uluslararasılaştırma eklentisini yükle
252
+ await fastify.register(intlayer);
253
+
254
+ // Rotalar
255
+ fastify.get("/t_example", async (_req, reply) => {
256
+ return t({
257
+ tr: "Döndürülen içeriğin Türkçe örneği",
258
+ en: "Example of returned content in English",
259
+ fr: "Exemple de contenu renvoyé en français",
260
+ "es-ES": "Ejemplo de contenido devuelto en español (España)",
261
+ "es-MX": "Ejemplo de contenido devuelto en español (México)",
262
+ });
263
+ });
264
+
265
+ fastify.get("/getIntlayer_example", async (_req, reply) => {
266
+ return getIntlayer("index").exampleOfContent;
267
+ });
268
+
269
+ fastify.get("/getDictionary_example", async (_req, reply) => {
270
+ return getDictionary(dictionaryExample).exampleOfContent;
271
+ });
272
+
273
+ // Sunucuyu başlat
274
+ const start = async () => {
275
+ try {
276
+ await fastify.listen({ port: 3000 });
277
+ } catch (err) {
278
+ fastify.log.error(err);
279
+ process.exit(1);
280
+ }
281
+ };
282
+
283
+ start();
284
+ ```
285
+
286
+ ```javascript fileName="src/index.mjs" codeFormat="esm"
287
+ import Fastify from "fastify";
288
+ import { intlayer, t, getDictionary, getIntlayer } from "fastify-intlayer";
289
+ import dictionaryExample from "./index.content";
290
+
291
+ const fastify = Fastify({ logger: true });
292
+
293
+ // Uluslararasılaştırma eklentisini yükle
294
+ await fastify.register(intlayer);
295
+
296
+ // Rotalar
297
+ fastify.get("/t_example", async (_req, reply) => {
298
+ return t({
299
+ tr: "İngilizce döndürülen içerik örneği",
300
+ en: "Example of returned content in English",
301
+ fr: "Exemple de contenu renvoyé en français",
302
+ "es-ES": "Ejemplo de contenido devuelto en español (España)",
303
+ "es-MX": "Ejemplo de contenido devuelto en español (México)",
304
+ });
305
+ });
306
+
307
+ fastify.get("/getIntlayer_example", async (_req, reply) => {
308
+ return getIntlayer("index").exampleOfContent;
309
+ });
310
+
311
+ fastify.get("/getDictionary_example", async (_req, reply) => {
312
+ return getDictionary(dictionaryExample).exampleOfContent;
313
+ });
314
+
315
+ // Sunucuyu başlat
316
+ const start = async () => {
317
+ try {
318
+ await fastify.listen({ port: 3000 });
319
+ } catch (err) {
320
+ fastify.log.error(err);
321
+ process.exit(1);
322
+ }
323
+ };
324
+
325
+ start();
326
+ ```
327
+
328
+ ```javascript fileName="src/index.cjs" codeFormat="commonjs"
329
+ const Fastify = require("fastify");
330
+ const { intlayer, t, getDictionary, getIntlayer } = require("fastify-intlayer");
331
+ const dictionaryExample = require("./index.content");
332
+
333
+ const fastify = Fastify({ logger: true });
334
+
335
+ // async/await için sunucu başlatma sarmalayıcısı
336
+ const start = async () => {
337
+ try {
338
+ // Uluslararasılaştırma eklentisini yükle
339
+ await fastify.register(intlayer);
340
+
341
+ // Rotalar
342
+ fastify.get("/t_example", async (_req, reply) => {
343
+ return t({
344
+ tr: "Dönen içeriğe örnek (Türkçe)",
345
+ en: "Example of returned content in English",
346
+ fr: "Exemple de contenu renvoyé en français",
347
+ "es-ES": "Ejemplo de contenido devuelto en español (España)",
348
+ "es-MX": "Ejemplo de contenido devuelto en español (México)",
349
+ });
350
+ });
351
+
352
+ fastify.get("/getIntlayer_example", async (_req, reply) => {
353
+ return getIntlayer("index").exampleOfContent;
354
+ });
355
+
356
+ fastify.get("/getDictionary_example", async (_req, reply) => {
357
+ return getDictionary(dictionaryExample).exampleOfContent;
358
+ });
359
+
360
+ await fastify.listen({ port: 3000 });
361
+ } catch (err) {
362
+ fastify.log.error(err);
363
+ process.exit(1);
364
+ }
365
+ };
366
+
367
+ start();
368
+ ```
369
+
370
+ ### Uyumluluk
371
+
372
+ `fastify-intlayer` şu paketlerle tamamen uyumludur:
373
+
374
+ - [`react-intlayer`](<https://www.google.com/search?q=%5Bhttps://github.com/aymericzip/intlayer/blob/main/docs/docs/tr/packages/react-intlayer/index.md%5D(https://github.com/aymericzip/intlayer/blob/main/docs/docs/tr/packages/react-intlayer/index.md)>) React uygulamaları için
375
+ - [`next-intlayer`](<https://www.google.com/search?q=%5Bhttps://github.com/aymericzip/intlayer/blob/main/docs/docs/tr/packages/next-intlayer/index.md%5D(https://github.com/aymericzip/intlayer/blob/main/docs/docs/tr/packages/next-intlayer/index.md)>) Next.js uygulamaları için
376
+
377
+ - [`react-intlayer`](<https://www.google.com/search?q=%5Bhttps://github.com/aymericzip/intlayer/blob/main/docs/docs/tr/packages/react-intlayer/index.md%5D(https://github.com/aymericzip/intlayer/blob/main/docs/docs/tr/packages/react-intlayer/index.md)>) React uygulamaları için
378
+ - [`next-intlayer`](<https://www.google.com/search?q=%5Bhttps://github.com/aymericzip/intlayer/blob/main/docs/docs/tr/packages/next-intlayer/index.md%5D(https://github.com/aymericzip/intlayer/blob/main/docs/docs/tr/packages/next-intlayer/index.md)>) Next.js uygulamaları için
379
+ - [`vite-intlayer`](<https://www.google.com/search?q=%5Bhttps://github.com/aymericzip/intlayer/blob/main/docs/docs/tr/packages/vite-intlayer/index.md%5D(https://github.com/aymericzip/intlayer/blob/main/docs/docs/tr/packages/vite-intlayer/index.md)>) Vite uygulamaları için
380
+
381
+ Ayrıca tarayıcılar ve API istekleri dahil olmak üzere çeşitli ortamlarda herhangi bir uluslararasılaştırma çözümü ile sorunsuz çalışır. Middleware'i başlıklar (headers) veya çerezler aracılığıyla locale tespit edecek şekilde özelleştirebilirsiniz:
382
+
383
+ ```typescript fileName="intlayer.config.ts" codeFormat="typescript"
384
+ import { Locales, type IntlayerConfig } from "intlayer";
385
+
386
+ const config: IntlayerConfig = {
387
+ // ... Diğer yapılandırma seçenekleri
388
+ middleware: {
389
+ headerName: "my-locale-header",
390
+ cookieName: "my-locale-cookie",
391
+ },
392
+ };
393
+
394
+ export default config;
395
+ ```
396
+
397
+ ```javascript fileName="intlayer.config.mjs" codeFormat="esm"
398
+ import { Locales } from "intlayer";
399
+
400
+ /** @type {import('intlayer').IntlayerConfig} */
401
+ const config = {
402
+ // ... Diğer yapılandırma seçenekleri
403
+ middleware: {
404
+ headerName: "my-locale-header",
405
+ cookieName: "my-locale-cookie",
406
+ },
407
+ };
408
+
409
+ export default config;
410
+ ```
411
+
412
+ ```javascript fileName="intlayer.config.cjs" codeFormat="commonjs"
413
+ const { Locales } = require("intlayer");
414
+
415
+ /** @type {import('intlayer').IntlayerConfig} */
416
+ const config = {
417
+ // ... Diğer yapılandırma seçenekleri
418
+ middleware: {
419
+ headerName: "my-locale-header",
420
+ cookieName: "my-locale-cookie",
421
+ },
422
+ };
423
+
424
+ module.exports = config;
425
+ ```
426
+
427
+ Varsayılan olarak, `fastify-intlayer` istemcinin tercih ettiği dili belirlemek için `Accept-Language` başlığını yorumlar.
428
+
429
+ > Yapılandırma ve gelişmiş konular hakkında daha fazla bilgi için [dökümantasyonumuza](https://github.com/aymericzip/intlayer/blob/main/docs/docs/tr/configuration.md) bakın.
430
+
431
+ ### TypeScript'i Yapılandırma
432
+
433
+ `fastify-intlayer`, uluslararasılaştırma sürecini geliştirmek için TypeScript'in güçlü yeteneklerinden yararlanır. TypeScript'in statik tiplendirmesi, her çeviri anahtarının hesaba katılmasını sağlar, eksik çeviriler riskini azaltır ve bakım kolaylığını artırır.
434
+
435
+ Otomatik oluşturulan tiplerin (varsayılan olarak ./types/intlayer.d.ts konumunda) tsconfig.json dosyanıza dahil edildiğinden emin olun.
436
+
437
+ ```json5 fileName="tsconfig.json"
438
+ {
439
+ // ... Mevcut TypeScript yapılandırmalarınız
440
+ "include": [
441
+ // ... Mevcut TypeScript yapılandırmalarınız
442
+ ".intlayer/**/*.ts", // Otomatik oluşturulan tipleri dahil edin
443
+ ],
444
+ }
445
+ ```
446
+
447
+ ### VS Code Uzantısı
448
+
449
+ Geliştirici deneyiminizi Intlayer ile iyileştirmek için resmi **Intlayer VS Code Uzantısı**nı yükleyebilirsiniz.
450
+
451
+ [VS Code Marketplace'ten Yükle](https://marketplace.visualstudio.com/items?itemName=intlayer.intlayer-vs-code-extension)
452
+
453
+ Bu uzantı şunları sağlar:
454
+
455
+ - **Çeviri anahtarları için otomatik tamamlama.**
456
+ - **Eksik çeviriler için gerçek zamanlı hata tespiti.**
457
+ - **Çevrilmiş içeriğin satır içi önizlemeleri.**
458
+ - **Çevirileri kolayca oluşturup güncellemek için hızlı eylemler.**
459
+
460
+ Uzantının nasıl kullanılacağıyla ilgili daha fazla ayrıntı için [Intlayer VS Code Uzantısı dokümantasyonuna](https://intlayer.org/doc/vs-code-extension) bakın.
461
+
462
+ ### Git Yapılandırması
463
+
464
+ Intlayer tarafından oluşturulan dosyaların yoksayılması önerilir. Bu, bunları Git havuzunuza göndermekten kaçınmanızı sağlar.
465
+
466
+ Bunu yapmak için .gitignore dosyanıza aşağıdaki satırları ekleyebilirsiniz:
467
+
468
+ ```plaintext fileName=".gitignore"
469
+ # Intlayer tarafından oluşturulan dosyaları yoksay
470
+ .intlayer
471
+ ```
package/docs/tr/readme.md CHANGED
@@ -50,7 +50,7 @@ Framework bağımsızdır, **yapay zeka desteklidir** ve ücretsiz bir **CMS & g
50
50
  | Özellik | Açıklama |
51
51
  | --------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
52
52
  | <img src="https://github.com/aymericzip/intlayer/blob/main/docs/assets/frameworks.png?raw=true" alt="Özellik" width="700"> | **Çapraz Framework Desteği**<br><br>Intlayer, Next.js, React, Vite, Vue.js, Nuxt, Preact, Express ve daha fazlası dahil olmak üzere tüm büyük frameworkler ve kütüphanelerle uyumludur. |
53
- | <img src="https://github.com/aymericzip/intlayer/blob/main/docs/assets/javascript_content_management.png?raw=true" alt="Özellik" width="700"> | **JavaScript Destekli İçerik Yönetimi**<br><br>İçeriğinizi tanımlamak ve verimli bir şekilde yönetmek için JavaScript'in esnekliğinden yararlanın. <br><br> - [İçerik bildirimi](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="Özellik" width="700"> | **JavaScript Destekli İçerik Yönetimi**<br><br>İçeriğinizi tanımlamak ve verimli bir şekilde yönetmek için JavaScript'in esnekliğinden yararlanın. <br><br> - [İçerik bildirimi](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="Özellik" width="700"> | **Yerel Bazlı İçerik Bildirim Dosyası**<br><br>Otomatik oluşturma öncesinde içeriğinizi bir kez bildirerek geliştirme sürecinizi hızlandırın.<br><br> - [Yerel Bazlı İçerik Bildirim Dosyası](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="Özellik" width="700"> | **Tip Güvenli Ortam**<br><br>İçerik tanımlarınızın ve kodunuzun hatasız olmasını sağlamak için TypeScript'ten yararlanın ve aynı zamanda IDE otomatik tamamlama özelliğinin avantajlarından faydalanın.<br><br> - [TypeScript yapılandırması](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="Özellik" width="700"> | **Basitleştirilmiş Kurulum**<br><br>Minimum yapılandırma ile hızlıca çalışmaya başlayın. Uluslararasılaştırma, yönlendirme, yapay zeka, derleme ve içerik yönetimi ayarlarını kolayca yapın.<br><br> - [Next.js entegrasyonunu keşfedin](https://intlayer.org/doc/environment/nextjs) |
@@ -0,0 +1,137 @@
1
+ ---
2
+ createdAt: 2026-01-06
3
+ updatedAt: 2026-01-06
4
+ title: Lệnh CI
5
+ description: Tìm hiểu cách sử dụng lệnh Intlayer CI để chạy các lệnh Intlayer với thông tin xác thực được tự động chèn vào trong các pipeline CI/CD và monorepo.
6
+ keywords:
7
+ - CI
8
+ - CI/CD
9
+ - Tự động hóa
10
+ - Monorepo
11
+ - Thông tin xác thực
12
+ - CLI
13
+ - Intlayer
14
+ slugs:
15
+ - doc
16
+ - concept
17
+ - cli
18
+ - ci
19
+ history:
20
+ - version: 7.5.11
21
+ date: 2026-01-06
22
+ changes: Thêm lệnh CI
23
+ ---
24
+
25
+ # Lệnh CI
26
+
27
+ ```bash
28
+ npx intlayer ci <command...>
29
+ ```
30
+
31
+ Lệnh CI được thiết kế cho tự động hóa và các pipeline CI/CD. Nó tự động chèn thông tin xác thực từ biến môi trường `INTLAYER_PROJECT_CREDENTIALS` và có thể chạy các lệnh Intlayer trên nhiều dự án trong một monorepo.
32
+
33
+ ## Cách hoạt động
34
+
35
+ Lệnh CI hoạt động ở hai chế độ:
36
+
37
+ 1. **Chế độ dự án đơn**: Nếu thư mục làm việc hiện tại khớp với một trong các đường dẫn dự án trong `INTLAYER_PROJECT_CREDENTIALS`, nó sẽ chạy lệnh chỉ cho dự án cụ thể đó.
38
+
39
+ 2. **Chế độ lặp lại**: Nếu không phát hiện ngữ cảnh dự án cụ thể, nó sẽ lặp lại tất cả các dự án đã cấu hình và chạy lệnh cho từng dự án.
40
+
41
+ ## Biến môi trường
42
+
43
+ Lệnh yêu cầu biến môi trường `INTLAYER_PROJECT_CREDENTIALS` được đặt. Biến này phải chứa một đối tượng JSON ánh xạ các đường dẫn dự án đến thông tin xác thực của chúng:
44
+
45
+ ```json
46
+ {
47
+ "packages/app": {
48
+ "clientId": "your-client-id-1",
49
+ "clientSecret": "your-client-secret-1"
50
+ },
51
+ "packages/admin": {
52
+ "clientId": "your-client-id-2",
53
+ "clientSecret": "your-client-secret-2"
54
+ }
55
+ }
56
+ ```
57
+
58
+ ## Phát hiện trình quản lý gói
59
+
60
+ Lệnh CI tự động phát hiện trình quản lý gói đang được sử dụng (npm, yarn, pnpm hoặc bun) dựa trên biến môi trường `npm_config_user_agent` và sử dụng lệnh phù hợp để thực thi Intlayer.
61
+
62
+ ## Đối số
63
+
64
+ - **`<command...>`**: Lệnh Intlayer để thực thi (ví dụ: `fill`, `push`, `build`). Bạn có thể truyền bất kỳ lệnh Intlayer nào và các đối số của nó.
65
+
66
+ > Ví dụ: `npx intlayer ci fill --verbose`
67
+ >
68
+ > Ví dụ: `npx intlayer ci push`
69
+ >
70
+ > Ví dụ: `npx intlayer ci build --watch`
71
+
72
+ ## Ví dụ
73
+
74
+ ### Chạy lệnh ở chế độ dự án đơn
75
+
76
+ Nếu bạn đang ở trong thư mục dự án khớp với một trong các đường dẫn trong `INTLAYER_PROJECT_CREDENTIALS`:
77
+
78
+ ```bash
79
+ cd packages/app
80
+ npx intlayer ci fill
81
+ ```
82
+
83
+ Điều này sẽ chạy lệnh `fill` với thông tin xác thực được tự động chèn cho dự án `packages/app`.
84
+
85
+ ### Chạy lệnh trên tất cả các dự án
86
+
87
+ Nếu bạn đang ở trong thư mục không khớp với bất kỳ đường dẫn dự án nào, lệnh sẽ lặp lại tất cả các dự án đã cấu hình:
88
+
89
+ ```bash
90
+ cd /path/to/monorepo
91
+ npx intlayer ci push
92
+ ```
93
+
94
+ Điều này sẽ chạy lệnh `push` cho mỗi dự án được cấu hình trong `INTLAYER_PROJECT_CREDENTIALS`.
95
+
96
+ ### Truyền cờ bổ sung
97
+
98
+ Bạn có thể truyền bất kỳ cờ nào cho lệnh Intlayer cơ bản:
99
+
100
+ ```bash
101
+ npx intlayer ci fill --verbose --mode complete
102
+ ```
103
+
104
+ ### Sử dụng trong pipeline CI/CD
105
+
106
+ Trong cấu hình CI/CD của bạn (ví dụ: GitHub Actions, GitLab CI), đặt `INTLAYER_PROJECT_CREDENTIALS` làm bí mật:
107
+
108
+ ```yaml
109
+ # Ví dụ GitHub Actions
110
+ env:
111
+ INTLAYER_PROJECT_CREDENTIALS: ${{ secrets.INTLAYER_PROJECT_CREDENTIALS }}
112
+
113
+ steps:
114
+ - name: Điền từ điển
115
+ run: npx intlayer ci fill
116
+ ```
117
+
118
+ ## Xử lý lỗi
119
+
120
+ - Nếu `INTLAYER_PROJECT_CREDENTIALS` không được đặt, lệnh sẽ thoát với lỗi.
121
+ - Nếu `INTLAYER_PROJECT_CREDENTIALS` không phải là JSON hợp lệ, lệnh sẽ thoát với lỗi.
122
+ - Nếu đường dẫn dự án không tồn tại, nó sẽ được bỏ qua với cảnh báo.
123
+ - Nếu bất kỳ dự án nào thất bại, lệnh sẽ thoát với mã trạng thái khác không.
124
+
125
+ ## Trường hợp sử dụng
126
+
127
+ - **Tự động hóa monorepo**: Chạy các lệnh Intlayer trên nhiều dự án trong một monorepo
128
+ - **Pipeline CI/CD**: Tự động hóa quản lý từ điển trong quy trình tích hợp liên tục
129
+ - **Thao tác hàng loạt**: Thực hiện cùng một thao tác trên nhiều dự án Intlayer cùng một lúc
130
+ - **Quản lý bí mật**: Quản lý an toàn thông tin xác thực cho nhiều dự án bằng cách sử dụng biến môi trường
131
+
132
+ ## Thực hành bảo mật tốt nhất
133
+
134
+ - Lưu trữ `INTLAYER_PROJECT_CREDENTIALS` dưới dạng bí mật được mã hóa trong nền tảng CI/CD của bạn
135
+ - Không bao giờ commit thông tin xác thực vào kiểm soát phiên bản
136
+ - Sử dụng thông tin xác thực cụ thể theo môi trường cho các môi trường triển khai khác nhau
137
+ - Xoay thông tin xác thực thường xuyên
@@ -1,6 +1,6 @@
1
1
  ---
2
2
  createdAt: 2024-08-11
3
- updatedAt: 2025-12-30
3
+ updatedAt: 2026-01-06
4
4
  title: CLI
5
5
  description: Khám phá cách sử dụng Intlayer CLI để quản lý trang web đa ngôn ngữ của bạn. Làm theo các bước trong tài liệu trực tuyến này để thiết lập dự án của bạn trong vài phút.
6
6
  keywords:
@@ -17,6 +17,9 @@ slugs:
17
17
  - concept
18
18
  - cli
19
19
  history:
20
+ - version: 7.5.11
21
+ date: 2026-01-06
22
+ changes: Thêm lệnh projects list
20
23
  - version: 7.5.9
21
24
  date: 2025-12-30
22
25
  changes: Thêm lệnh init
@@ -120,6 +123,7 @@ Intlayer chấp nhận nhiều định dạng tệp cấu hình:
120
123
  - **[Xây dựng Từ điển](https://github.com/aymericzip/intlayer/blob/main/docs/docs/vi/cli/build.md)** - Xây dựng từ điển của bạn từ các tệp khai báo nội dung
121
124
  - **[Theo dõi Từ điển](https://github.com/aymericzip/intlayer/blob/main/docs/docs/vi/cli/watch.md)** - Theo dõi các thay đổi và tự động xây dựng từ điển
122
125
  - **[Kiểm tra Phiên bản CLI](https://github.com/aymericzip/intlayer/blob/main/docs/docs/vi/cli/version.md)** - Kiểm tra phiên bản Intlayer CLI đã cài đặt
126
+ - **[Liệt kê Dự án](https://github.com/aymericzip/intlayer/blob/main/docs/docs/vi/cli/list_projects.md)** - Liệt kê tất cả các dự án Intlayer trong thư mục hoặc kho lưu trữ git
123
127
 
124
128
  ### Quản lý Từ điển
125
129
 
@@ -167,6 +171,7 @@ Intlayer chấp nhận nhiều định dạng tệp cấu hình:
167
171
  "intlayer:list": "npx intlayer content list",
168
172
  "intlayer:test": "npx intlayer content test",
169
173
  "intlayer:transform": "npx intlayer transform",
174
+ "intlayer:projects": "npx intlayer projects list",
170
175
  "intlayer:doc:translate": "npx intlayer doc translate",
171
176
  "intlayer:doc:review": "npx intlayer doc review"
172
177
  }
@@ -176,3 +181,4 @@ Intlayer chấp nhận nhiều định dạng tệp cấu hình:
176
181
  >
177
182
  > - `npx intlayer list` thay vì `npx intlayer content list`
178
183
  > - `npx intlayer test` thay vì `npx intlayer content test`
184
+ > - `npx intlayer projects-list` hoặc `npx intlayer pl` thay vì `npx intlayer projects list`