@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,463 @@
1
+ ---
2
+ createdAt: 2025-12-30
3
+ updatedAt: 2025-12-30
4
+ title: Fastify 백엔드를 번역하는 방법 – i18n 가이드 2026
5
+ description: Fastify 백엔드를 다국어로 만드는 방법을 알아보세요. 국제화(i18n) 및 번역 절차를 따르세요.
6
+ keywords:
7
+ - 국제화 (i18n)
8
+ - 문서
9
+ - Intlayer
10
+ - Fastify
11
+ - JavaScript
12
+ - 백엔드
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 백엔드 웹사이트 번역하기 | 국제화(i18n)
28
+
29
+ `fastify-intlayer`은 Fastify 애플리케이션을 위한 강력한 국제화(i18n) 플러그인으로, 클라이언트의 선호에 따라 로컬라이즈된 응답을 제공하여 백엔드 서비스를 전 세계적으로 접근 가능하게 만듭니다.
30
+
31
+ ### 실용적인 사용 사례
32
+
33
+ - **사용자 언어로 백엔드 오류 표시하기**: 오류가 발생했을 때 사용자 모국어로 메시지를 표시하면 이해를 돕고 좌절감을 줄여줍니다. 이는 토스트나 모달 같은 프론트엔드 컴포넌트에 표시될 수 있는 동적 오류 메시지에 특히 유용합니다.
34
+ - **다국어 콘텐츠 제공**: 데이터베이스에서 콘텐츠를 가져오는 애플리케이션의 경우, 국제화는 이러한 콘텐츠를 여러 언어로 제공할 수 있도록 보장합니다. 이는 e-commerce 사이트나 콘텐츠 관리 시스템(CMS)처럼 제품 설명, 기사 및 기타 콘텐츠를 사용자가 선호하는 언어로 표시해야 하는 플랫폼에 매우 중요합니다.
35
+ - **다국어 이메일 발송**: 거래 관련 이메일, 마케팅 캠페인 또는 알림 등 수신자의 언어로 이메일을 발송하면 참여도와 효과를 크게 높일 수 있습니다.
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
+ ```bash packageManager="pnpm"
53
+ pnpm add intlayer fastify-intlayer
54
+ pnpm intlayer init
55
+ ```
56
+
57
+ ```bash packageManager="yarn"
58
+ yarn add intlayer fastify-intlayer
59
+ yarn intlayer init
60
+ ```
61
+
62
+ ```bash packageManager="bun"
63
+ bun add intlayer fastify-intlayer
64
+ bunx intlayer init
65
+ ```
66
+
67
+ ### 설정
68
+
69
+ 프로젝트 루트에 `intlayer.config.ts` 파일을 생성하여 국제화 설정을 구성합니다:
70
+
71
+ ```typescript fileName="intlayer.config.ts" codeFormat="typescript"
72
+ import { Locales, type IntlayerConfig } from "intlayer";
73
+
74
+ const config: IntlayerConfig = {
75
+ internationalization: {
76
+ locales: [
77
+ Locales.ENGLISH,
78
+ Locales.FRENCH,
79
+ Locales.SPANISH_MEXICO,
80
+ Locales.SPANISH_SPAIN,
81
+ ],
82
+ defaultLocale: Locales.ENGLISH,
83
+ },
84
+ };
85
+
86
+ export default config;
87
+ ```
88
+
89
+ ```javascript fileName="intlayer.config.mjs" codeFormat="esm"
90
+ import { Locales } from "intlayer";
91
+
92
+ /** @type {import('intlayer').IntlayerConfig} */
93
+ const config = {
94
+ internationalization: {
95
+ locales: [
96
+ Locales.ENGLISH,
97
+ Locales.FRENCH,
98
+ Locales.SPANISH_MEXICO,
99
+ Locales.SPANISH_SPAIN,
100
+ ],
101
+ defaultLocale: Locales.ENGLISH,
102
+ },
103
+ };
104
+
105
+ export default config;
106
+ ```
107
+
108
+ ```javascript fileName="intlayer.config.cjs" codeFormat="commonjs"
109
+ const { Locales } = require("intlayer");
110
+
111
+ /** @type {import('intlayer').IntlayerConfig} */
112
+ const config = {
113
+ internationalization: {
114
+ locales: [
115
+ Locales.ENGLISH,
116
+ Locales.FRENCH,
117
+ Locales.SPANISH_MEXICO,
118
+ Locales.SPANISH_SPAIN,
119
+ ],
120
+ defaultLocale: Locales.ENGLISH,
121
+ },
122
+ };
123
+
124
+ module.exports = config;
125
+ ```
126
+
127
+ ### 콘텐츠 선언
128
+
129
+ 번역을 저장하기 위한 콘텐츠 선언을 생성하고 관리하세요:
130
+
131
+ ```typescript fileName="src/index.content.ts" contentDeclarationFormat="typescript"
132
+ import { t, type Dictionary } from "intlayer";
133
+
134
+ const indexContent = {
135
+ key: "index",
136
+ content: {
137
+ exampleOfContent: t({
138
+ ko: "영어로 반환된 콘텐츠 예시",
139
+ en: "Example of returned content in English",
140
+ fr: "Exemple de contenu renvoyé en français",
141
+ "es-ES": "Ejemplo de contenido devuelto en español (España)",
142
+ "es-MX": "Ejemplo de contenido devuelto en español (México)",
143
+ }),
144
+ },
145
+ } satisfies Dictionary;
146
+
147
+ export default indexContent;
148
+ ```
149
+
150
+ ```javascript fileName="src/index.content.mjs" contentDeclarationFormat="esm"
151
+ import { t } from "intlayer";
152
+
153
+ typescript fileName="src/index.content.ts" contentDeclarationFormat="typescript"
154
+ import { t, type Dictionary } from "intlayer";
155
+
156
+ /** @type {import('intlayer').Dictionary} */
157
+ const indexContent = {
158
+ key: "index",
159
+ content: {
160
+ exampleOfContent: t({
161
+ ko: "영어로 반환된 콘텐츠 예시",
162
+ en: "Example of returned content in English",
163
+ fr: "Exemple de contenu renvoyé en français",
164
+ "es-ES": "Ejemplo de contenido devuelto en español (España)",
165
+ "es-MX": "Ejemplo de contenido devuelto en español (México)",
166
+ }),
167
+ },
168
+ } satisfies Dictionary;
169
+
170
+ export default indexContent;
171
+ ```
172
+
173
+ ```javascript fileName="src/index.content.cjs" contentDeclarationFormat="commonjs"
174
+ const { t } = require("intlayer");
175
+
176
+ /** 인덱스 콘텐츠의 타입을 지정합니다. @type {import('intlayer').Dictionary} */
177
+ const indexContent = {
178
+ key: "index",
179
+ content: {
180
+ exampleOfContent: t({
181
+ ko: "영어로 반환된 콘텐츠 예시",
182
+ en: "Example of returned content in English",
183
+ fr: "Exemple de contenu renvoyé en français",
184
+ "es-ES": "Ejemplo de contenido devuelto en español (España)",
185
+ "es-MX": "Ejemplo de contenido devuelto en español (México)",
186
+ }),
187
+ },
188
+ };
189
+
190
+ module.exports = indexContent;
191
+ ```
192
+
193
+ ```json fileName="src/index.content.json" contentDeclarationFormat="json"
194
+ {
195
+ "$schema": "https://intlayer.org/schema.json",
196
+ "key": "index",
197
+ "content": {
198
+ "exampleOfContent": {
199
+ "nodeType": "translation",
200
+ "translation": {
201
+ "ko": "영어로 반환된 콘텐츠 예시",
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
+ ```
211
+
212
+ > 콘텐츠 선언(content declarations)은 애플리케이션 내 어디에든 정의할 수 있으며, 단 `contentDir` 디렉터리(기본값 `./src`)에 포함되어 있어야 합니다. 또한 콘텐츠 선언 파일 확장자(기본값 `.content.{json,ts,tsx,js,jsx,mjs,mjx,cjs,cjx}`)와 일치해야 합니다.
213
+
214
+ > 자세한 내용은 [콘텐츠 선언 문서](https://github.com/aymericzip/intlayer/blob/main/docs/docs/ko/dictionary/content_file.md)를 참조하세요.
215
+
216
+ ### Fastify 애플리케이션 설정
217
+
218
+ fastify-intlayer를 사용하도록 Fastify 애플리케이션을 설정하세요:
219
+
220
+ ```typescript fileName="src/index.ts" codeFormat="typescript"
221
+ import Fastify from "fastify";
222
+ import { intlayer, t, getDictionary, getIntlayer } from "fastify-intlayer";
223
+ import dictionaryExample from "./index.content";
224
+
225
+ const fastify = Fastify({ logger: true });
226
+
227
+ javascript fileName="src/index.mjs" codeFormat="esm"
228
+ // 국제화 플러그인 로드
229
+ await fastify.register(intlayer);
230
+
231
+ // 라우트
232
+ fastify.get("/t_example", async (_req, reply) => {
233
+ return t({
234
+ ko: "영어로 반환된 콘텐츠의 예시",
235
+ en: "Example of returned content in English",
236
+ fr: "Exemple de contenu renvoyé en français",
237
+ "es-ES": "Ejemplo de contenido devuelto en español (España)",
238
+ "es-MX": "Ejemplo de contenido devuelto en español (México)",
239
+ });
240
+ });
241
+
242
+ fastify.get("/getIntlayer_example", async (_req, reply) => {
243
+ return getIntlayer("index").exampleOfContent;
244
+ });
245
+
246
+ fastify.get("/getDictionary_example", async (_req, reply) => {
247
+ return getDictionary(dictionaryExample).exampleOfContent;
248
+ });
249
+
250
+ // 서버 시작
251
+ const start = async () => {
252
+ try {
253
+ await fastify.listen({ port: 3000 });
254
+ } catch (err) {
255
+ fastify.log.error(err);
256
+ process.exit(1);
257
+ }
258
+ };
259
+
260
+ start();
261
+ ```
262
+
263
+ ```javascript fileName="src/index.mjs" codeFormat="esm"
264
+ import Fastify from "fastify";
265
+ import { intlayer, t, getDictionary, getIntlayer } from "fastify-intlayer";
266
+ import dictionaryExample from "./index.content";
267
+
268
+ const fastify = Fastify({ logger: true });
269
+
270
+ // 국제화 플러그인 로드
271
+ await fastify.register(intlayer);
272
+
273
+ // 라우트
274
+ fastify.get("/t_example", async (_req, reply) => {
275
+ return t({
276
+ ko: "영어로 반환된 콘텐츠 예시",
277
+ en: "Example of returned content in English",
278
+ fr: "Exemple de contenu renvoyé en français",
279
+ "es-ES": "Ejemplo de contenido devuelto en español (España)",
280
+ "es-MX": "Ejemplo de contenido devuelto en español (México)",
281
+ });
282
+ });
283
+
284
+ fastify.get("/getIntlayer_example", async (_req, reply) => {
285
+ return getIntlayer("index").exampleOfContent;
286
+ });
287
+
288
+ fastify.get("/getDictionary_example", async (_req, reply) => {
289
+ return getDictionary(dictionaryExample).exampleOfContent;
290
+ });
291
+
292
+ // 서버 시작
293
+ const start = async () => {
294
+ try {
295
+ await fastify.listen({ port: 3000 });
296
+ } catch (err) {
297
+ fastify.log.error(err);
298
+ process.exit(1);
299
+ }
300
+ };
301
+
302
+ start();
303
+ ```
304
+
305
+ ```javascript fileName="src/index.cjs" codeFormat="commonjs"
306
+ const Fastify = require("fastify");
307
+ const { intlayer, t, getDictionary, getIntlayer } = require("fastify-intlayer");
308
+ const dictionaryExample = require("./index.content");
309
+
310
+ const fastify = Fastify({ logger: true });
311
+
312
+ // async/await를 위한 서버 시작 래퍼
313
+ const start = async () => {
314
+ try {
315
+ // 국제화 플러그인 로드
316
+ await fastify.register(intlayer);
317
+
318
+ // 라우트
319
+ fastify.get("/t_example", async (_req, reply) => {
320
+ return t({
321
+ ko: "반환된 콘텐츠 예시 (한국어)",
322
+ en: "Example of returned content in English",
323
+ fr: "Exemple de contenu renvoyé en français",
324
+ "es-ES": "Ejemplo de contenido devuelto en español (España)",
325
+ "es-MX": "Ejemplo de contenido devuelto en español (México)",
326
+ });
327
+ });
328
+
329
+ fastify.get("/getIntlayer_example", async (_req, reply) => {
330
+ return getIntlayer("index").exampleOfContent;
331
+ });
332
+
333
+ fastify.get("/getDictionary_example", async (_req, reply) => {
334
+ return getDictionary(dictionaryExample).exampleOfContent;
335
+ });
336
+
337
+ await fastify.listen({ port: 3000 });
338
+ } catch (err) {
339
+ fastify.log.error(err);
340
+ process.exit(1);
341
+ }
342
+ };
343
+
344
+ start();
345
+ ```
346
+
347
+ ### 호환성
348
+
349
+ `fastify-intlayer`은 다음과 완전히 호환됩니다:
350
+
351
+ - [`react-intlayer`](<https://www.google.com/search?q=%5Bhttps://github.com/aymericzip/intlayer/blob/main/docs/docs/ko/packages/react-intlayer/index.md%5D(https://github.com/aymericzip/intlayer/blob/main/docs/docs/ko/packages/react-intlayer/index.md)>) React 애플리케이션용
352
+ - [`next-intlayer`](<https://www.google.com/search?q=%5Bhttps://github.com/aymericzip/intlayer/blob/main/docs/docs/ko/packages/next-intlayer/index.md%5D(https://github.com/aymericzip/intlayer/blob/main/docs/docs/ko/packages/next-intlayer/index.md)>) Next.js 애플리케이션용
353
+
354
+ - [`react-intlayer`](<https://www.google.com/search?q=%5Bhttps://github.com/aymericzip/intlayer/blob/main/docs/docs/ko/packages/react-intlayer/index.md%5D(https://github.com/aymericzip/intlayer/blob/main/docs/docs/ko/packages/react-intlayer/index.md)>) React 애플리케이션용
355
+ - [`next-intlayer`](<https://www.google.com/search?q=%5Bhttps://github.com/aymericzip/intlayer/blob/main/docs/docs/ko/packages/next-intlayer/index.md%5D(https://github.com/aymericzip/intlayer/blob/main/docs/docs/ko/packages/next-intlayer/index.md)>) Next.js 애플리케이션용
356
+ - [`vite-intlayer`](<https://www.google.com/search?q=%5Bhttps://github.com/aymericzip/intlayer/blob/main/docs/docs/ko/packages/vite-intlayer/index.md%5D(https://github.com/aymericzip/intlayer/blob/main/docs/docs/ko/packages/vite-intlayer/index.md)>) for Vite 애플리케이션용
357
+
358
+ 또한 브라우저와 API 요청을 포함한 다양한 환경에서 어떤 국제화 솔루션과도 원활하게 작동합니다. 미들웨어를 통해 헤더나 쿠키로 로케일을 감지하도록 커스터마이즈할 수 있습니다:
359
+
360
+ ```typescript fileName="intlayer.config.ts" codeFormat="typescript"
361
+ import { Locales, type IntlayerConfig } from "intlayer";
362
+
363
+ const config: IntlayerConfig = {
364
+ // ... 기타 구성 옵션
365
+ middleware: {
366
+ headerName: "my-locale-header",
367
+ cookieName: "my-locale-cookie",
368
+ },
369
+ };
370
+
371
+ export default config;
372
+ ```
373
+
374
+ ```javascript fileName="intlayer.config.mjs" codeFormat="esm"
375
+ import { Locales } from "intlayer";
376
+
377
+ /** @type {import('intlayer').IntlayerConfig} */
378
+ const config = {
379
+ // ... 기타 구성 옵션
380
+ middleware: {
381
+ headerName: "my-locale-header",
382
+ cookieName: "my-locale-cookie",
383
+ },
384
+ };
385
+
386
+ export default config;
387
+ ```
388
+
389
+ ```javascript fileName="intlayer.config.mjs" codeFormat="esm"
390
+ import { Locales } from "intlayer";
391
+
392
+ /** @type {import('intlayer').IntlayerConfig} */
393
+ const config = {
394
+ // ... 기타 구성 옵션
395
+ middleware: {
396
+ headerName: "my-locale-header",
397
+ cookieName: "my-locale-cookie",
398
+ },
399
+ };
400
+
401
+ export default config;
402
+ ```
403
+
404
+ ```javascript fileName="intlayer.config.cjs" codeFormat="commonjs"
405
+ const { Locales } = require("intlayer");
406
+
407
+ /** @type {import('intlayer').IntlayerConfig} */
408
+ const config = {
409
+ // ... 기타 구성 옵션
410
+ middleware: {
411
+ headerName: "my-locale-header",
412
+ cookieName: "my-locale-cookie",
413
+ },
414
+ };
415
+
416
+ module.exports = config;
417
+ ```
418
+
419
+ 기본적으로 `fastify-intlayer`는 클라이언트의 선호 언어를 결정하기 위해 `Accept-Language` 헤더를 해석합니다.
420
+
421
+ > 구성 및 고급 주제에 대한 자세한 내용은 [문서](https://github.com/aymericzip/intlayer/blob/main/docs/docs/ko/configuration.md)를 참조하세요.
422
+
423
+ ### TypeScript 구성
424
+
425
+ `fastify-intlayer`는 국제화 프로세스를 향상시키기 위해 TypeScript의 강력한 기능을 활용합니다. TypeScript의 정적 타이핑은 모든 번역 키가 타입으로 관리되도록 보장하여 누락된 번역의 위험을 줄이고 유지보수성을 향상시킵니다.
426
+
427
+ 자동 생성된 타입(기본 경로: ./types/intlayer.d.ts)이 tsconfig.json 파일에 포함되어 있는지 확인하세요.
428
+
429
+ ```json5 fileName="tsconfig.json"
430
+ {
431
+ // ... 기존 TypeScript 구성
432
+ "include": [
433
+ // ... 기존 TypeScript 구성
434
+ ".intlayer/**/*.ts", // 자동 생성된 타입 포함
435
+ ],
436
+ }
437
+ ```
438
+
439
+ ### VS Code 확장
440
+
441
+ Intlayer 개발 경험을 향상시키려면 공식 **Intlayer VS Code Extension**을 설치할 수 있습니다.
442
+
443
+ [VS Code Marketplace에서 설치](https://marketplace.visualstudio.com/items?itemName=intlayer.intlayer-vs-code-extension)
444
+
445
+ 이 확장 기능은 다음을 제공합니다:
446
+
447
+ - **번역 키에 대한 자동 완성**
448
+ - **누락된 번역에 대한 실시간 오류 감지**
449
+ - **번역된 콘텐츠의 인라인 미리보기**
450
+ - **번역을 손쉽게 생성하고 업데이트할 수 있는 빠른 작업(Quick actions)**
451
+
452
+ 확장 기능 사용 방법에 대한 자세한 내용은 [Intlayer VS Code Extension 문서](https://intlayer.org/doc/vs-code-extension)를 참조하세요.
453
+
454
+ ### Git 설정
455
+
456
+ Intlayer에서 생성된 파일은 무시(ignored)하는 것을 권장합니다. 이렇게 하면 해당 파일들이 Git 리포지토리에 커밋되는 것을 방지할 수 있습니다.
457
+
458
+ 이를 위해 다음 지침을 `.gitignore` 파일에 추가할 수 있습니다:
459
+
460
+ ```plaintext fileName=".gitignore"
461
+ # Intlayer에서 생성된 파일 무시
462
+ .intlayer
463
+ ```
package/docs/ko/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="기능" 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"> | **JavaScript 기반 콘텐츠 관리**<br><br>JavaScript의 유연성을 활용하여 콘텐츠를 효율적으로 정의하고 관리하세요. <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"> | **JavaScript 기반 콘텐츠 관리**<br><br>JavaScript의 유연성을 활용하여 콘텐츠를 효율적으로 정의하고 관리하세요. <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="기능" width="700"> | **간편한 설정**<br><br>최소한의 구성으로 빠르게 시작하세요. 국제화, 라우팅, AI, 빌드 및 콘텐츠 처리 설정을 손쉽게 조정할 수 있습니다. <br><br> - [Next.js 통합 탐색](https://intlayer.org/doc/environment/nextjs) |
@@ -0,0 +1,137 @@
1
+ ---
2
+ createdAt: 2026-01-06
3
+ updatedAt: 2026-01-06
4
+ title: Polecenie CI
5
+ description: Dowiedz się, jak używać polecenia Intlayer CI do uruchamiania poleceń Intlayer z automatycznie wstrzykiwanymi poświadczeniami w pipeline'ach CI/CD i monorepo.
6
+ keywords:
7
+ - CI
8
+ - CI/CD
9
+ - Automatyzacja
10
+ - Monorepo
11
+ - Poświadczenia
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: Dodaj polecenie CI
23
+ ---
24
+
25
+ # Polecenie CI
26
+
27
+ ```bash
28
+ npx intlayer ci <command...>
29
+ ```
30
+
31
+ Polecenie CI jest zaprojektowane do automatyzacji i pipeline'ów CI/CD. Automatycznie wstrzykuje poświadczenia ze zmiennej środowiskowej `INTLAYER_PROJECT_CREDENTIALS` i może uruchamiać polecenia Intlayer w wielu projektach w monorepo.
32
+
33
+ ## Jak działa
34
+
35
+ Polecenie CI działa w dwóch trybach:
36
+
37
+ 1. **Tryb pojedynczego projektu**: Jeśli bieżący katalog roboczy pasuje do jednej ze ścieżek projektu w `INTLAYER_PROJECT_CREDENTIALS`, uruchamia polecenie tylko dla tego konkretnego projektu.
38
+
39
+ 2. **Tryb iteracji**: Jeśli nie wykryto określonego kontekstu projektu, iteruje po wszystkich skonfigurowanych projektach i uruchamia polecenie dla każdego z nich.
40
+
41
+ ## Zmienna środowiskowa
42
+
43
+ Polecenie wymaga ustawienia zmiennej środowiskowej `INTLAYER_PROJECT_CREDENTIALS`. Ta zmienna powinna zawierać obiekt JSON mapujący ścieżki projektów na ich poświadczenia:
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
+ ## Wykrywanie menedżera pakietów
59
+
60
+ Polecenie CI automatycznie wykrywa, który menedżer pakietów jest używany (npm, yarn, pnpm lub bun) na podstawie zmiennej środowiskowej `npm_config_user_agent` i używa odpowiedniego polecenia do wykonania Intlayer.
61
+
62
+ ## Argumenty
63
+
64
+ - **`<command...>`**: Polecenie Intlayer do wykonania (np. `fill`, `push`, `build`). Możesz przekazać dowolne polecenie Intlayer i jego argumenty.
65
+
66
+ > Przykład: `npx intlayer ci fill --verbose`
67
+ >
68
+ > Przykład: `npx intlayer ci push`
69
+ >
70
+ > Przykład: `npx intlayer ci build --watch`
71
+
72
+ ## Przykłady
73
+
74
+ ### Uruchomienie polecenia w trybie pojedynczego projektu
75
+
76
+ Jeśli jesteś w katalogu projektu, który pasuje do jednej ze ścieżek w `INTLAYER_PROJECT_CREDENTIALS`:
77
+
78
+ ```bash
79
+ cd packages/app
80
+ npx intlayer ci fill
81
+ ```
82
+
83
+ To uruchomi polecenie `fill` z poświadczeniami automatycznie wstrzykniętymi dla projektu `packages/app`.
84
+
85
+ ### Uruchomienie polecenia we wszystkich projektach
86
+
87
+ Jeśli jesteś w katalogu, który nie pasuje do żadnej ścieżki projektu, polecenie będzie iterować po wszystkich skonfigurowanych projektach:
88
+
89
+ ```bash
90
+ cd /path/to/monorepo
91
+ npx intlayer ci push
92
+ ```
93
+
94
+ To uruchomi polecenie `push` dla każdego projektu skonfigurowanego w `INTLAYER_PROJECT_CREDENTIALS`.
95
+
96
+ ### Przekazywanie dodatkowych flag
97
+
98
+ Możesz przekazać dowolne flagi do podstawowego polecenia Intlayer:
99
+
100
+ ```bash
101
+ npx intlayer ci fill --verbose --mode complete
102
+ ```
103
+
104
+ ### Użycie w pipeline'ach CI/CD
105
+
106
+ W konfiguracji CI/CD (np. GitHub Actions, GitLab CI) ustaw `INTLAYER_PROJECT_CREDENTIALS` jako sekret:
107
+
108
+ ```yaml
109
+ # Przykład GitHub Actions
110
+ env:
111
+ INTLAYER_PROJECT_CREDENTIALS: ${{ secrets.INTLAYER_PROJECT_CREDENTIALS }}
112
+
113
+ steps:
114
+ - name: Wypełnij słowniki
115
+ run: npx intlayer ci fill
116
+ ```
117
+
118
+ ## Obsługa błędów
119
+
120
+ - Jeśli `INTLAYER_PROJECT_CREDENTIALS` nie jest ustawiona, polecenie zakończy się błędem.
121
+ - Jeśli `INTLAYER_PROJECT_CREDENTIALS` nie jest prawidłowym JSON, polecenie zakończy się błędem.
122
+ - Jeśli ścieżka projektu nie istnieje, zostanie pominięta z ostrzeżeniem.
123
+ - Jeśli jakikolwiek projekt się nie powiedzie, polecenie zakończy się niezerowym kodem statusu.
124
+
125
+ ## Przypadki użycia
126
+
127
+ - **Automatyzacja monorepo**: Uruchamianie poleceń Intlayer w wielu projektach w monorepo
128
+ - **Pipeline'y CI/CD**: Automatyzacja zarządzania słownikami w przepływach pracy ciągłej integracji
129
+ - **Operacje masowe**: Wykonywanie tej samej operacji na wielu projektach Intlayer jednocześnie
130
+ - **Zarządzanie sekretami**: Bezpieczne zarządzanie poświadczeniami dla wielu projektów przy użyciu zmiennych środowiskowych
131
+
132
+ ## Najlepsze praktyki bezpieczeństwa
133
+
134
+ - Przechowuj `INTLAYER_PROJECT_CREDENTIALS` jako zaszyfrowane sekrety w swojej platformie CI/CD
135
+ - Nigdy nie commituj poświadczeń do kontroli wersji
136
+ - Używaj poświadczeń specyficznych dla środowiska dla różnych środowisk wdrożeniowych
137
+ - Regularnie rotuj poświadczenia
@@ -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: Odkryj, jak używać Intlayer CLI do zarządzania Twoją wielojęzyczną stroną internetową. Postępuj zgodnie z krokami w tej dokumentacji online, aby skonfigurować swój projekt w kilka minut.
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: Dodano polecenie projects list
20
23
  - version: 7.5.9
21
24
  date: 2025-12-30
22
25
  changes: Dodano polecenie init
@@ -119,6 +122,7 @@ Aby zobaczyć, jak skonfigurować dostępne lokalizacje lub inne parametry, zapo
119
122
  - **[Build Dictionaries](https://github.com/aymericzip/intlayer/blob/main/docs/docs/pl/cli/build.md)** - Buduj swoje słowniki z plików deklaracji treści
120
123
  - **[Watch Dictionaries](https://github.com/aymericzip/intlayer/blob/main/docs/docs/pl/cli/watch.md)** - Obserwuj zmiany i automatycznie buduj słowniki
121
124
  - **[Check CLI Version](https://github.com/aymericzip/intlayer/blob/main/docs/docs/pl/cli/version.md)** - Sprawdź zainstalowaną wersję CLI Intlayer
125
+ - **[Lista projektów](https://github.com/aymericzip/intlayer/blob/main/docs/docs/pl/cli/list_projects.md)** - Wyświetl listę wszystkich projektów Intlayer w katalogu lub repozytorium git
122
126
 
123
127
  ### Zarządzanie słownikami
124
128
 
@@ -166,6 +170,7 @@ Aby zobaczyć, jak skonfigurować dostępne lokalizacje lub inne parametry, zapo
166
170
  "intlayer:list": "npx intlayer content list",
167
171
  "intlayer:test": "npx intlayer content test",
168
172
  "intlayer:transform": "npx intlayer transform",
173
+ "intlayer:projects": "npx intlayer projects list",
169
174
  "intlayer:doc:translate": "npx intlayer doc translate",
170
175
  "intlayer:doc:review": "npx intlayer doc review"
171
176
  }
@@ -175,3 +180,4 @@ Aby zobaczyć, jak skonfigurować dostępne lokalizacje lub inne parametry, zapo
175
180
  >
176
181
  > - `npx intlayer list` zamiast `npx intlayer content list`
177
182
  > - `npx intlayer test` zamiast `npx intlayer content test`
183
+ > - `npx intlayer projects-list` lub `npx intlayer pl` zamiast `npx intlayer projects list`