@intlayer/docs 7.5.12 → 7.5.14

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 (229) hide show
  1. package/blog/ar/per-component_vs_centralized_i18n.md +248 -0
  2. package/blog/de/per-component_vs_centralized_i18n.md +248 -0
  3. package/blog/en/_per-component_vs_centralized_i18n.md +252 -0
  4. package/blog/en/per-component_vs_centralized_i18n.md +248 -0
  5. package/blog/en-GB/per-component_vs_centralized_i18n.md +247 -0
  6. package/blog/es/per-component_vs_centralized_i18n.md +245 -0
  7. package/blog/fr/per-component_vs_centralized_i18n.md +245 -0
  8. package/blog/hi/per-component_vs_centralized_i18n.md +249 -0
  9. package/blog/id/per-component_vs_centralized_i18n.md +248 -0
  10. package/blog/it/per-component_vs_centralized_i18n.md +247 -0
  11. package/blog/ja/per-component_vs_centralized_i18n.md +247 -0
  12. package/blog/ko/per-component_vs_centralized_i18n.md +246 -0
  13. package/blog/pl/per-component_vs_centralized_i18n.md +247 -0
  14. package/blog/pt/per-component_vs_centralized_i18n.md +246 -0
  15. package/blog/ru/per-component_vs_centralized_i18n.md +251 -0
  16. package/blog/tr/per-component_vs_centralized_i18n.md +244 -0
  17. package/blog/uk/compiler_vs_declarative_i18n.md +224 -0
  18. package/blog/uk/i18n_using_next-i18next.md +1086 -0
  19. package/blog/uk/i18n_using_next-intl.md +760 -0
  20. package/blog/uk/index.md +69 -0
  21. package/blog/uk/internationalization_and_SEO.md +273 -0
  22. package/blog/uk/intlayer_with_i18next.md +211 -0
  23. package/blog/uk/intlayer_with_next-i18next.md +202 -0
  24. package/blog/uk/intlayer_with_next-intl.md +203 -0
  25. package/blog/uk/intlayer_with_react-i18next.md +200 -0
  26. package/blog/uk/intlayer_with_react-intl.md +202 -0
  27. package/blog/uk/intlayer_with_vue-i18n.md +206 -0
  28. package/blog/uk/l10n_platform_alternative/Lokalise.md +80 -0
  29. package/blog/uk/l10n_platform_alternative/crowdin.md +80 -0
  30. package/blog/uk/l10n_platform_alternative/phrase.md +78 -0
  31. package/blog/uk/list_i18n_technologies/CMS/drupal.md +143 -0
  32. package/blog/uk/list_i18n_technologies/CMS/wix.md +167 -0
  33. package/blog/uk/list_i18n_technologies/CMS/wordpress.md +189 -0
  34. package/blog/uk/list_i18n_technologies/frameworks/angular.md +125 -0
  35. package/blog/uk/list_i18n_technologies/frameworks/flutter.md +128 -0
  36. package/blog/uk/list_i18n_technologies/frameworks/react-native.md +217 -0
  37. package/blog/uk/list_i18n_technologies/frameworks/react.md +155 -0
  38. package/blog/uk/list_i18n_technologies/frameworks/svelte.md +145 -0
  39. package/blog/uk/list_i18n_technologies/frameworks/vue.md +144 -0
  40. package/blog/uk/next-i18next_vs_next-intl_vs_intlayer.md +1499 -0
  41. package/blog/uk/nextjs-multilingual-seo-comparison.md +360 -0
  42. package/blog/uk/per-component_vs_centralized_i18n.md +248 -0
  43. package/blog/uk/rag_powered_documentation_assistant.md +288 -0
  44. package/blog/uk/react-i18next_vs_react-intl_vs_intlayer.md +164 -0
  45. package/blog/uk/vue-i18n_vs_intlayer.md +279 -0
  46. package/blog/uk/what_is_internationalization.md +167 -0
  47. package/blog/vi/per-component_vs_centralized_i18n.md +246 -0
  48. package/blog/zh/per-component_vs_centralized_i18n.md +248 -0
  49. package/dist/cjs/common.cjs.map +1 -1
  50. package/dist/cjs/generated/blog.entry.cjs +20 -0
  51. package/dist/cjs/generated/blog.entry.cjs.map +1 -1
  52. package/dist/cjs/generated/docs.entry.cjs.map +1 -1
  53. package/dist/cjs/generated/frequentQuestions.entry.cjs +20 -0
  54. package/dist/cjs/generated/frequentQuestions.entry.cjs.map +1 -1
  55. package/dist/cjs/generated/legal.entry.cjs.map +1 -1
  56. package/dist/esm/common.mjs.map +1 -1
  57. package/dist/esm/generated/blog.entry.mjs +20 -0
  58. package/dist/esm/generated/blog.entry.mjs.map +1 -1
  59. package/dist/esm/generated/docs.entry.mjs.map +1 -1
  60. package/dist/esm/generated/frequentQuestions.entry.mjs +20 -0
  61. package/dist/esm/generated/frequentQuestions.entry.mjs.map +1 -1
  62. package/dist/esm/generated/legal.entry.mjs.map +1 -1
  63. package/dist/types/generated/blog.entry.d.ts +1 -0
  64. package/dist/types/generated/blog.entry.d.ts.map +1 -1
  65. package/dist/types/generated/frequentQuestions.entry.d.ts +1 -0
  66. package/dist/types/generated/frequentQuestions.entry.d.ts.map +1 -1
  67. package/docs/ar/configuration.md +6 -1
  68. package/docs/ar/dictionary/content_file.md +6 -1
  69. package/docs/de/configuration.md +6 -1
  70. package/docs/de/dictionary/content_file.md +6 -1
  71. package/docs/en/configuration.md +6 -1
  72. package/docs/en/dictionary/content_file.md +6 -1
  73. package/docs/en-GB/configuration.md +6 -1
  74. package/docs/en-GB/dictionary/content_file.md +3 -1
  75. package/docs/es/configuration.md +6 -1
  76. package/docs/es/dictionary/content_file.md +6 -1
  77. package/docs/fr/configuration.md +6 -1
  78. package/docs/fr/dictionary/content_file.md +3 -1
  79. package/docs/hi/configuration.md +6 -1
  80. package/docs/hi/dictionary/content_file.md +3 -1
  81. package/docs/id/configuration.md +6 -1
  82. package/docs/id/dictionary/content_file.md +3 -1
  83. package/docs/it/configuration.md +6 -1
  84. package/docs/it/dictionary/content_file.md +3 -1
  85. package/docs/ja/configuration.md +6 -1
  86. package/docs/ja/dictionary/content_file.md +3 -1
  87. package/docs/ko/configuration.md +6 -1
  88. package/docs/ko/dictionary/content_file.md +3 -1
  89. package/docs/pl/configuration.md +3 -1
  90. package/docs/pl/dictionary/content_file.md +3 -1
  91. package/docs/pt/configuration.md +6 -1
  92. package/docs/pt/dictionary/content_file.md +3 -1
  93. package/docs/ru/configuration.md +6 -1
  94. package/docs/ru/dictionary/content_file.md +6 -1
  95. package/docs/tr/configuration.md +6 -1
  96. package/docs/tr/dictionary/content_file.md +3 -1
  97. package/docs/uk/CI_CD.md +198 -0
  98. package/docs/uk/autoFill.md +307 -0
  99. package/docs/uk/bundle_optimization.md +185 -0
  100. package/docs/uk/cli/build.md +64 -0
  101. package/docs/uk/cli/ci.md +137 -0
  102. package/docs/uk/cli/configuration.md +63 -0
  103. package/docs/uk/cli/debug.md +46 -0
  104. package/docs/uk/cli/doc-review.md +43 -0
  105. package/docs/uk/cli/doc-translate.md +132 -0
  106. package/docs/uk/cli/editor.md +28 -0
  107. package/docs/uk/cli/fill.md +130 -0
  108. package/docs/uk/cli/index.md +190 -0
  109. package/docs/uk/cli/init.md +84 -0
  110. package/docs/uk/cli/list.md +90 -0
  111. package/docs/uk/cli/list_projects.md +128 -0
  112. package/docs/uk/cli/live.md +41 -0
  113. package/docs/uk/cli/login.md +157 -0
  114. package/docs/uk/cli/pull.md +78 -0
  115. package/docs/uk/cli/push.md +98 -0
  116. package/docs/uk/cli/sdk.md +71 -0
  117. package/docs/uk/cli/test.md +76 -0
  118. package/docs/uk/cli/transform.md +65 -0
  119. package/docs/uk/cli/version.md +24 -0
  120. package/docs/uk/cli/watch.md +37 -0
  121. package/docs/uk/configuration.md +742 -0
  122. package/docs/uk/dictionary/condition.md +237 -0
  123. package/docs/uk/dictionary/content_file.md +1134 -0
  124. package/docs/uk/dictionary/enumeration.md +245 -0
  125. package/docs/uk/dictionary/file.md +232 -0
  126. package/docs/uk/dictionary/function_fetching.md +212 -0
  127. package/docs/uk/dictionary/gender.md +273 -0
  128. package/docs/uk/dictionary/insertion.md +187 -0
  129. package/docs/uk/dictionary/markdown.md +383 -0
  130. package/docs/uk/dictionary/nesting.md +273 -0
  131. package/docs/uk/dictionary/translation.md +332 -0
  132. package/docs/uk/formatters.md +595 -0
  133. package/docs/uk/how_works_intlayer.md +256 -0
  134. package/docs/uk/index.md +175 -0
  135. package/docs/uk/interest_of_intlayer.md +297 -0
  136. package/docs/uk/intlayer_CMS.md +569 -0
  137. package/docs/uk/intlayer_visual_editor.md +292 -0
  138. package/docs/uk/intlayer_with_angular.md +710 -0
  139. package/docs/uk/intlayer_with_astro.md +256 -0
  140. package/docs/uk/intlayer_with_create_react_app.md +1258 -0
  141. package/docs/uk/intlayer_with_express.md +429 -0
  142. package/docs/uk/intlayer_with_fastify.md +446 -0
  143. package/docs/uk/intlayer_with_lynx+react.md +548 -0
  144. package/docs/uk/intlayer_with_nestjs.md +283 -0
  145. package/docs/uk/intlayer_with_next-i18next.md +640 -0
  146. package/docs/uk/intlayer_with_next-intl.md +456 -0
  147. package/docs/uk/intlayer_with_nextjs_page_router.md +1541 -0
  148. package/docs/uk/intlayer_with_nuxt.md +711 -0
  149. package/docs/uk/intlayer_with_react_router_v7.md +600 -0
  150. package/docs/uk/intlayer_with_react_router_v7_fs_routes.md +669 -0
  151. package/docs/uk/intlayer_with_svelte_kit.md +579 -0
  152. package/docs/uk/intlayer_with_tanstack.md +818 -0
  153. package/docs/uk/intlayer_with_vite+preact.md +1748 -0
  154. package/docs/uk/intlayer_with_vite+react.md +1449 -0
  155. package/docs/uk/intlayer_with_vite+solid.md +302 -0
  156. package/docs/uk/intlayer_with_vite+svelte.md +520 -0
  157. package/docs/uk/intlayer_with_vite+vue.md +1113 -0
  158. package/docs/uk/introduction.md +222 -0
  159. package/docs/uk/locale_mapper.md +242 -0
  160. package/docs/uk/mcp_server.md +211 -0
  161. package/docs/uk/packages/express-intlayer/t.md +465 -0
  162. package/docs/uk/packages/intlayer/getEnumeration.md +159 -0
  163. package/docs/uk/packages/intlayer/getHTMLTextDir.md +121 -0
  164. package/docs/uk/packages/intlayer/getLocaleLang.md +81 -0
  165. package/docs/uk/packages/intlayer/getLocaleName.md +135 -0
  166. package/docs/uk/packages/intlayer/getLocalizedUrl.md +338 -0
  167. package/docs/uk/packages/intlayer/getMultilingualUrls.md +359 -0
  168. package/docs/uk/packages/intlayer/getPathWithoutLocale.md +75 -0
  169. package/docs/uk/packages/intlayer/getPrefix.md +213 -0
  170. package/docs/uk/packages/intlayer/getTranslation.md +190 -0
  171. package/docs/uk/packages/intlayer/getTranslationContent.md +189 -0
  172. package/docs/uk/packages/next-intlayer/t.md +365 -0
  173. package/docs/uk/packages/next-intlayer/useDictionary.md +276 -0
  174. package/docs/uk/packages/next-intlayer/useIntlayer.md +263 -0
  175. package/docs/uk/packages/next-intlayer/useLocale.md +166 -0
  176. package/docs/uk/packages/react-intlayer/t.md +311 -0
  177. package/docs/uk/packages/react-intlayer/useDictionary.md +295 -0
  178. package/docs/uk/packages/react-intlayer/useI18n.md +250 -0
  179. package/docs/uk/packages/react-intlayer/useIntlayer.md +251 -0
  180. package/docs/uk/packages/react-intlayer/useLocale.md +210 -0
  181. package/docs/uk/per_locale_file.md +345 -0
  182. package/docs/uk/plugins/sync-json.md +398 -0
  183. package/docs/uk/readme.md +265 -0
  184. package/docs/uk/releases/v6.md +305 -0
  185. package/docs/uk/releases/v7.md +624 -0
  186. package/docs/uk/roadmap.md +346 -0
  187. package/docs/uk/testing.md +204 -0
  188. package/docs/vi/configuration.md +6 -1
  189. package/docs/vi/dictionary/content_file.md +6 -1
  190. package/docs/zh/configuration.md +6 -1
  191. package/docs/zh/dictionary/content_file.md +6 -1
  192. package/frequent_questions/ar/error-vite-env-only.md +77 -0
  193. package/frequent_questions/de/error-vite-env-only.md +77 -0
  194. package/frequent_questions/en/error-vite-env-only.md +77 -0
  195. package/frequent_questions/en-GB/error-vite-env-only.md +77 -0
  196. package/frequent_questions/es/error-vite-env-only.md +76 -0
  197. package/frequent_questions/fr/error-vite-env-only.md +77 -0
  198. package/frequent_questions/hi/error-vite-env-only.md +77 -0
  199. package/frequent_questions/id/error-vite-env-only.md +77 -0
  200. package/frequent_questions/it/error-vite-env-only.md +77 -0
  201. package/frequent_questions/ja/error-vite-env-only.md +77 -0
  202. package/frequent_questions/ko/error-vite-env-only.md +77 -0
  203. package/frequent_questions/pl/error-vite-env-only.md +77 -0
  204. package/frequent_questions/pt/error-vite-env-only.md +77 -0
  205. package/frequent_questions/ru/error-vite-env-only.md +77 -0
  206. package/frequent_questions/tr/error-vite-env-only.md +77 -0
  207. package/frequent_questions/uk/SSR_Next_no_[locale].md +104 -0
  208. package/frequent_questions/uk/array_as_content_declaration.md +72 -0
  209. package/frequent_questions/uk/build_dictionaries.md +58 -0
  210. package/frequent_questions/uk/build_error_CI_CD.md +74 -0
  211. package/frequent_questions/uk/bun_set_up.md +53 -0
  212. package/frequent_questions/uk/customized_locale_list.md +64 -0
  213. package/frequent_questions/uk/domain_routing.md +113 -0
  214. package/frequent_questions/uk/error-vite-env-only.md +77 -0
  215. package/frequent_questions/uk/esbuild_error.md +29 -0
  216. package/frequent_questions/uk/get_locale_cookie.md +142 -0
  217. package/frequent_questions/uk/intlayer_command_undefined.md +155 -0
  218. package/frequent_questions/uk/locale_incorect_in_url.md +73 -0
  219. package/frequent_questions/uk/package_version_error.md +181 -0
  220. package/frequent_questions/uk/static_rendering.md +44 -0
  221. package/frequent_questions/uk/translated_path_url.md +55 -0
  222. package/frequent_questions/uk/unknown_command.md +97 -0
  223. package/frequent_questions/vi/error-vite-env-only.md +77 -0
  224. package/frequent_questions/zh/error-vite-env-only.md +77 -0
  225. package/legal/uk/privacy_notice.md +83 -0
  226. package/legal/uk/terms_of_service.md +55 -0
  227. package/package.json +9 -9
  228. package/src/generated/blog.entry.ts +20 -0
  229. package/src/generated/frequentQuestions.entry.ts +20 -0
