@intlayer/docs 7.5.12 → 7.5.13
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.
- package/blog/uk/compiler_vs_declarative_i18n.md +224 -0
- package/blog/uk/i18n_using_next-i18next.md +1086 -0
- package/blog/uk/i18n_using_next-intl.md +760 -0
- package/blog/uk/index.md +69 -0
- package/blog/uk/internationalization_and_SEO.md +273 -0
- package/blog/uk/intlayer_with_i18next.md +211 -0
- package/blog/uk/intlayer_with_next-i18next.md +202 -0
- package/blog/uk/intlayer_with_next-intl.md +203 -0
- package/blog/uk/intlayer_with_react-i18next.md +200 -0
- package/blog/uk/intlayer_with_react-intl.md +202 -0
- package/blog/uk/intlayer_with_vue-i18n.md +206 -0
- package/blog/uk/l10n_platform_alternative/Lokalise.md +80 -0
- package/blog/uk/l10n_platform_alternative/crowdin.md +80 -0
- package/blog/uk/l10n_platform_alternative/phrase.md +78 -0
- package/blog/uk/list_i18n_technologies/CMS/drupal.md +143 -0
- package/blog/uk/list_i18n_technologies/CMS/wix.md +167 -0
- package/blog/uk/list_i18n_technologies/CMS/wordpress.md +189 -0
- package/blog/uk/list_i18n_technologies/frameworks/angular.md +125 -0
- package/blog/uk/list_i18n_technologies/frameworks/flutter.md +128 -0
- package/blog/uk/list_i18n_technologies/frameworks/react-native.md +217 -0
- package/blog/uk/list_i18n_technologies/frameworks/react.md +155 -0
- package/blog/uk/list_i18n_technologies/frameworks/svelte.md +145 -0
- package/blog/uk/list_i18n_technologies/frameworks/vue.md +144 -0
- package/blog/uk/next-i18next_vs_next-intl_vs_intlayer.md +1499 -0
- package/blog/uk/nextjs-multilingual-seo-comparison.md +360 -0
- package/blog/uk/rag_powered_documentation_assistant.md +288 -0
- package/blog/uk/react-i18next_vs_react-intl_vs_intlayer.md +164 -0
- package/blog/uk/vue-i18n_vs_intlayer.md +279 -0
- package/blog/uk/what_is_internationalization.md +167 -0
- package/dist/cjs/generated/frequentQuestions.entry.cjs +20 -0
- package/dist/cjs/generated/frequentQuestions.entry.cjs.map +1 -1
- package/dist/esm/generated/frequentQuestions.entry.mjs +20 -0
- package/dist/esm/generated/frequentQuestions.entry.mjs.map +1 -1
- package/dist/types/generated/frequentQuestions.entry.d.ts +1 -0
- package/dist/types/generated/frequentQuestions.entry.d.ts.map +1 -1
- package/docs/ar/configuration.md +6 -1
- package/docs/ar/dictionary/content_file.md +6 -1
- package/docs/de/configuration.md +6 -1
- package/docs/de/dictionary/content_file.md +6 -1
- package/docs/en/configuration.md +6 -1
- package/docs/en/dictionary/content_file.md +6 -1
- package/docs/en-GB/configuration.md +6 -1
- package/docs/en-GB/dictionary/content_file.md +3 -1
- package/docs/es/configuration.md +6 -1
- package/docs/es/dictionary/content_file.md +6 -1
- package/docs/fr/configuration.md +6 -1
- package/docs/fr/dictionary/content_file.md +3 -1
- package/docs/hi/configuration.md +6 -1
- package/docs/hi/dictionary/content_file.md +3 -1
- package/docs/id/configuration.md +6 -1
- package/docs/id/dictionary/content_file.md +3 -1
- package/docs/it/configuration.md +6 -1
- package/docs/it/dictionary/content_file.md +3 -1
- package/docs/ja/configuration.md +6 -1
- package/docs/ja/dictionary/content_file.md +3 -1
- package/docs/ko/configuration.md +6 -1
- package/docs/ko/dictionary/content_file.md +3 -1
- package/docs/pl/configuration.md +3 -1
- package/docs/pl/dictionary/content_file.md +3 -1
- package/docs/pt/configuration.md +6 -1
- package/docs/pt/dictionary/content_file.md +3 -1
- package/docs/ru/configuration.md +6 -1
- package/docs/ru/dictionary/content_file.md +6 -1
- package/docs/tr/configuration.md +6 -1
- package/docs/tr/dictionary/content_file.md +3 -1
- package/docs/uk/CI_CD.md +198 -0
- package/docs/uk/autoFill.md +307 -0
- package/docs/uk/bundle_optimization.md +185 -0
- package/docs/uk/cli/build.md +64 -0
- package/docs/uk/cli/ci.md +137 -0
- package/docs/uk/cli/configuration.md +63 -0
- package/docs/uk/cli/debug.md +46 -0
- package/docs/uk/cli/doc-review.md +43 -0
- package/docs/uk/cli/doc-translate.md +132 -0
- package/docs/uk/cli/editor.md +28 -0
- package/docs/uk/cli/fill.md +130 -0
- package/docs/uk/cli/index.md +190 -0
- package/docs/uk/cli/init.md +84 -0
- package/docs/uk/cli/list.md +90 -0
- package/docs/uk/cli/list_projects.md +128 -0
- package/docs/uk/cli/live.md +41 -0
- package/docs/uk/cli/login.md +157 -0
- package/docs/uk/cli/pull.md +78 -0
- package/docs/uk/cli/push.md +98 -0
- package/docs/uk/cli/sdk.md +71 -0
- package/docs/uk/cli/test.md +76 -0
- package/docs/uk/cli/transform.md +65 -0
- package/docs/uk/cli/version.md +24 -0
- package/docs/uk/cli/watch.md +37 -0
- package/docs/uk/configuration.md +742 -0
- package/docs/uk/dictionary/condition.md +237 -0
- package/docs/uk/dictionary/content_file.md +1134 -0
- package/docs/uk/dictionary/enumeration.md +245 -0
- package/docs/uk/dictionary/file.md +232 -0
- package/docs/uk/dictionary/function_fetching.md +212 -0
- package/docs/uk/dictionary/gender.md +273 -0
- package/docs/uk/dictionary/insertion.md +187 -0
- package/docs/uk/dictionary/markdown.md +383 -0
- package/docs/uk/dictionary/nesting.md +273 -0
- package/docs/uk/dictionary/translation.md +332 -0
- package/docs/uk/formatters.md +595 -0
- package/docs/uk/how_works_intlayer.md +256 -0
- package/docs/uk/index.md +175 -0
- package/docs/uk/interest_of_intlayer.md +297 -0
- package/docs/uk/intlayer_CMS.md +569 -0
- package/docs/uk/intlayer_visual_editor.md +292 -0
- package/docs/uk/intlayer_with_angular.md +710 -0
- package/docs/uk/intlayer_with_astro.md +256 -0
- package/docs/uk/intlayer_with_create_react_app.md +1258 -0
- package/docs/uk/intlayer_with_express.md +429 -0
- package/docs/uk/intlayer_with_fastify.md +446 -0
- package/docs/uk/intlayer_with_lynx+react.md +548 -0
- package/docs/uk/intlayer_with_nestjs.md +283 -0
- package/docs/uk/intlayer_with_next-i18next.md +640 -0
- package/docs/uk/intlayer_with_next-intl.md +456 -0
- package/docs/uk/intlayer_with_nextjs_page_router.md +1541 -0
- package/docs/uk/intlayer_with_nuxt.md +711 -0
- package/docs/uk/intlayer_with_react_router_v7.md +600 -0
- package/docs/uk/intlayer_with_react_router_v7_fs_routes.md +669 -0
- package/docs/uk/intlayer_with_svelte_kit.md +579 -0
- package/docs/uk/intlayer_with_tanstack.md +818 -0
- package/docs/uk/intlayer_with_vite+preact.md +1748 -0
- package/docs/uk/intlayer_with_vite+react.md +1449 -0
- package/docs/uk/intlayer_with_vite+solid.md +302 -0
- package/docs/uk/intlayer_with_vite+svelte.md +520 -0
- package/docs/uk/intlayer_with_vite+vue.md +1113 -0
- package/docs/uk/introduction.md +222 -0
- package/docs/uk/locale_mapper.md +242 -0
- package/docs/uk/mcp_server.md +211 -0
- package/docs/uk/packages/express-intlayer/t.md +465 -0
- package/docs/uk/packages/intlayer/getEnumeration.md +159 -0
- package/docs/uk/packages/intlayer/getHTMLTextDir.md +121 -0
- package/docs/uk/packages/intlayer/getLocaleLang.md +81 -0
- package/docs/uk/packages/intlayer/getLocaleName.md +135 -0
- package/docs/uk/packages/intlayer/getLocalizedUrl.md +338 -0
- package/docs/uk/packages/intlayer/getMultilingualUrls.md +359 -0
- package/docs/uk/packages/intlayer/getPathWithoutLocale.md +75 -0
- package/docs/uk/packages/intlayer/getPrefix.md +213 -0
- package/docs/uk/packages/intlayer/getTranslation.md +190 -0
- package/docs/uk/packages/intlayer/getTranslationContent.md +189 -0
- package/docs/uk/packages/next-intlayer/t.md +365 -0
- package/docs/uk/packages/next-intlayer/useDictionary.md +276 -0
- package/docs/uk/packages/next-intlayer/useIntlayer.md +263 -0
- package/docs/uk/packages/next-intlayer/useLocale.md +166 -0
- package/docs/uk/packages/react-intlayer/t.md +311 -0
- package/docs/uk/packages/react-intlayer/useDictionary.md +295 -0
- package/docs/uk/packages/react-intlayer/useI18n.md +250 -0
- package/docs/uk/packages/react-intlayer/useIntlayer.md +251 -0
- package/docs/uk/packages/react-intlayer/useLocale.md +210 -0
- package/docs/uk/per_locale_file.md +345 -0
- package/docs/uk/plugins/sync-json.md +398 -0
- package/docs/uk/readme.md +265 -0
- package/docs/uk/releases/v6.md +305 -0
- package/docs/uk/releases/v7.md +624 -0
- package/docs/uk/roadmap.md +346 -0
- package/docs/uk/testing.md +204 -0
- package/docs/vi/configuration.md +6 -1
- package/docs/vi/dictionary/content_file.md +6 -1
- package/docs/zh/configuration.md +6 -1
- package/docs/zh/dictionary/content_file.md +6 -1
- package/frequent_questions/ar/error-vite-env-only.md +77 -0
- package/frequent_questions/de/error-vite-env-only.md +77 -0
- package/frequent_questions/en/error-vite-env-only.md +77 -0
- package/frequent_questions/en-GB/error-vite-env-only.md +77 -0
- package/frequent_questions/es/error-vite-env-only.md +76 -0
- package/frequent_questions/fr/error-vite-env-only.md +77 -0
- package/frequent_questions/hi/error-vite-env-only.md +77 -0
- package/frequent_questions/id/error-vite-env-only.md +77 -0
- package/frequent_questions/it/error-vite-env-only.md +77 -0
- package/frequent_questions/ja/error-vite-env-only.md +77 -0
- package/frequent_questions/ko/error-vite-env-only.md +77 -0
- package/frequent_questions/pl/error-vite-env-only.md +77 -0
- package/frequent_questions/pt/error-vite-env-only.md +77 -0
- package/frequent_questions/ru/error-vite-env-only.md +77 -0
- package/frequent_questions/tr/error-vite-env-only.md +77 -0
- package/frequent_questions/uk/SSR_Next_no_[locale].md +104 -0
- package/frequent_questions/uk/array_as_content_declaration.md +72 -0
- package/frequent_questions/uk/build_dictionaries.md +58 -0
- package/frequent_questions/uk/build_error_CI_CD.md +74 -0
- package/frequent_questions/uk/bun_set_up.md +53 -0
- package/frequent_questions/uk/customized_locale_list.md +64 -0
- package/frequent_questions/uk/domain_routing.md +113 -0
- package/frequent_questions/uk/error-vite-env-only.md +77 -0
- package/frequent_questions/uk/esbuild_error.md +29 -0
- package/frequent_questions/uk/get_locale_cookie.md +142 -0
- package/frequent_questions/uk/intlayer_command_undefined.md +155 -0
- package/frequent_questions/uk/locale_incorect_in_url.md +73 -0
- package/frequent_questions/uk/package_version_error.md +181 -0
- package/frequent_questions/uk/static_rendering.md +44 -0
- package/frequent_questions/uk/translated_path_url.md +55 -0
- package/frequent_questions/uk/unknown_command.md +97 -0
- package/frequent_questions/vi/error-vite-env-only.md +77 -0
- package/frequent_questions/zh/error-vite-env-only.md +77 -0
- package/legal/uk/privacy_notice.md +83 -0
- package/legal/uk/terms_of_service.md +55 -0
- package/package.json +6 -6
- package/src/generated/frequentQuestions.entry.ts +20 -0
|
@@ -0,0 +1,332 @@
|
|
|
1
|
+
---
|
|
2
|
+
createdAt: 2025-08-23
|
|
3
|
+
updatedAt: 2025-08-23
|
|
4
|
+
title: Переклад
|
|
5
|
+
description: Дізнайтеся, як оголошувати та використовувати переклади на вашому багатомовному сайті. Дотримуйтесь кроків цієї онлайн-документації, щоб налаштувати проект за кілька хвилин.
|
|
6
|
+
keywords:
|
|
7
|
+
- Переклад
|
|
8
|
+
- Інтернаціоналізація
|
|
9
|
+
- Документація
|
|
10
|
+
- Intlayer
|
|
11
|
+
- Next.js
|
|
12
|
+
- JavaScript
|
|
13
|
+
- React
|
|
14
|
+
slugs:
|
|
15
|
+
- doc
|
|
16
|
+
- concept
|
|
17
|
+
- content
|
|
18
|
+
- translation
|
|
19
|
+
history:
|
|
20
|
+
- version: 5.5.10
|
|
21
|
+
date: 2025-06-29
|
|
22
|
+
changes: Ініціалізація історії
|
|
23
|
+
---
|
|
24
|
+
|
|
25
|
+
# Переклад
|
|
26
|
+
|
|
27
|
+
## Визначення перекладів
|
|
28
|
+
|
|
29
|
+
Функція `t` в `intlayer` дозволяє оголошувати контент кількома мовами. Ця функція забезпечує типобезпеку, викликаючи помилку, якщо будь-які переклади відсутні, що особливо корисно в середовищах TypeScript.
|
|
30
|
+
|
|
31
|
+
Ось приклад того, як оголосити контент із перекладами.
|
|
32
|
+
|
|
33
|
+
```typescript fileName="**/*.content.ts" contentDeclarationFormat="typescript"
|
|
34
|
+
import { t, type Dictionary } from "intlayer";
|
|
35
|
+
|
|
36
|
+
interface Content {
|
|
37
|
+
welcomeMessage: string;
|
|
38
|
+
}
|
|
39
|
+
|
|
40
|
+
export default {
|
|
41
|
+
key: "multi_lang",
|
|
42
|
+
content: {
|
|
43
|
+
welcomeMessage: t({
|
|
44
|
+
uk: "Ласкаво просимо до нашого застосунку",
|
|
45
|
+
en: "Welcome to our application",
|
|
46
|
+
fr: "Bienvenue dans notre application",
|
|
47
|
+
es: "Bienvenido a nuestra aplicación",
|
|
48
|
+
}),
|
|
49
|
+
},
|
|
50
|
+
} satisfies Dictionary<Content>;
|
|
51
|
+
```
|
|
52
|
+
|
|
53
|
+
```javascript fileName="**/*.content.mjs" contentDeclarationFormat="esm"
|
|
54
|
+
import { t } from "intlayer";
|
|
55
|
+
|
|
56
|
+
export default {
|
|
57
|
+
key: "multi_lang",
|
|
58
|
+
content: {
|
|
59
|
+
welcomeMessage: t({
|
|
60
|
+
uk: "Ласкаво просимо до нашого застосунку",
|
|
61
|
+
en: "Welcome to our application",
|
|
62
|
+
fr: "Bienvenue dans notre application",
|
|
63
|
+
es: "Bienvenido a nuestra aplicación",
|
|
64
|
+
}),
|
|
65
|
+
},
|
|
66
|
+
};
|
|
67
|
+
```
|
|
68
|
+
|
|
69
|
+
```javascript fileName="**/*.content.cjs" contentDeclarationFormat="commonjs"
|
|
70
|
+
const { t } = require("intlayer");
|
|
71
|
+
|
|
72
|
+
module.exports = {
|
|
73
|
+
key: "multi_lang",
|
|
74
|
+
content: {
|
|
75
|
+
welcomeMessage: t({
|
|
76
|
+
uk: "Ласкаво просимо до нашого застосунку",
|
|
77
|
+
en: "Welcome to our application",
|
|
78
|
+
fr: "Bienvenue dans notre application",
|
|
79
|
+
es: "Bienvenido a nuestra aplicación",
|
|
80
|
+
}),
|
|
81
|
+
},
|
|
82
|
+
};
|
|
83
|
+
```
|
|
84
|
+
|
|
85
|
+
```json fileName="**/*.content.json" contentDeclarationFormat="json"
|
|
86
|
+
{
|
|
87
|
+
"$schema": "https://intlayer.org/schema.json",
|
|
88
|
+
"key": "multi_lang",
|
|
89
|
+
"content": {
|
|
90
|
+
"welcomeMessage": {
|
|
91
|
+
"nodeType": "translation",
|
|
92
|
+
"translation": {
|
|
93
|
+
"uk": "Ласкаво просимо до нашого застосунку",
|
|
94
|
+
"en": "Welcome to our application",
|
|
95
|
+
"fr": "Bienvenue dans notre application",
|
|
96
|
+
"es": "Bienvenido a nuestra aplicación"
|
|
97
|
+
}
|
|
98
|
+
}
|
|
99
|
+
}
|
|
100
|
+
}
|
|
101
|
+
```
|
|
102
|
+
|
|
103
|
+
## Налаштування локалей
|
|
104
|
+
|
|
105
|
+
Щоб забезпечити коректну обробку перекладів, ви можете налаштувати прийняті локалі в `intlayer.config.ts`. Ця конфігурація дозволяє визначити мови, які підтримує ваш додаток:
|
|
106
|
+
|
|
107
|
+
```typescript fileName="intlayer.config.ts" codeFormat="typescript"
|
|
108
|
+
import { Locales, type IntlayerConfig } from "intlayer";
|
|
109
|
+
|
|
110
|
+
const config: IntlayerConfig = {
|
|
111
|
+
internationalization: {
|
|
112
|
+
locales: [Locales.ENGLISH, Locales.FRENCH, Locales.SPANISH],
|
|
113
|
+
},
|
|
114
|
+
};
|
|
115
|
+
|
|
116
|
+
export default config;
|
|
117
|
+
```
|
|
118
|
+
|
|
119
|
+
```javascript fileName="intlayer.config.mjs" codeFormat="esm"
|
|
120
|
+
import { Locales } from "intlayer";
|
|
121
|
+
|
|
122
|
+
/** @type {import('intlayer').IntlayerConfig} */
|
|
123
|
+
const config = {
|
|
124
|
+
internationalization: {
|
|
125
|
+
locales: [Locales.ENGLISH, Locales.FRENCH, Locales.SPANISH],
|
|
126
|
+
},
|
|
127
|
+
};
|
|
128
|
+
|
|
129
|
+
export default config;
|
|
130
|
+
```
|
|
131
|
+
|
|
132
|
+
```javascript fileName="intlayer.config.cjs" codeFormat="commonjs"
|
|
133
|
+
const { Locales } = require("intlayer");
|
|
134
|
+
|
|
135
|
+
/** @type {import('intlayer').IntlayerConfig} */
|
|
136
|
+
const config = {
|
|
137
|
+
internationalization: {
|
|
138
|
+
locales: [Locales.ENGLISH, Locales.FRENCH, Locales.SPANISH],
|
|
139
|
+
},
|
|
140
|
+
};
|
|
141
|
+
|
|
142
|
+
module.exports = config;
|
|
143
|
+
```
|
|
144
|
+
|
|
145
|
+
## Використання перекладів у React-компонентах
|
|
146
|
+
|
|
147
|
+
За допомогою `react-intlayer` ви можете використовувати переклади у React-компонентах. Ось приклад:
|
|
148
|
+
|
|
149
|
+
```jsx fileName="**/*.tsx" codeFormat="typescript"
|
|
150
|
+
import type { FC } from "react";
|
|
151
|
+
import { useIntlayer } from "react-intlayer";
|
|
152
|
+
|
|
153
|
+
const MyComponent: FC = () => {
|
|
154
|
+
const content = useIntlayer("multi_lang");
|
|
155
|
+
|
|
156
|
+
return (
|
|
157
|
+
<div>
|
|
158
|
+
<p>{content.welcomeMessage}</p>
|
|
159
|
+
</div>
|
|
160
|
+
);
|
|
161
|
+
};
|
|
162
|
+
|
|
163
|
+
export default MyComponent;
|
|
164
|
+
```
|
|
165
|
+
|
|
166
|
+
```javascript fileName="**/*.mjx" codeFormat="esm"
|
|
167
|
+
import { useIntlayer } from "react-intlayer";
|
|
168
|
+
|
|
169
|
+
const MyComponent = () => {
|
|
170
|
+
const content = useIntlayer("multi_lang");
|
|
171
|
+
|
|
172
|
+
return (
|
|
173
|
+
<div>
|
|
174
|
+
<p>{content.welcomeMessage}</p>
|
|
175
|
+
</div>
|
|
176
|
+
);
|
|
177
|
+
};
|
|
178
|
+
|
|
179
|
+
export default MyComponent;
|
|
180
|
+
```
|
|
181
|
+
|
|
182
|
+
```javascript fileName="**/*.cjs" codeFormat="commonjs"
|
|
183
|
+
const { useIntlayer } = require("react-intlayer");
|
|
184
|
+
|
|
185
|
+
const MyComponent = () => {
|
|
186
|
+
const content = useIntlayer("multi_lang");
|
|
187
|
+
|
|
188
|
+
return (
|
|
189
|
+
<div>
|
|
190
|
+
<p>{content.welcomeMessage}</p>
|
|
191
|
+
</div>
|
|
192
|
+
);
|
|
193
|
+
};
|
|
194
|
+
|
|
195
|
+
module.exports = MyComponent;
|
|
196
|
+
```
|
|
197
|
+
|
|
198
|
+
Цей компонент отримує відповідний переклад на основі поточної локалі, встановленої у вашому додатку.
|
|
199
|
+
|
|
200
|
+
## Користувацькі об'єкти контенту
|
|
201
|
+
|
|
202
|
+
`intlayer` підтримує власні об'єкти вмісту для перекладу, що дає змогу визначати складніші структури та забезпечує type safety. Ось приклад із кастомним об'єктом:
|
|
203
|
+
|
|
204
|
+
```typescript fileName="**/*.content.ts" contentDeclarationFormat="typescript"
|
|
205
|
+
import { t, type Dictionary } from "intlayer";
|
|
206
|
+
|
|
207
|
+
interface ICustomContent {
|
|
208
|
+
title: string;
|
|
209
|
+
content: string;
|
|
210
|
+
}
|
|
211
|
+
|
|
212
|
+
const customContent = {
|
|
213
|
+
key: "custom_content",
|
|
214
|
+
content: {
|
|
215
|
+
profileText: t<ICustomContent>({
|
|
216
|
+
uk: {
|
|
217
|
+
title: "Заголовок сторінки",
|
|
218
|
+
content: "Вміст сторінки",
|
|
219
|
+
},
|
|
220
|
+
en: {
|
|
221
|
+
title: "Page Title",
|
|
222
|
+
content: "Page Content",
|
|
223
|
+
},
|
|
224
|
+
fr: {
|
|
225
|
+
title: "Titre de la Page",
|
|
226
|
+
content: "Contenu de la Page",
|
|
227
|
+
},
|
|
228
|
+
es: {
|
|
229
|
+
title: "Título de la Página",
|
|
230
|
+
content: "Contenido de la Página",
|
|
231
|
+
},
|
|
232
|
+
}),
|
|
233
|
+
},
|
|
234
|
+
} satisfies Dictionary;
|
|
235
|
+
|
|
236
|
+
export default customContent;
|
|
237
|
+
```
|
|
238
|
+
|
|
239
|
+
```javascript fileName="**/*.content.mjs" contentDeclarationFormat="esm"
|
|
240
|
+
import { t } from "intlayer";
|
|
241
|
+
|
|
242
|
+
export default {
|
|
243
|
+
key: "custom_content",
|
|
244
|
+
content: {
|
|
245
|
+
profileText:
|
|
246
|
+
t <
|
|
247
|
+
ICustomContent >
|
|
248
|
+
{
|
|
249
|
+
uk: {
|
|
250
|
+
title: "Заголовок сторінки",
|
|
251
|
+
content: "Вміст сторінки",
|
|
252
|
+
},
|
|
253
|
+
en: {
|
|
254
|
+
title: "Page Title",
|
|
255
|
+
content: "Page Content",
|
|
256
|
+
},
|
|
257
|
+
fr: {
|
|
258
|
+
title: "Titre de la Page",
|
|
259
|
+
content: "Contenu de la Page",
|
|
260
|
+
},
|
|
261
|
+
es: {
|
|
262
|
+
title: "Título de la Página",
|
|
263
|
+
content: "Contenido de la Página",
|
|
264
|
+
},
|
|
265
|
+
},
|
|
266
|
+
},
|
|
267
|
+
};
|
|
268
|
+
```
|
|
269
|
+
|
|
270
|
+
```javascript fileName="**/*.content.cjs" contentDeclarationFormat="commonjs"
|
|
271
|
+
const { t } = require("intlayer");
|
|
272
|
+
|
|
273
|
+
module.exports = {
|
|
274
|
+
key: "custom_content",
|
|
275
|
+
content: {
|
|
276
|
+
profileText:
|
|
277
|
+
t <
|
|
278
|
+
ICustomContent >
|
|
279
|
+
{
|
|
280
|
+
uk: {
|
|
281
|
+
title: "Заголовок сторінки",
|
|
282
|
+
content: "Вміст сторінки",
|
|
283
|
+
},
|
|
284
|
+
en: {
|
|
285
|
+
title: "Page Title",
|
|
286
|
+
content: "Page Content",
|
|
287
|
+
},
|
|
288
|
+
fr: {
|
|
289
|
+
title: "Titre de la Page",
|
|
290
|
+
content: "Contenu de la Page",
|
|
291
|
+
},
|
|
292
|
+
es: {
|
|
293
|
+
title: "Título de la Página",
|
|
294
|
+
content: "Contenido de la Página",
|
|
295
|
+
},
|
|
296
|
+
},
|
|
297
|
+
},
|
|
298
|
+
};
|
|
299
|
+
```
|
|
300
|
+
|
|
301
|
+
```json fileName="**/*.content.json" contentDeclarationFormat="json"
|
|
302
|
+
{
|
|
303
|
+
"$schema": "https://intlayer.org/schema.json",
|
|
304
|
+
"key": "custom_content",
|
|
305
|
+
"content": {
|
|
306
|
+
"profileText": {
|
|
307
|
+
"nodeType": "translation",
|
|
308
|
+
"translation": {
|
|
309
|
+
"uk": {
|
|
310
|
+
"title": "Заголовок сторінки",
|
|
311
|
+
"content": "Вміст сторінки"
|
|
312
|
+
},
|
|
313
|
+
"en": {
|
|
314
|
+
"title": "Page Title",
|
|
315
|
+
"content": "Page Content"
|
|
316
|
+
},
|
|
317
|
+
"fr": {
|
|
318
|
+
"title": "Titre de la Page",
|
|
319
|
+
"content": "Contenu de la Page"
|
|
320
|
+
},
|
|
321
|
+
"es": {
|
|
322
|
+
"title": "Título de la Página",
|
|
323
|
+
"content": "Contenido de la Página"
|
|
324
|
+
}
|
|
325
|
+
"title": "Заголовок сторінки",
|
|
326
|
+
"content": "Вміст сторінки"
|
|
327
|
+
}
|
|
328
|
+
}
|
|
329
|
+
}
|
|
330
|
+
}
|
|
331
|
+
}
|
|
332
|
+
```
|