@@ -0,0 +1,222 @@
1
+ ---
2
+ createdAt: 2025-08-23
3
+ updatedAt: 2025-08-23
4
+ title: Вступ
5
+ description: Дізнайтеся, як працює Intlayer. Перегляньте кроки, які Intlayer виконує у вашому застосунку. Дізнайтеся, що роблять різні пакети.
6
+ keywords:
7
+ - Вступ
8
+ - Початок роботи
9
+ - Intlayer
10
+ - Застосунок
11
+ - Пакети
12
+ slugs:
13
+ - doc
14
+ - get-started
15
+ history:
16
+ - version: 5.5.10
17
+ date: 2025-06-29
18
+ changes: Init history
19
+ ---
20
+
21
+ # Документація Intlayer
22
+
23
+ Ласкаво просимо до офіційної документації Intlayer! Тут ви знайдете все, що потрібно для інтеграції, конфігурації та опанування Intlayer для всіх ваших потреб з інтернаціоналізації (i18n), незалежно від того, працюєте ви з Next.js, React, Vite, Express або іншим JavaScript-середовищем.
24
+
25
+ ## Вступ
26
+
27
+ ### Що таке Intlayer?
28
+
29
+ **Intlayer** — бібліотека інтернаціоналізації (i18n), розроблена спеціально для JavaScript-розробників. Вона дозволяє оголошувати ваш контент у будь-якому місці коду. Intlayer перетворює оголошення багатомовного контенту на структуровані словники, щоб їх було легко інтегрувати у ваш код. Використовуючи TypeScript, **Intlayer** робить розробку більш надійною та ефективною.
30
+
31
+ Intlayer також надає необов'язковий візуальний редактор, який дозволяє легко редагувати та керувати контентом. Цей редактор особливо корисний для розробників, які віддають перевагу візуальному інтерфейсу для управління контентом, або для команд, що генерують контент без необхідності працювати з кодом.
32
+
33
+ ### Приклад використання
34
+
35
+ ```bash
36
+ .
37
+ └── Components
38
+ └── MyComponent
39
+ ├── index.content.ts
40
+ └── index.tsx
41
+ ```
42
+
43
+ ```tsx fileName="src/components/MyComponent/index.content.ts" contentDeclarationFormat="typescript"
44
+ import { t, type Dictionary } from "intlayer";
45
+
46
+ const componentContent = {
47
+ key: "component-key",
48
+ content: {
49
+ myTranslatedContent: t({
50
+ uk: "Привіт, світ",
51
+ en: "Hello World",
52
+ es: "Hola Mundo",
53
+ fr: "Bonjour le monde",
54
+ }),
55
+ },
56
+ } satisfies Dictionary;
57
+
58
+ export default componentContent;
59
+ ```
60
+
61
+ ```javascript fileName="src/components/MyComponent/index.content.mjs" contentDeclarationFormat="esm"
62
+ import { t } from "intlayer";
63
+
64
+ /** @type {import('intlayer').Dictionary} */
65
+ const componentContent = {
66
+ key: "component-key",
67
+ content: {
68
+ myTranslatedContent: t({
69
+ uk: "Привіт, світ",
70
+ en: "Hello World",
71
+ es: "Hola Mundo",
72
+ fr: "Bonjour le monde",
73
+ }),
74
+ },
75
+ };
76
+
77
+ export default componentContent;
78
+ ```
79
+
80
+ ```javascript fileName="src/components/MyComponent/index.content.cjs" contentDeclarationFormat="commonjs"
81
+ const { t } = require("intlayer");
82
+
83
+ /** @type {import('intlayer').Dictionary} */
84
+ // Тип: import('intlayer').Dictionary
85
+ const componentContent = {
86
+ key: "component-key",
87
+ content: {
88
+ myTranslatedContent: t({
89
+ uk: "Привіт, світ",
90
+ en: "Hello World",
91
+ es: "Hola Mundo",
92
+ fr: "Bonjour le monde",
93
+ }),
94
+ },
95
+ };
96
+
97
+ module.exports = componentContent;
98
+ ```
99
+
100
+ ```json fileName="src/components/MyComponent/index.content.json" contentDeclarationFormat="json"
101
+ {
102
+ "$schema": "https://intlayer.org/schema.json",
103
+ "key": "component-key",
104
+ "content": {
105
+ "myTranslatedContent": {
106
+ "nodeType": "translation",
107
+ "translation": {
108
+ "uk": "Привіт, світ",
109
+ "en": "Hello World",
110
+ "fr": "Bonjour le monde",
111
+ "es": "Hola Mundo"
112
+ }
113
+ }
114
+ }
115
+ }
116
+ ```
117
+
118
+ ```tsx fileName="src/components/MyComponent/index.tsx" codeFormat="typescript"
119
+ import type { FC } from "react";
120
+ import { useIntlayer } from "react-intlayer";
121
+
122
+ export const MyComponent: FC = () => {
123
+ const { myTranslatedContent } = useIntlayer("component-key");
124
+
125
+ return <span>{myTranslatedContent}</span>;
126
+ };
127
+ ```
128
+
129
+ ```jsx fileName="src/components/MyComponent/index.mjx" codeFormat="esm"
130
+ import { useIntlayer } from "react-intlayer";
131
+
132
+ const MyComponent = () => {
133
+ const { myTranslatedContent } = useIntlayer("component-key");
134
+
135
+ return <span>{myTranslatedContent}</span>;
136
+ };
137
+ ```
138
+
139
+ ```jsx fileName="src/components/MyComponent/index.csx" codeFormat="commonjs"
140
+ const { useIntlayer } = require("react-intlayer");
141
+
142
+ const MyComponent = () => {
143
+ const { myTranslatedContent } = useIntlayer("component-key");
144
+
145
+ return <span>{myTranslatedContent}</span>;
146
+ };
147
+ ```
148
+
149
+ ## Основні можливості
150
+
151
+ Intlayer пропонує низку можливостей, адаптованих під потреби сучасної веб-розробки. Нижче наведено ключові функції з посиланнями на докладну документацію для кожної:
152
+
153
+ - **Підтримка інтернаціоналізації**: Розширюйте глобальне охоплення вашого застосунку за допомогою вбудованої підтримки інтернаціоналізації.
154
+ - **Візуальний редактор**: Покращуйте свій робочий процес розробки за допомогою плагінів для редактора, створених для Intlayer. Перегляньте [Посібник із візуального редактора](https://github.com/aymericzip/intlayer/blob/main/docs/docs/uk/intlayer_visual_editor.md).
155
+ - **Гнучкість конфігурації**: Налаштуйте ваше середовище за допомогою широких опцій конфігурації, детально описаних у [Довіднику з конфігурації](https://github.com/aymericzip/intlayer/blob/main/docs/docs/uk/configuration.md).
156
+ - **Розширені інструменти CLI**: Ефективно керуйте своїми проєктами за допомогою командного інтерфейсу Intlayer. Дослідіть можливості в [Документації інструментів CLI](https://github.com/aymericzip/intlayer/blob/main/docs/docs/uk/cli/index.md).
157
+
158
+ ## Основні поняття
159
+
160
+ ### Словник
161
+
162
+ Організуйте ваш багатомовний контент поруч із кодом, щоб усе залишалося узгодженим і простим у підтримці.
163
+
164
+ - **[Початок роботи](https://github.com/aymericzip/intlayer/blob/main/docs/docs/uk/dictionary/content_file.md)**
165
+ Дізнайтеся основи декларування вашого контенту в Intlayer.
166
+
167
+ - **[Переклад](https://github.com/aymericzip/intlayer/blob/main/docs/docs/uk/dictionary/translation.md)**
168
+ Дізнайтеся, як переклади генеруються, зберігаються та використовуються у вашому застосунку.
169
+
170
+ - **[Перелічення](https://github.com/aymericzip/intlayer/blob/main/docs/docs/uk/dictionary/enumeration.md)**
171
+ Легко керуйте повторюваними або фіксованими наборами даних для різних мов.
172
+
173
+ - **[Умова](https://github.com/aymericzip/intlayer/blob/main/docs/docs/uk/dictionary/conditional.md)**
174
+ Дізнайтеся, як використовувати умовну логіку в Intlayer для створення динамічного контенту.
175
+
176
+ - **[Вставлення](https://github.com/aymericzip/intlayer/blob/main/docs/docs/uk/dictionary/insertion.md)**
177
+ Дізнайтеся, як вставляти значення в рядок за допомогою плейсхолдерів вставки.
178
+
179
+ - **[Отримання за допомогою функцій](https://github.com/aymericzip/intlayer/blob/main/docs/docs/uk/dictionary/function_fetching.md)**
180
+ Дізнайтеся, як динамічно отримувати контент за допомогою кастомної логіки, щоб відповідати робочому процесу вашого проєкту.
181
+
182
+ - **[Markdown](https://github.com/aymericzip/intlayer/blob/main/docs/docs/uk/dictionary/markdown.md)**
183
+ Дізнайтеся, як використовувати Markdown в Intlayer для створення насиченого контенту.
184
+
185
+ - **[Вбудовування файлів](https://github.com/aymericzip/intlayer/blob/main/docs/docs/uk/dictionary/file_embeddings.md)**
186
+ Дізнайтеся, як вбудовувати зовнішні файли в Intlayer для використання їх у редакторі контенту.
187
+
188
+ - **[Вкладення](https://github.com/aymericzip/intlayer/blob/main/docs/docs/uk/dictionary/nesting.md)**
189
+ Дізнайтеся, як вкладати контент в Intlayer для створення складних структур.
190
+
191
+ ### Середовища та інтеграції
192
+
193
+ Intlayer створено з урахуванням гнучкості, забезпечуючи безшовну інтеграцію з популярними фреймворками та інструментами збірки:
194
+
195
+ - **[Intlayer з Next.js 16](https://github.com/aymericzip/intlayer/blob/main/docs/docs/uk/intlayer_with_nextjs_16.md)**
196
+ - **[Intlayer з Next.js 15](https://github.com/aymericzip/intlayer/blob/main/docs/docs/uk/intlayer_with_nextjs_15.md)**
197
+ - **[Intlayer з Next.js 14 (App Router)](https://github.com/aymericzip/intlayer/blob/main/docs/docs/uk/intlayer_with_nextjs_14.md)**
198
+ - **[Intlayer з Next.js Page Router](https://github.com/aymericzip/intlayer/blob/main/docs/docs/uk/intlayer_with_nextjs_page_router.md)**
199
+ - **[Intlayer з React CRA](https://github.com/aymericzip/intlayer/blob/main/docs/docs/uk/intlayer_with_create_react_app.md)**
200
+ - **[Intlayer з Vite + React](https://github.com/aymericzip/intlayer/blob/main/docs/docs/uk/intlayer_with_vite+react.md)**
201
+ - **[Intlayer з React Router v7](https://github.com/aymericzip/intlayer/blob/main/docs/docs/uk/intlayer_with_react_router_v7.md)**
202
+ - **[Intlayer з Tanstack Start](https://github.com/aymericzip/intlayer/blob/main/docs/docs/uk/intlayer_with_tanstack.md)**
203
+ - **[Intlayer з React Native та Expo](https://github.com/aymericzip/intlayer/blob/main/docs/docs/uk/intlayer_with_react_native+expo.md)**
204
+ - **[Intlayer з Lynx та React](https://github.com/aymericzip/intlayer/blob/main/docs/docs/uk/intlayer_with_lynx+react.md)**
205
+ - **[Intlayer з Vite + Preact](https://github.com/aymericzip/intlayer/blob/main/docs/docs/uk/intlayer_with_vite+preact.md)**
206
+ - **[Intlayer з Vite + Vue](https://github.com/aymericzip/intlayer/blob/main/docs/docs/uk/intlayer_with_vite+vue.md)**
207
+ - **[Intlayer з Nuxt](https://github.com/aymericzip/intlayer/blob/main/docs/docs/uk/intlayer_with_nuxt.md)**
208
+ - **[Intlayer з Vite + Svelte](https://github.com/aymericzip/intlayer/blob/main/docs/docs/uk/intlayer_with_vite+svelte.md)**
209
+ - **[Intlayer з SvelteKit](https://github.com/aymericzip/intlayer/blob/main/docs/docs/uk/intlayer_with_svelte_kit.md)**
210
+ - **[Intlayer з Express](https://github.com/aymericzip/intlayer/blob/main/docs/docs/uk/intlayer_with_express.md)**
211
+ - **[Intlayer з NestJS](https://github.com/aymericzip/intlayer/blob/main/docs/docs/uk/intlayer_with_nestjs.md)**
212
+ - **[Intlayer з Angular](https://github.com/aymericzip/intlayer/blob/main/docs/docs/uk/intlayer_with_angular.md)**
213
+
214
+ Кожен посібник з інтеграції містить найкращі практики використання можливостей Intlayer, таких як **server-side rendering**, **dynamic routing** або **client-side rendering**, щоб ви могли підтримувати швидкий, SEO-дружній та високо масштабований застосунок.
215
+
216
+ ## Внесок і відгуки
217
+
218
+ Ми цінуємо силу open-source та розробку, що керується спільнотою. Якщо ви хочете запропонувати покращення, додати новий посібник або виправити будь-які помилки в нашій документації, не соромтеся надіслати Pull Request або відкрити issue у нашому [репозиторії на GitHub](https://github.com/aymericzip/intlayer/blob/main/docs/docs).
219
+
220
+ **Готові перекласти ваш додаток швидше та ефективніше?** Ознайомтеся з нашою документацією, щоб почати використовувати Intlayer вже сьогодні. Відчуйте надійний, оптимізований підхід до інтернаціоналізації, який зберігає ваш контент впорядкованим і підвищує продуктивність вашої команди.
221
+
222
+ ---
@@ -0,0 +1,242 @@
1
+ ---
2
+ createdAt: 2025-07-27
3
+ updatedAt: 2025-07-27
4
+ title: Маппер локалей
5
+ description: Дізнайтеся, як працює Маппер локалей. Перегляньте кроки, які виконує Маппер локалей у вашому застосунку. Дізнайтеся, що роблять різні пакети.
6
+ keywords:
7
+ - Locale Mapper
8
+ - Початок роботи
9
+ - Intlayer
10
+ - Додаток
11
+ - Пакети
12
+ slugs:
13
+ - doc
14
+ - locale-mapper
15
+ history:
16
+ - version: 5.7.2
17
+ date: 2025-07-27
18
+ changes: Додано документацію для Locale Mapper
19
+ ---
20
+
21
+ # Маппер локалей
22
+
23
+ Маппер локалей — потужний інструмент, який допомагає працювати з даними інтернаціоналізації в вашому застосунку Intlayer. Він надає три основні функції для перетворення і організації даних, специфічних для локалі: `localeMap`, `localeFlatMap` та `localeRecord`.
24
+
25
+ ## Як працює Маппер локалей
26
+
27
+ Мапер локалей працює з об'єктом `LocaleData`, який містить всю необхідну інформацію про локаль:
28
+
29
+ ```typescript
30
+ type LocaleData = {
31
+ locale: LocalesValues; // Поточний код локалі (наприклад, 'en', 'fr')
32
+ defaultLocale: LocalesValues; // Код локалі за замовчуванням
33
+ isDefault: boolean; // Чи є ця локаль за замовчуванням
34
+ locales: LocalesValues[]; // Масив всіх доступних локалей
35
+ urlPrefix: string; // Префікс URL для цієї локалі (наприклад, '/fr' або '')
36
+ };
37
+ ```
38
+
39
+ Функції-мапери автоматично генерують ці дані для кожної локалі у вашій конфігурації, враховуючи:
40
+
41
+ - Ваш список налаштованих локалей
42
+ - Налаштування локалі за замовчуванням
43
+ - Чи слід додавати префікс для локалі за замовчуванням у URL
44
+
45
+ ## Основні функції
46
+
47
+ ### `localeMap`
48
+
49
+ Перетворює кожну локаль на один об'єкт за допомогою функції mapper.
50
+
51
+ ```typescript
52
+ localeMap<T>(
53
+ mapper: (locale: LocaleData) => T,
54
+ locales?: LocalesValues[],
55
+ defaultLocale?: LocalesValues,
56
+ prefixDefault?: boolean
57
+ ): T[]
58
+ ```
59
+
60
+ **Приклад: створення об'єктів маршрутів**
61
+
62
+ ```typescript
63
+ import { localeMap } from "intlayer";
64
+
65
+ const routes = localeMap((localizedData) => ({
66
+ path: localizedData.urlPrefix,
67
+ name: localizedData.locale,
68
+ isDefault: localizedData.isDefault,
69
+ locales: localizedData.locales,
70
+ defaultLocale: localizedData.defaultLocale,
71
+ }));
72
+
73
+ // Result:
74
+ // [
75
+ // { path: '/', name: 'en', isDefault: true, locales: ['en', 'fr', 'es'], defaultLocale: 'en' },
76
+ // { path: '/fr', name: 'fr', isDefault: false, locales: ['en', 'fr', 'es'], defaultLocale: 'en' },
77
+ // { path: '/es', name: 'es', isDefault: false, locales: ['en', 'fr', 'es'], defaultLocale: 'en' }
78
+ // ]
79
+ ```
80
+
81
+ ### `localeFlatMap`
82
+
83
+ Подібно до `localeMap`, але функція mapper повертає масив об'єктів, який згортається в один масив.
84
+
85
+ ```typescript
86
+ localeFlatMap<T>(
87
+ mapper: (locale: LocaleData) => T[],
88
+ locales?: LocalesValues[],
89
+ defaultLocale?: LocalesValues,
90
+ prefixDefault?: boolean
91
+ ): T[]
92
+ ```
93
+
94
+ **Приклад: Створення кількох маршрутів для кожної локалі**
95
+
96
+ ```typescript
97
+ import { localeFlatMap } from "intlayer";
98
+
99
+ const routes = localeFlatMap((localizedData) => [
100
+ {
101
+ path: localizedData.urlPrefix,
102
+ name: localizedData.locale,
103
+ isDefault: localizedData.isDefault,
104
+ },
105
+ {
106
+ path: `${localizedData.urlPrefix}/about`,
107
+ name: `${localizedData.locale}-about`,
108
+ isDefault: localizedData.isDefault,
109
+ },
110
+ ]);
111
+
112
+ // Результат:
113
+ // [
114
+ // { path: '/', name: 'en', isDefault: true },
115
+ // { path: '/about', name: 'en-about', isDefault: true },
116
+ // { path: '/fr', name: 'fr', isDefault: false },
117
+ // { path: '/fr/about', name: 'fr-about', isDefault: false },
118
+ // { path: '/es', name: 'es', isDefault: false },
119
+ // { path: '/es/about', name: 'es-about', isDefault: false }
120
+ // ]
121
+ ```
122
+
123
+ ### `localeRecord`
124
+
125
+ Створює об'єкт запису, де кожна локаль є ключем, що відображається на значення, перетворене функцією mapper.
126
+
127
+ ```typescript
128
+ localeRecord<T>(
129
+ mapper: (locale: LocaleData) => T,
130
+ locales?: Locales[],
131
+ defaultLocale?: Locales,
132
+ prefixDefault?: boolean
133
+ ): Record<Locales, T>
134
+ ```
135
+
136
+ **Приклад: Завантаження файлів перекладу**
137
+
138
+ ```typescript
139
+ import { localeRecord } from "intlayer";
140
+
141
+ const translations = localeRecord(({ locale }) =>
142
+ require(`./translations/${locale}.json`)
143
+ );
144
+
145
+ // Результат:
146
+ // {
147
+ // en: { welcome: 'Welcome', hello: 'Hello' },
148
+ // fr: { welcome: 'Bienvenue', hello: 'Bonjour' },
149
+ // es: { welcome: 'Bienvenido', hello: 'Hola' }
150
+ // }
151
+ ```
152
+
153
+ ## Налаштування Locale Mapper
154
+
155
+ Locale Mapper автоматично використовує вашу конфігурацію Intlayer, але ви можете перевизначити значення за замовчуванням, передавши параметри:
156
+
157
+ ### Використання конфігурації за замовчуванням
158
+
159
+ ```typescript
160
+ import { localeMap } from "intlayer";
161
+
162
+ // Використовує конфігурацію з intlayer.config.ts
163
+ const routes = localeMap((data) => ({
164
+ path: data.urlPrefix,
165
+ locale: data.locale,
166
+ }));
167
+ ```
168
+
169
+ ### Перевизначення конфігурації
170
+
171
+ ```typescript
172
+ import { localeMap } from "intlayer";
173
+
174
+ // Перевизначити локалі та локаль за замовчуванням
175
+ const customRoutes = localeMap(
176
+ (data) => ({ path: data.urlPrefix, locale: data.locale }),
177
+ ["en", "fr", "de"], // Користувацькі локалі
178
+ "en", // Користувацька локаль за замовчуванням
179
+ true // Додавати префікс локалі за замовчуванням у URL
180
+ );
181
+ ```
182
+
183
+ ## Розширені приклади використання
184
+
185
+ ### Створення навігаційних меню
186
+
187
+ ```typescript
188
+ import { localeMap } from "intlayer";
189
+
190
+ const navigationItems = localeMap((data) => ({
191
+ label: data.locale.toUpperCase(),
192
+ href: data.urlPrefix || "/",
193
+ isActive: data.isDefault,
194
+ flag: `/flags/${data.locale}.svg`,
195
+ }));
196
+ ```
197
+
198
+ ### Генерація даних Sitemap
199
+
200
+ ```typescript
201
+ import { localeFlatMap } from "intlayer";
202
+
203
+ const sitemapUrls = localeFlatMap((data) => [
204
+ {
205
+ url: `${data.urlPrefix}/`,
206
+ lastmod: new Date().toISOString(),
207
+ changefreq: "daily",
208
+ priority: data.isDefault ? 1.0 : 0.8,
209
+ },
210
+ {
211
+ url: `${data.urlPrefix}/about`,
212
+ lastmod: new Date().toISOString(),
213
+ changefreq: "monthly",
214
+ priority: data.isDefault ? 0.8 : 0.6,
215
+ },
216
+ ]);
217
+ ```
218
+
219
+ ### Динамічне завантаження перекладів
220
+
221
+ ```typescript
222
+ import { localeRecord } from "intlayer";
223
+
224
+ const translationModules = localeRecord(({ locale }) => ({
225
+ messages: import(`./locales/${locale}/messages.json`),
226
+ validation: import(`./locales/${locale}/validation.json`),
227
+ metadata: {
228
+ locale,
229
+ direction: ["ar", "he", "fa"].includes(locale) ? "rtl" : "ltr",
230
+ },
231
+ }));
232
+ ```
233
+
234
+ ## Інтеграція конфігурації
235
+
236
+ Locale Mapper безшовно інтегрується з вашою конфігурацією Intlayer:
237
+
238
+ - **Locales**: Автоматично використовує `configuration.internationalization.locales`
239
+ - **Локаль за замовчуванням**: Використовує `configuration.internationalization.defaultLocale`
240
+ - **Додавання префіксу до URL**: Дотримується `configuration.middleware.prefixDefault`
241
+
242
+ Це забезпечує узгодженість у всьому додатку та зменшує дублювання конфігурації.
@@ -0,0 +1,211 @@
1
+ ---
2
+ createdAt: 2025-06-07
3
+ updatedAt: 2025-07-11
4
+ title: Документація MCP Server
5
+ description: Дослідіть функції та налаштування MCP Server, щоб оптимізувати управління сервером і операції.
6
+ keywords:
7
+ - MCP Server
8
+ - Управління сервером
9
+ - Оптимізація
10
+ - Intlayer
11
+ - Документація
12
+ - Налаштування
13
+ - Функції
14
+ slugs:
15
+ - doc
16
+ - mcp-server
17
+ history:
18
+ - version: 5.5.12
19
+ date: 2025-07-11
20
+ changes: Додано налаштування ChatGPT
21
+ - version: 5.5.12
22
+ date: 2025-07-10
23
+ changes: Додано налаштування Claude Desktop
24
+ - version: 5.5.12
25
+ date: 2025-07-10
26
+ changes: Додано SSE-транспорт і віддалений сервер
27
+ - version: 5.5.10
28
+ date: 2025-06-29
29
+ changes: Ініціалізовано історію
30
+ ---
31
+
32
+ # Документація MCP Server
33
+
34
+ Сервер **Intlayer MCP (Model Context Protocol)** надає підтримку IDE на базі AI, адаптовану для екосистеми Intlayer.
35
+
36
+ ## Де його можна використовувати?
37
+
38
+ - У сучасних середовищах розробки, таких як **Cursor**, **VS Code**, та будь-якому IDE, яке підтримує протокол MCP.
39
+ - У вашому улюбленому AI-асистенті, наприклад **Claude Desktop**, **Gemini**, **ChatGPT** тощо.
40
+
41
+ ## Чому варто використовувати сервер Intlayer MCP?
42
+
43
+ Увімкнувши сервер Intlayer MCP у вашому IDE, ви отримуєте доступ до:
44
+
45
+ - **Контекстно-залежна документація**
46
+ MCP-сервер завантажує й надає документацію Intlayer, щоб прискорити налаштування, міграції тощо.
47
+ Це гарантує, що підказки коду, параметри команд та пояснення завжди актуальні та релевантні.
48
+
49
+ - **Розумна інтеграція CLI**
50
+ Отримуйте доступ і запускайте команди Intlayer CLI безпосередньо з інтерфейсу вашого IDE. Використовуючи MCP server, ви можете дозволити своєму AI-помічнику виконувати команди, такі як `intlayer dictionaries build` для оновлення словників, або `intlayer dictionaries fill` для заповнення відсутніх перекладів.
51
+
52
+ > Перегляньте повний список команд та опцій у [документації Intlayer CLI](https://github.com/aymericzip/intlayer/blob/main/docs/docs/uk/cli/index.md).
53
+
54
+ ## Локальний сервер (stdio) проти Віддаленого сервера (SSE)
55
+
56
+ MCP server можна використовувати двома способами:
57
+
58
+ - Локальний сервер (stdio)
59
+ - Віддалений сервер (SSE)
60
+
61
+ ### Локальний сервер (stdio) (рекомендовано)
62
+
63
+ Intlayer надає пакет NPM, який можна встановити локально на вашому комп’ютері. Його можна інтегрувати в улюблене IDE, як-от VS Code або Cursor, а також у вашу локальну програму асистента, таку як ChatGPT, Claude Desktop тощо.
64
+
65
+ Цей сервер є рекомендованим способом використання MCP‑сервера, оскільки він інтегрує всі можливості MCP‑сервера, включно з CLI‑інструментами.
66
+
67
+ ### Віддалений сервер (SSE)
68
+
69
+ MCP‑сервер також можна використовувати віддалено, використовуючи транспортний метод SSE. Цей сервер хоститься Intlayer і доступний за адресою https://mcp.intlayer.org. До сервера можна підключитися публічно, без автентифікації, і його використання безкоштовне.
70
+
71
+ Зверніть увагу, що віддалений сервер не інтегрує CLI-інструменти, AI-автозавершення тощо. Дистанційний сервер призначений лише для взаємодії з документацією, щоб допомогти вашому AI-асистентові з екосистемою Intlayer.
72
+
73
+ > Через витрати на хостинг доступність віддаленого сервера не може бути гарантована. Ми обмежуємо кількість одночасних підключень. Для найнадійнішої роботи ми рекомендуємо використовувати локальний сервер з транспортом stdio.
74
+
75
+ ---
76
+
77
+ ## Налаштування в Cursor
78
+
79
+ Дотримуйтесь [офіційної документації](https://docs.cursor.com/context/mcp), щоб налаштувати MCP-сервер у Cursor.
80
+
81
+ У корені вашого проєкту додайте наступний конфігураційний файл `.cursor/mcp.json`:
82
+
83
+ ### Локальний сервер (stdio) (рекомендовано)
84
+
85
+ ```json fileName=".cursor/mcp.json"
86
+ {
87
+ "mcpServers": {
88
+ "intlayer": {
89
+ "command": "npx",
90
+ "args": ["-y", "@intlayer/mcp"]
91
+ }
92
+ }
93
+ }
94
+ ```
95
+
96
+ ### Віддалений сервер (SSE)
97
+
98
+ Для підключення до віддаленого Intlayer MCP сервера за допомогою Server-Sent Events (SSE), ви можете налаштувати ваш MCP клієнт на підключення до хостингу.
99
+
100
+ ```json fileName=".cursor/mcp.json"
101
+ {
102
+ "mcpServers": {
103
+ "intlayer": {
104
+ "url": "https://mcp.intlayer.org",
105
+ "transport": "sse"
106
+ }
107
+ }
108
+ }
109
+ ```
110
+
111
+ Це вказує вашому IDE запускати Intlayer MCP server за допомогою `npx`, гарантує, що він завжди використовує останню доступну версію, якщо ви її не закріпите.
112
+
113
+ ---
114
+
115
+ ## Налаштування в VS Code
116
+
117
+ Дотримуйтесь [офіційної документації](https://code.visualstudio.com/docs/copilot/chat/mcp-servers) для налаштування MCP сервера у VS Code.
118
+
119
+ Щоб використовувати Intlayer MCP Server у VS Code, потрібно налаштувати його в налаштуваннях робочого простору або у користувацьких налаштуваннях.
120
+
121
+ ### Локальний сервер (stdio) (рекомендується)
122
+
123
+ Створіть файл `.vscode/mcp.json` у корені вашого проєкту:
124
+
125
+ ```json fileName=".vscode/mcp.json"
126
+ {
127
+ "servers": {
128
+ "intlayer": {
129
+ "type": "stdio",
130
+ "command": "npx",
131
+ "args": ["-y", "@intlayer/mcp"]
132
+ }
133
+ }
134
+ }
135
+ ```
136
+
137
+ ### Віддалений сервер (SSE)
138
+
139
+ Щоб підключитися до віддаленого Intlayer MCP сервера через Server-Sent Events (SSE), ви можете налаштувати ваш MCP-клієнт на підключення до хостингованого сервісу.
140
+
141
+ ```json fileName=".vscode/mcp.json"
142
+ {
143
+ "servers": {
144
+ "intlayer": {
145
+ "url": "https://mcp.intlayer.org",
146
+ "type": "sse"
147
+ }
148
+ }
149
+ }
150
+ ```
151
+
152
+ ---
153
+
154
+ ## Налаштування в ChatGPT
155
+
156
+ ### Віддалений сервер (SSE)
157
+
158
+ Дотримуйтесь [офіційної документації](https://platform.openai.com/docs/mcp#test-and-connect-your-mcp-server), щоб налаштувати MCP сервер у ChatGPT.
159
+
160
+ 1. Перейдіть на [панель підказок](https://platform.openai.com/prompts)
161
+ 2. Натисніть `+ Create`
162
+ 3. Натисніть `Tools (Create or +)`
163
+ 4. Виберіть `MCP Server`
164
+ 5. Натисніть `Add new`
165
+ 6. Заповніть наступні поля:
166
+ - URL: `https://mcp.intlayer.org`
167
+ - Мітка: `Intlayer MCP Server`
168
+ - Назва: `intlayer-mcp-server`
169
+ - Аутентифікація: `None`
170
+
171
+ 7. Натисніть `Save`
172
+
173
+ ---
174
+
175
+ ## Налаштування в Claude Desktop
176
+
177
+ Дотримуйтесь [офіційної документації](https://modelcontextprotocol.io/quickstart/user#2-add-the-filesystem-mcp-server) щоб налаштувати MCP-сервер у Claude Desktop.
178
+
179
+ Шлях до файлу конфігурації:
180
+
181
+ - macOS: `~/Library/Application\ Support/Claude/claude_desktop_config.json`
182
+ - Windows: `%APPDATA%\Claude\claude_desktop_config.json`
183
+
184
+ ### Локальний сервер (stdio) (рекомендовано)
185
+
186
+ ```json fileName="claude_desktop_config.json"
187
+ {
188
+ "mcpServers": {
189
+ "intlayer": {
190
+ "command": "npx",
191
+ "args": ["-y", "@intlayer/mcp"]
192
+ }
193
+ }
194
+ }
195
+ ```
196
+
197
+ ---
198
+
199
+ ## Використання MCP-сервера через CLI
200
+
201
+ Ви також можете запускати Intlayer MCP-сервер безпосередньо з командного рядка для тестування, налагодження або інтеграції з іншими інструментами.
202
+
203
+ ```bash
204
+ # Встановити глобально
205
+ npm install -g @intlayer/mcp
206
+
207
+ # Або використовувати безпосередньо через npx (рекомендовано)
208
+ npx @intlayer/mcp
209
+ ```
210
+
211
+ ---