@intlayer/docs 7.4.0 → 7.5.0-canary.0
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/ar/intlayer_with_i18next.md +2 -0
- package/blog/ar/intlayer_with_next-i18next.md +2 -0
- package/blog/ar/intlayer_with_next-intl.md +2 -0
- package/blog/ar/intlayer_with_react-i18next.md +2 -0
- package/blog/ar/intlayer_with_react-intl.md +2 -0
- package/blog/ar/intlayer_with_vue-i18n.md +2 -0
- package/blog/de/intlayer_with_i18next.md +2 -0
- package/blog/de/intlayer_with_next-i18next.md +1 -0
- package/blog/de/intlayer_with_next-intl.md +2 -0
- package/blog/de/intlayer_with_react-i18next.md +2 -0
- package/blog/de/intlayer_with_react-intl.md +2 -0
- package/blog/de/intlayer_with_vue-i18n.md +2 -0
- package/blog/en/intlayer_with_i18next.md +6 -0
- package/blog/en/intlayer_with_next-i18next.md +3 -0
- package/blog/en/intlayer_with_next-intl.md +3 -0
- package/blog/en/intlayer_with_react-i18next.md +3 -0
- package/blog/en/intlayer_with_react-intl.md +3 -0
- package/blog/en/intlayer_with_vue-i18n.md +3 -0
- package/blog/en-GB/intlayer_with_i18next.md +2 -0
- package/blog/en-GB/intlayer_with_next-i18next.md +2 -0
- package/blog/en-GB/intlayer_with_next-intl.md +2 -0
- package/blog/en-GB/intlayer_with_react-i18next.md +2 -0
- package/blog/en-GB/intlayer_with_react-intl.md +2 -0
- package/blog/en-GB/intlayer_with_vue-i18n.md +2 -0
- package/blog/es/intlayer_with_i18next.md +2 -0
- package/blog/es/intlayer_with_next-i18next.md +2 -0
- package/blog/es/intlayer_with_next-intl.md +2 -0
- package/blog/es/intlayer_with_react-i18next.md +2 -0
- package/blog/es/intlayer_with_react-intl.md +2 -0
- package/blog/es/intlayer_with_vue-i18n.md +2 -0
- package/blog/fr/intlayer_with_i18next.md +2 -0
- package/blog/fr/intlayer_with_next-i18next.md +2 -0
- package/blog/fr/intlayer_with_next-intl.md +2 -0
- package/blog/fr/intlayer_with_react-i18next.md +2 -0
- package/blog/fr/intlayer_with_react-intl.md +2 -0
- package/blog/fr/intlayer_with_vue-i18n.md +2 -0
- package/blog/hi/intlayer_with_i18next.md +2 -0
- package/blog/hi/intlayer_with_next-i18next.md +2 -0
- package/blog/hi/intlayer_with_next-intl.md +2 -0
- package/blog/hi/intlayer_with_react-i18next.md +2 -0
- package/blog/hi/intlayer_with_react-intl.md +2 -0
- package/blog/hi/intlayer_with_vue-i18n.md +2 -0
- package/blog/id/intlayer_with_i18next.md +2 -0
- package/blog/id/intlayer_with_next-i18next.md +2 -0
- package/blog/id/intlayer_with_next-intl.md +2 -0
- package/blog/id/intlayer_with_react-i18next.md +2 -0
- package/blog/id/intlayer_with_react-intl.md +2 -0
- package/blog/id/intlayer_with_vue-i18n.md +2 -0
- package/blog/it/intlayer_with_i18next.md +2 -0
- package/blog/it/intlayer_with_next-i18next.md +2 -0
- package/blog/it/intlayer_with_next-intl.md +2 -0
- package/blog/it/intlayer_with_react-i18next.md +2 -0
- package/blog/it/intlayer_with_react-intl.md +2 -0
- package/blog/it/intlayer_with_vue-i18n.md +2 -0
- package/blog/ja/intlayer_with_i18next.md +2 -0
- package/blog/ja/intlayer_with_next-i18next.md +1 -0
- package/blog/ja/intlayer_with_next-intl.md +2 -0
- package/blog/ja/intlayer_with_react-i18next.md +2 -0
- package/blog/ja/intlayer_with_react-intl.md +2 -0
- package/blog/ja/intlayer_with_vue-i18n.md +2 -0
- package/blog/ko/intlayer_with_i18next.md +2 -0
- package/blog/ko/intlayer_with_next-i18next.md +2 -0
- package/blog/ko/intlayer_with_next-intl.md +2 -0
- package/blog/ko/intlayer_with_react-i18next.md +2 -0
- package/blog/ko/intlayer_with_react-intl.md +2 -0
- package/blog/ko/intlayer_with_vue-i18n.md +2 -0
- package/blog/pl/intlayer_with_i18next.md +2 -0
- package/blog/pl/intlayer_with_next-i18next.md +2 -0
- package/blog/pl/intlayer_with_next-intl.md +2 -0
- package/blog/pl/intlayer_with_react-i18next.md +2 -0
- package/blog/pl/intlayer_with_react-intl.md +2 -0
- package/blog/pl/intlayer_with_vue-i18n.md +2 -0
- package/blog/pt/intlayer_with_i18next.md +2 -0
- package/blog/pt/intlayer_with_next-i18next.md +2 -0
- package/blog/pt/intlayer_with_next-intl.md +2 -0
- package/blog/pt/intlayer_with_react-i18next.md +2 -0
- package/blog/pt/intlayer_with_react-intl.md +2 -0
- package/blog/pt/intlayer_with_vue-i18n.md +2 -0
- package/blog/ru/intlayer_with_i18next.md +2 -0
- package/blog/ru/intlayer_with_next-i18next.md +2 -0
- package/blog/ru/intlayer_with_next-intl.md +2 -0
- package/blog/ru/intlayer_with_react-i18next.md +2 -0
- package/blog/ru/intlayer_with_react-intl.md +2 -0
- package/blog/ru/intlayer_with_vue-i18n.md +2 -0
- package/blog/tr/intlayer_with_i18next.md +2 -0
- package/blog/tr/intlayer_with_next-i18next.md +2 -0
- package/blog/tr/intlayer_with_next-intl.md +2 -0
- package/blog/tr/intlayer_with_react-i18next.md +2 -0
- package/blog/tr/intlayer_with_react-intl.md +2 -0
- package/blog/tr/intlayer_with_vue-i18n.md +2 -0
- package/blog/vi/intlayer_with_i18next.md +2 -0
- package/blog/vi/intlayer_with_next-i18next.md +2 -0
- package/blog/vi/intlayer_with_next-intl.md +2 -0
- package/blog/vi/intlayer_with_react-i18next.md +2 -0
- package/blog/vi/intlayer_with_react-intl.md +2 -0
- package/blog/vi/intlayer_with_vue-i18n.md +2 -0
- package/blog/zh/intlayer_with_i18next.md +2 -0
- package/blog/zh/intlayer_with_next-i18next.md +2 -0
- package/blog/zh/intlayer_with_next-intl.md +2 -0
- package/blog/zh/intlayer_with_react-i18next.md +2 -0
- package/blog/zh/intlayer_with_react-intl.md +2 -0
- package/blog/zh/intlayer_with_vue-i18n.md +2 -0
- package/docs/ar/dictionary/content_file.md +24 -1
- package/docs/ar/intlayer_with_astro.md +1 -1
- package/docs/ar/intlayer_with_express.md +1 -1
- package/docs/ar/intlayer_with_nestjs.md +1 -1
- package/docs/ar/intlayer_with_next-i18next.md +1 -0
- package/docs/ar/intlayer_with_next-intl.md +1 -0
- package/docs/ar/intlayer_with_tanstack.md +1 -12
- package/docs/ar/plugins/sync-json.md +27 -2
- package/docs/de/dictionary/content_file.md +24 -1
- package/docs/de/intlayer_with_astro.md +1 -1
- package/docs/de/intlayer_with_express.md +1 -1
- package/docs/de/intlayer_with_nestjs.md +1 -1
- package/docs/de/intlayer_with_next-i18next.md +1 -0
- package/docs/de/intlayer_with_next-intl.md +1 -0
- package/docs/de/intlayer_with_tanstack.md +1 -12
- package/docs/de/plugins/sync-json.md +27 -2
- package/docs/en/dictionary/content_file.md +24 -1
- package/docs/en/intlayer_with_astro.md +1 -1
- package/docs/en/intlayer_with_express.md +1 -1
- package/docs/en/intlayer_with_nestjs.md +1 -2
- package/docs/en/intlayer_with_next-i18next.md +1 -0
- package/docs/en/intlayer_with_next-intl.md +1 -0
- package/docs/en/intlayer_with_tanstack.md +0 -11
- package/docs/en/plugins/sync-json.md +53 -2
- package/docs/en-GB/dictionary/content_file.md +24 -1
- package/docs/en-GB/intlayer_with_astro.md +1 -1
- package/docs/en-GB/intlayer_with_express.md +1 -1
- package/docs/en-GB/intlayer_with_nestjs.md +1 -1
- package/docs/en-GB/intlayer_with_next-i18next.md +1 -0
- package/docs/en-GB/intlayer_with_next-intl.md +1 -0
- package/docs/en-GB/intlayer_with_tanstack.md +1 -12
- package/docs/en-GB/plugins/sync-json.md +26 -1
- package/docs/es/dictionary/content_file.md +24 -1
- package/docs/es/intlayer_with_astro.md +1 -1
- package/docs/es/intlayer_with_express.md +1 -1
- package/docs/es/intlayer_with_nestjs.md +1 -1
- package/docs/es/intlayer_with_next-i18next.md +1 -0
- package/docs/es/intlayer_with_next-intl.md +1 -0
- package/docs/es/intlayer_with_tanstack.md +1 -12
- package/docs/es/plugins/sync-json.md +27 -2
- package/docs/fr/dictionary/content_file.md +24 -1
- package/docs/fr/intlayer_with_astro.md +1 -1
- package/docs/fr/intlayer_with_express.md +1 -1
- package/docs/fr/intlayer_with_nestjs.md +1 -1
- package/docs/fr/intlayer_with_next-i18next.md +1 -0
- package/docs/fr/intlayer_with_next-intl.md +1 -0
- package/docs/fr/intlayer_with_tanstack.md +1 -12
- package/docs/fr/plugins/sync-json.md +27 -2
- package/docs/hi/dictionary/content_file.md +24 -1
- package/docs/hi/intlayer_with_astro.md +1 -1
- package/docs/hi/intlayer_with_express.md +1 -1
- package/docs/hi/intlayer_with_nestjs.md +1 -1
- package/docs/hi/intlayer_with_next-i18next.md +1 -0
- package/docs/hi/intlayer_with_next-intl.md +1 -0
- package/docs/hi/intlayer_with_tanstack.md +1 -12
- package/docs/hi/plugins/sync-json.md +27 -2
- package/docs/id/dictionary/content_file.md +24 -1
- package/docs/id/intlayer_with_astro.md +1 -1
- package/docs/id/intlayer_with_express.md +1 -1
- package/docs/id/intlayer_with_nestjs.md +1 -1
- package/docs/id/intlayer_with_next-i18next.md +1 -0
- package/docs/id/intlayer_with_next-intl.md +1 -0
- package/docs/id/intlayer_with_tanstack.md +1 -12
- package/docs/id/plugins/sync-json.md +27 -2
- package/docs/it/dictionary/content_file.md +24 -1
- package/docs/it/intlayer_with_astro.md +1 -1
- package/docs/it/intlayer_with_express.md +1 -1
- package/docs/it/intlayer_with_nestjs.md +1 -1
- package/docs/it/intlayer_with_next-i18next.md +1 -0
- package/docs/it/intlayer_with_next-intl.md +1 -0
- package/docs/it/intlayer_with_tanstack.md +1 -12
- package/docs/it/plugins/sync-json.md +27 -2
- package/docs/ja/dictionary/content_file.md +24 -1
- package/docs/ja/intlayer_with_astro.md +1 -1
- package/docs/ja/intlayer_with_express.md +1 -1
- package/docs/ja/intlayer_with_nestjs.md +1 -1
- package/docs/ja/intlayer_with_next-i18next.md +1 -0
- package/docs/ja/intlayer_with_next-intl.md +1 -0
- package/docs/ja/intlayer_with_tanstack.md +1 -12
- package/docs/ja/plugins/sync-json.md +27 -2
- package/docs/ko/dictionary/content_file.md +44 -1
- package/docs/ko/intlayer_with_astro.md +1 -1
- package/docs/ko/intlayer_with_express.md +1 -1
- package/docs/ko/intlayer_with_nestjs.md +1 -1
- package/docs/ko/intlayer_with_next-i18next.md +1 -0
- package/docs/ko/intlayer_with_next-intl.md +1 -0
- package/docs/ko/intlayer_with_tanstack.md +1 -12
- package/docs/ko/plugins/sync-json.md +27 -2
- package/docs/pl/dictionary/content_file.md +24 -1
- package/docs/pl/intlayer_with_astro.md +2 -2
- package/docs/pl/intlayer_with_express.md +1 -1
- package/docs/pl/intlayer_with_nestjs.md +1 -1
- package/docs/pl/intlayer_with_next-i18next.md +1 -0
- package/docs/pl/intlayer_with_next-intl.md +1 -0
- package/docs/pl/intlayer_with_tanstack.md +1 -12
- package/docs/pl/plugins/sync-json.md +24 -2
- package/docs/pt/dictionary/content_file.md +24 -1
- package/docs/pt/intlayer_with_astro.md +1 -1
- package/docs/pt/intlayer_with_express.md +1 -1
- package/docs/pt/intlayer_with_nestjs.md +1 -1
- package/docs/pt/intlayer_with_next-i18next.md +1 -0
- package/docs/pt/intlayer_with_next-intl.md +1 -0
- package/docs/pt/intlayer_with_tanstack.md +1 -12
- package/docs/pt/plugins/sync-json.md +27 -2
- package/docs/ru/dictionary/content_file.md +44 -1
- package/docs/ru/intlayer_with_astro.md +1 -1
- package/docs/ru/intlayer_with_express.md +1 -1
- package/docs/ru/intlayer_with_nestjs.md +1 -1
- package/docs/ru/intlayer_with_next-i18next.md +1 -0
- package/docs/ru/intlayer_with_next-intl.md +1 -0
- package/docs/ru/intlayer_with_tanstack.md +1 -12
- package/docs/ru/plugins/sync-json.md +27 -2
- package/docs/tr/dictionary/content_file.md +44 -1
- package/docs/tr/intlayer_with_astro.md +1 -1
- package/docs/tr/intlayer_with_express.md +1 -1
- package/docs/tr/intlayer_with_next-i18next.md +1 -0
- package/docs/tr/intlayer_with_next-intl.md +1 -0
- package/docs/tr/intlayer_with_tanstack.md +1 -12
- package/docs/tr/plugins/sync-json.md +27 -2
- package/docs/vi/dictionary/content_file.md +24 -1
- package/docs/vi/intlayer_with_astro.md +1 -1
- package/docs/vi/intlayer_with_express.md +1 -1
- package/docs/vi/intlayer_with_nestjs.md +1 -1
- package/docs/vi/intlayer_with_next-i18next.md +1 -0
- package/docs/vi/intlayer_with_next-intl.md +1 -0
- package/docs/vi/intlayer_with_tanstack.md +1 -12
- package/docs/vi/plugins/sync-json.md +27 -2
- package/docs/zh/dictionary/content_file.md +44 -1
- package/docs/zh/intlayer_with_astro.md +1 -1
- package/docs/zh/intlayer_with_express.md +1 -1
- package/docs/zh/intlayer_with_nestjs.md +1 -1
- package/docs/zh/intlayer_with_next-i18next.md +1 -0
- package/docs/zh/intlayer_with_next-intl.md +1 -0
- package/docs/zh/intlayer_with_tanstack.md +1 -12
- package/docs/zh/plugins/sync-json.md +27 -2
- package/package.json +6 -6
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
---
|
|
2
2
|
createdAt: 2025-03-13
|
|
3
|
-
updatedAt: 2025-
|
|
3
|
+
updatedAt: 2025-12-13
|
|
4
4
|
title: Sync JSON 플러그인
|
|
5
5
|
description: Intlayer 사전을 서드파티 i18n JSON 파일(i18next, next-intl, react-intl, vue-i18n 등)과 동기화합니다. 기존 i18n을 유지하면서 Intlayer를 사용하여 메시지를 관리, 번역 및 테스트할 수 있습니다.
|
|
6
6
|
keywords:
|
|
@@ -24,12 +24,15 @@ slugs:
|
|
|
24
24
|
- sync-json
|
|
25
25
|
youtubeVideo: https://www.youtube.com/watch?v=MpGMxniDHNg
|
|
26
26
|
history:
|
|
27
|
+
- version: 7.5.0
|
|
28
|
+
date: 2025-12-13
|
|
29
|
+
changes: ICU 및 i18next 형식 지원 추가
|
|
27
30
|
- version: 6.1.6
|
|
28
31
|
date: 2025-10-05
|
|
29
32
|
changes: Sync JSON 플러그인 초기 문서화
|
|
30
33
|
---
|
|
31
34
|
|
|
32
|
-
# Sync JSON (i18n 브리지)
|
|
35
|
+
# Sync JSON (i18n 브리지) - ICU / i18next 지원이 포함된 Sync JSON
|
|
33
36
|
|
|
34
37
|
<iframe title="Intlayer와 JSON 번역을 동기화 상태로 유지하는 방법" class="m-auto aspect-[16/9] w-full overflow-hidden rounded-lg border-0" allow="autoplay; gyroscope;" loading="lazy" width="1080" height="auto" src="https://www.youtube.com/embed/MpGMxniDHNg?autoplay=0&origin=http://intlayer.org&controls=0&rel=1"/>
|
|
35
38
|
|
|
@@ -105,9 +108,27 @@ syncJSON({
|
|
|
105
108
|
source: ({ key, locale }) => string, // 필수
|
|
106
109
|
location?: string, // 선택적 레이블, 기본값: "plugin"
|
|
107
110
|
priority?: number, // 충돌 해결을 위한 선택적 우선순위, 기본값: 0
|
|
111
|
+
format?: 'intlayer' | 'icu' | 'i18next', // 선택적 포맷터, 기본값: 'intlayer'
|
|
108
112
|
});
|
|
109
113
|
```
|
|
110
114
|
|
|
115
|
+
#### `format` ('intlayer' | 'icu' | 'i18next')
|
|
116
|
+
|
|
117
|
+
JSON 파일을 동기화할 때 사전 콘텐츠에 사용할 포맷터를 지정합니다. 이를 통해 다양한 i18n 라이브러리와 호환되는 다양한 메시지 포맷팅 구문을 사용할 수 있습니다.
|
|
118
|
+
|
|
119
|
+
- `'intlayer'`: 기본 Intlayer 포맷터 (기본값).
|
|
120
|
+
- `'icu'`: ICU 메시지 포맷팅을 사용합니다 (react-intl, vue-i18n과 같은 라이브러리와 호환).
|
|
121
|
+
- `'i18next'`: i18next 메시지 포맷팅을 사용합니다 (i18next, next-i18next, Solid-i18next와 호환).
|
|
122
|
+
|
|
123
|
+
**예시:**
|
|
124
|
+
|
|
125
|
+
```ts
|
|
126
|
+
syncJSON({
|
|
127
|
+
source: ({ key, locale }) => `./locales/${locale}/${key}.json`,
|
|
128
|
+
format: "i18next", // 호환성을 위해 i18next 포맷팅 사용
|
|
129
|
+
}),
|
|
130
|
+
```
|
|
131
|
+
|
|
111
132
|
## 여러 JSON 소스 및 우선순위
|
|
112
133
|
|
|
113
134
|
여러 `syncJSON` 플러그인을 추가하여 서로 다른 JSON 소스를 동기화할 수 있습니다. 이는 프로젝트에 여러 i18n 라이브러리나 다양한 JSON 구조가 있을 때 유용합니다.
|
|
@@ -134,6 +155,7 @@ export default defineConfig({
|
|
|
134
155
|
plugins: [
|
|
135
156
|
// 주요 JSON 소스 (가장 높은 우선순위)
|
|
136
157
|
syncJSON({
|
|
158
|
+
format: "i18next",
|
|
137
159
|
source: ({ key, locale }) => `./locales/${locale}/${key}.json`,
|
|
138
160
|
location: "main-translations",
|
|
139
161
|
priority: 10,
|
|
@@ -141,6 +163,7 @@ export default defineConfig({
|
|
|
141
163
|
|
|
142
164
|
// 대체 JSON 소스 (낮은 우선순위)
|
|
143
165
|
syncJSON({
|
|
166
|
+
format: "i18next",
|
|
144
167
|
source: ({ locale }) => `./fallback-locales/${locale}.json`,
|
|
145
168
|
location: "fallback-translations",
|
|
146
169
|
priority: 5,
|
|
@@ -148,6 +171,7 @@ export default defineConfig({
|
|
|
148
171
|
|
|
149
172
|
// 레거시 JSON 소스 (가장 낮은 우선순위)
|
|
150
173
|
syncJSON({
|
|
174
|
+
format: "i18next",
|
|
151
175
|
source: ({ locale }) => `/my/other/app/legacy/${locale}/messages.json`,
|
|
152
176
|
location: "legacy-translations",
|
|
153
177
|
priority: 1,
|
|
@@ -178,6 +202,7 @@ import { syncJSON } from "@intlayer/sync-json-plugin";
|
|
|
178
202
|
export default {
|
|
179
203
|
plugins: [
|
|
180
204
|
syncJSON({
|
|
205
|
+
format: "i18next",
|
|
181
206
|
source: ({ key, locale }) => `./locales/${locale}/${key}.json`,
|
|
182
207
|
}),
|
|
183
208
|
],
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
---
|
|
2
2
|
createdAt: 2025-02-07
|
|
3
|
-
updatedAt: 2025-
|
|
3
|
+
updatedAt: 2025-12-13
|
|
4
4
|
title: Plik z Treścią
|
|
5
5
|
description: Dowiedz się, jak dostosować rozszerzenia dla plików deklaracji treści. Postępuj zgodnie z tą dokumentacją, aby efektywnie wdrażać warunki w swoim projekcie.
|
|
6
6
|
keywords:
|
|
@@ -12,6 +12,9 @@ slugs:
|
|
|
12
12
|
- concept
|
|
13
13
|
- content
|
|
14
14
|
history:
|
|
15
|
+
- version: 7.5.0
|
|
16
|
+
date: 2025-12-13
|
|
17
|
+
changes: Dodano obsługę formatów ICU i i18next
|
|
15
18
|
- version: 7.0.0
|
|
16
19
|
date: 2025-10-23
|
|
17
20
|
changes: Zmiana nazwy `autoFill` na `fill`
|
|
@@ -387,6 +390,26 @@ Tablica łańcuchów znaków służąca do kategoryzacji i organizacji słownik
|
|
|
387
390
|
}
|
|
388
391
|
```
|
|
389
392
|
|
|
393
|
+
#### `format` ('intlayer' | 'icu' | 'i18next')
|
|
394
|
+
|
|
395
|
+
Określa formatter do użycia dla zawartości słownika. Pozwala to na używanie różnych składni formatowania wiadomości.
|
|
396
|
+
|
|
397
|
+
- `'intlayer'`: Domyślny formatter Intlayer.
|
|
398
|
+
- `'icu'`: Używa formatowania wiadomości ICU.
|
|
399
|
+
- `'i18next'`: Używa formatowania wiadomości i18next.
|
|
400
|
+
|
|
401
|
+
**Przykład:**
|
|
402
|
+
|
|
403
|
+
```typescript
|
|
404
|
+
{
|
|
405
|
+
key: "my-dictionary",
|
|
406
|
+
format: "icu",
|
|
407
|
+
content: {
|
|
408
|
+
message: "Hello {name}, you have {count, plural, one {# message} other {# messages}}"
|
|
409
|
+
}
|
|
410
|
+
}
|
|
411
|
+
```
|
|
412
|
+
|
|
390
413
|
#### `locale` (LocalesValues)
|
|
391
414
|
|
|
392
415
|
Przekształca słownik w słownik per-lokalizacyjny, gdzie każde pole zadeklarowane w zawartości zostanie automatycznie przekształcone w węzeł tłumaczenia. Gdy ta właściwość jest ustawiona:
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
createdAt: 2024-03-07
|
|
3
3
|
updatedAt: 2025-10-03
|
|
4
4
|
title: Jak przetłumaczyć swoją aplikację Astro – przewodnik i18n 2025
|
|
5
|
-
description: Dowiedz się, jak dodać internacjonalizację (i18n) do swojej
|
|
5
|
+
description: Dowiedz się, jak dodać internacjonalizację (i18n) do swojej strony Astro za pomocą Intlayer. Postępuj zgodnie z tym przewodnikiem, aby uczynić swoją stronę wielojęzyczną.
|
|
6
6
|
keywords:
|
|
7
7
|
- Internacjonalizacja
|
|
8
8
|
- Dokumentacja
|
|
@@ -28,7 +28,7 @@ Aby pójść dalej, możesz zaimplementować [edytor wizualny](https://github.co
|
|
|
28
28
|
createdAt: 2024-03-07
|
|
29
29
|
updatedAt: 2025-10-03
|
|
30
30
|
title: Jak przetłumaczyć swoją aplikację Astro – przewodnik i18n 2025
|
|
31
|
-
description: Dowiedz się, jak dodać internacjonalizację (i18n) do swojej
|
|
31
|
+
description: Dowiedz się, jak dodać internacjonalizację (i18n) do swojej strony Astro za pomocą Intlayer. Postępuj zgodnie z tym przewodnikiem, aby uczynić swoją stronę wielojęzyczną.
|
|
32
32
|
keywords:
|
|
33
33
|
|
|
34
34
|
- Internacjonalizacja
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
createdAt: 2025-08-23
|
|
3
3
|
updatedAt: 2025-08-23
|
|
4
4
|
title: Jak przetłumaczyć backend Express – przewodnik i18n 2025
|
|
5
|
-
description: Dowiedz się, jak uczynić swój backend
|
|
5
|
+
description: Dowiedz się, jak uczynić swój backend Express wielojęzycznym. Postępuj zgodnie z dokumentacją, aby internacjonalizować (i18n) i tłumaczyć.
|
|
6
6
|
keywords:
|
|
7
7
|
- Internacjonalizacja
|
|
8
8
|
- Dokumentacja
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
createdAt: 2025-09-09
|
|
3
3
|
updatedAt: 2025-09-09
|
|
4
4
|
title: Jak przetłumaczyć backend Nest – przewodnik i18n 2025
|
|
5
|
-
description: Dowiedz się, jak uczynić swój backend
|
|
5
|
+
description: Dowiedz się, jak uczynić swój backend NestJS wielojęzycznym. Postępuj zgodnie z dokumentacją, aby internacjonalizować (i18n) i tłumaczyć.
|
|
6
6
|
keywords:
|
|
7
7
|
- Internacjonalizacja
|
|
8
8
|
- Dokumentacja
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
---
|
|
2
2
|
createdAt: 2025-09-09
|
|
3
|
-
updatedAt: 2025-
|
|
3
|
+
updatedAt: 2025-12-11
|
|
4
4
|
title: Jak przetłumaczyć swoją aplikację Tanstack Start – przewodnik i18n 2025
|
|
5
5
|
description: Dowiedz się, jak dodać internacjonalizację (i18n) do swojej aplikacji Tanstack Start za pomocą Intlayer. Postępuj zgodnie z tym kompleksowym przewodnikiem, aby uczynić swoją aplikację wielojęzyczną z routingiem uwzględniającym lokalizację.
|
|
6
6
|
keywords:
|
|
@@ -624,17 +624,6 @@ export function NotFoundComponent() {
|
|
|
624
624
|
}
|
|
625
625
|
```
|
|
626
626
|
|
|
627
|
-
```tsx fileName="src/routes/__root.tsx"
|
|
628
|
-
import { createRootRoute } from "@tanstack/react-router";
|
|
629
|
-
|
|
630
|
-
// Trasa główna służy jako układ najwyższego poziomu
|
|
631
|
-
// Nie obsługuje 404 bezpośrednio - to jest delegowane do tras potomnych
|
|
632
|
-
// To utrzymuje główną trasę prostą i pozwala trasom świadomym locale zarządzać własną logiką 404
|
|
633
|
-
export const Route = createRootRoute({
|
|
634
|
-
component: Outlet,
|
|
635
|
-
});
|
|
636
|
-
```
|
|
637
|
-
|
|
638
627
|
```tsx fileName="src/routes/{-$locale}/route.tsx"
|
|
639
628
|
import { createFileRoute, Outlet, redirect } from "@tanstack/react-router";
|
|
640
629
|
import { validatePrefix } from "intlayer";
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
---
|
|
2
2
|
createdAt: 2025-03-13
|
|
3
|
-
updatedAt: 2025-
|
|
3
|
+
updatedAt: 2025-12-13
|
|
4
4
|
title: Wtyczka Sync JSON
|
|
5
5
|
description: Synchronizuj słowniki Intlayer z zewnętrznymi plikami JSON i18n (i18next, next-intl, react-intl, vue-i18n i inne). Zachowaj istniejące i18n, korzystając z Intlayer do zarządzania, tłumaczenia i testowania swoich komunikatów.
|
|
6
6
|
keywords:
|
|
@@ -29,7 +29,7 @@ history:
|
|
|
29
29
|
changes: Pierwsza dokumentacja wtyczki Sync JSON
|
|
30
30
|
---
|
|
31
31
|
|
|
32
|
-
# Sync JSON (mosty i18n)
|
|
32
|
+
# Sync JSON (mosty i18n) - Sync JSON z obsługą ICU / i18next
|
|
33
33
|
|
|
34
34
|
<iframe title="Jak zachować synchronizację tłumaczeń JSON z Intlayer" class="m-auto aspect-[16/9] w-full overflow-hidden rounded-lg border-0" allow="autoplay; gyroscope;" loading="lazy" width="1080" height="auto" src="https://www.youtube.com/embed/MpGMxniDHNg?autoplay=0&origin=http://intlayer.org&controls=0&rel=1"/>
|
|
35
35
|
|
|
@@ -105,9 +105,27 @@ syncJSON({
|
|
|
105
105
|
source: ({ key, locale }) => string, // wymagane
|
|
106
106
|
location?: string, // opcjonalna etykieta, domyślnie: "plugin"
|
|
107
107
|
priority?: number, // opcjonalny priorytet do rozstrzygania konfliktów, domyślnie: 0
|
|
108
|
+
format?: 'intlayer' | 'icu' | 'i18next', // opcjonalny formatator, domyślnie: 'intlayer'
|
|
108
109
|
});
|
|
109
110
|
```
|
|
110
111
|
|
|
112
|
+
#### `format` ('intlayer' | 'icu' | 'i18next')
|
|
113
|
+
|
|
114
|
+
Określa formatator, który będzie używany do zawartości słownika podczas synchronizacji plików JSON. Pozwala to na używanie różnych składni formatowania wiadomości zgodnych z różnymi bibliotekami i18n.
|
|
115
|
+
|
|
116
|
+
- `'intlayer'`: Domyślny formatator Intlayer (domyślnie).
|
|
117
|
+
- `'icu'`: Używa formatowania wiadomości ICU (zgodne z bibliotekami takimi jak react-intl, vue-i18n).
|
|
118
|
+
- `'i18next'`: Używa formatowania wiadomości i18next (zgodne z i18next, next-i18next, Solid-i18next).
|
|
119
|
+
|
|
120
|
+
**Przykład:**
|
|
121
|
+
|
|
122
|
+
```ts
|
|
123
|
+
syncJSON({
|
|
124
|
+
source: ({ key, locale }) => `./locales/${locale}/${key}.json`,
|
|
125
|
+
format: "i18next", // Użyj formatowania i18next dla zgodności
|
|
126
|
+
}),
|
|
127
|
+
```
|
|
128
|
+
|
|
111
129
|
## Wiele źródeł JSON i priorytet
|
|
112
130
|
|
|
113
131
|
Możesz dodać wiele wtyczek `syncJSON`, aby synchronizować różne źródła JSON. Jest to przydatne, gdy masz wiele bibliotek i18n lub różne struktury JSON w swoim projekcie.
|
|
@@ -134,6 +152,7 @@ export default defineConfig({
|
|
|
134
152
|
plugins: [
|
|
135
153
|
// Główne źródło JSON (najwyższy priorytet)
|
|
136
154
|
syncJSON({
|
|
155
|
+
format: "i18next",
|
|
137
156
|
source: ({ key, locale }) => `./locales/${locale}/${key}.json`,
|
|
138
157
|
location: "main-translations",
|
|
139
158
|
priority: 10,
|
|
@@ -141,6 +160,7 @@ export default defineConfig({
|
|
|
141
160
|
|
|
142
161
|
// Zapasowe źródło JSON (niższy priorytet)
|
|
143
162
|
syncJSON({
|
|
163
|
+
format: "i18next",
|
|
144
164
|
source: ({ locale }) => `./fallback-locales/${locale}.json`,
|
|
145
165
|
location: "fallback-translations",
|
|
146
166
|
priority: 5,
|
|
@@ -148,6 +168,7 @@ export default defineConfig({
|
|
|
148
168
|
|
|
149
169
|
// Źródło JSON dziedziczone (najniższy priorytet)
|
|
150
170
|
syncJSON({
|
|
171
|
+
format: "i18next",
|
|
151
172
|
source: ({ locale }) => `/my/other/app/legacy/${locale}/messages.json`,
|
|
152
173
|
location: "legacy-translations",
|
|
153
174
|
priority: 1,
|
|
@@ -178,6 +199,7 @@ import { syncJSON } from "@intlayer/sync-json-plugin";
|
|
|
178
199
|
export default {
|
|
179
200
|
plugins: [
|
|
180
201
|
syncJSON({
|
|
202
|
+
format: "i18next",
|
|
181
203
|
source: ({ key, locale }) => `./locales/${locale}/${key}.json`,
|
|
182
204
|
}),
|
|
183
205
|
],
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
---
|
|
2
2
|
createdAt: 2025-02-07
|
|
3
|
-
updatedAt: 2025-
|
|
3
|
+
updatedAt: 2025-12-13
|
|
4
4
|
title: Arquivo de Conteúdo
|
|
5
5
|
description: Aprenda como personalizar as extensões para seus arquivos de declaração de conteúdo. Siga esta documentação para implementar condições de forma eficiente em seu projeto.
|
|
6
6
|
keywords:
|
|
@@ -12,6 +12,9 @@ slugs:
|
|
|
12
12
|
- concept
|
|
13
13
|
- content
|
|
14
14
|
history:
|
|
15
|
+
- version: 7.5.0
|
|
16
|
+
date: 2025-12-13
|
|
17
|
+
changes: Adicionado suporte para formatos ICU e i18next
|
|
15
18
|
- version: 6.0.0
|
|
16
19
|
date: 2025-09-20
|
|
17
20
|
changes: Adição da documentação dos campos
|
|
@@ -387,6 +390,26 @@ Array de strings para categorizar e organizar dicionários. As tags fornecem con
|
|
|
387
390
|
}
|
|
388
391
|
```
|
|
389
392
|
|
|
393
|
+
#### `format` ('intlayer' | 'icu' | 'i18next')
|
|
394
|
+
|
|
395
|
+
Especifica o formatador a ser usado para o conteúdo do dicionário. Isso permite usar diferentes sintaxes de formatação de mensagens.
|
|
396
|
+
|
|
397
|
+
- `'intlayer'`: O formatador Intlayer padrão.
|
|
398
|
+
- `'icu'`: Usa formatação de mensagens ICU.
|
|
399
|
+
- `'i18next'`: Usa formatação de mensagens i18next.
|
|
400
|
+
|
|
401
|
+
**Exemplo:**
|
|
402
|
+
|
|
403
|
+
```typescript
|
|
404
|
+
{
|
|
405
|
+
key: "my-dictionary",
|
|
406
|
+
format: "icu",
|
|
407
|
+
content: {
|
|
408
|
+
message: "Hello {name}, you have {count, plural, one {# message} other {# messages}}"
|
|
409
|
+
}
|
|
410
|
+
}
|
|
411
|
+
```
|
|
412
|
+
|
|
390
413
|
#### `locale` (LocalesValues)
|
|
391
414
|
|
|
392
415
|
Transforma o dicionário em um dicionário por localidade onde cada campo declarado no conteúdo será automaticamente transformado em um nó de tradução. Quando essa propriedade é definida:
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
createdAt: 2024-03-07
|
|
3
3
|
updatedAt: 2025-10-03
|
|
4
4
|
title: Como traduzir seu Astro – guia i18n 2025
|
|
5
|
-
description: Aprenda como adicionar internacionalização (i18n)
|
|
5
|
+
description: Aprenda como adicionar internacionalização (i18n) ao seu site Astro usando Intlayer. Siga este guia para tornar seu site multilíngue.
|
|
6
6
|
keywords:
|
|
7
7
|
- Internacionalização
|
|
8
8
|
- Documentação
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
createdAt: 2024-08-11
|
|
3
3
|
updatedAt: 2025-06-29
|
|
4
4
|
title: Como traduzir seu Express backend – guia i18n 2025
|
|
5
|
-
description: Descubra como tornar seu backend
|
|
5
|
+
description: Descubra como tornar seu backend Express multilíngue. Siga a documentação para internacionalizar (i18n) e traduzi-lo.
|
|
6
6
|
keywords:
|
|
7
7
|
- Internacionalização
|
|
8
8
|
- Documentação
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
createdAt: 2025-09-09
|
|
3
3
|
updatedAt: 2025-09-09
|
|
4
4
|
title: Como traduzir seu Nest backend – guia i18n 2025
|
|
5
|
-
description: Descubra como tornar seu backend
|
|
5
|
+
description: Descubra como tornar seu backend NestJS multilíngue. Siga a documentação para internacionalizar (i18n) e traduzir.
|
|
6
6
|
keywords:
|
|
7
7
|
- Internacionalização
|
|
8
8
|
- Documentação
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
---
|
|
2
2
|
createdAt: 2025-09-09
|
|
3
|
-
updatedAt: 2025-
|
|
3
|
+
updatedAt: 2025-12-11
|
|
4
4
|
title: Como traduzir seu Tanstack Start – guia i18n 2025
|
|
5
5
|
description: Aprenda como adicionar internacionalização (i18n) à sua aplicação Tanstack Start usando Intlayer. Siga este guia completo para tornar seu app multilíngue com roteamento sensível ao locale.
|
|
6
6
|
keywords:
|
|
@@ -646,17 +646,6 @@ export function NotFoundComponent() {
|
|
|
646
646
|
}
|
|
647
647
|
```
|
|
648
648
|
|
|
649
|
-
```tsx fileName="src/routes/__root.tsx"
|
|
650
|
-
import { createRootRoute } from "@tanstack/react-router";
|
|
651
|
-
|
|
652
|
-
// A rota raiz serve como o layout de nível superior
|
|
653
|
-
// Ela não trata 404s diretamente - isso é delegado às rotas filhas
|
|
654
|
-
// Isso mantém a raiz simples e permite que rotas conscientes de locale gerenciem sua própria lógica 404
|
|
655
|
-
export const Route = createRootRoute({
|
|
656
|
-
component: Outlet,
|
|
657
|
-
});
|
|
658
|
-
```
|
|
659
|
-
|
|
660
649
|
```tsx fileName="src/routes/{-$locale}/route.tsx"
|
|
661
650
|
import { createFileRoute, Outlet, redirect } from "@tanstack/react-router";
|
|
662
651
|
import { validatePrefix } from "intlayer";
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
---
|
|
2
2
|
createdAt: 2025-03-13
|
|
3
|
-
updatedAt: 2025-
|
|
3
|
+
updatedAt: 2025-12-13
|
|
4
4
|
title: Plugin Sync JSON
|
|
5
5
|
description: Sincronize os dicionários Intlayer com arquivos JSON i18n de terceiros (i18next, next-intl, react-intl, vue-i18n e mais). Mantenha seu i18n existente enquanto usa o Intlayer para gerenciar, traduzir e testar suas mensagens.
|
|
6
6
|
keywords:
|
|
@@ -24,12 +24,15 @@ slugs:
|
|
|
24
24
|
- sync-json
|
|
25
25
|
youtubeVideo: https://www.youtube.com/watch?v=MpGMxniDHNg
|
|
26
26
|
history:
|
|
27
|
+
- version: 7.5.0
|
|
28
|
+
date: 2025-12-13
|
|
29
|
+
changes: Adicionado suporte para formatos ICU e i18next
|
|
27
30
|
- version: 6.1.6
|
|
28
31
|
date: 2025-10-05
|
|
29
32
|
changes: Documentação inicial do plugin Sync JSON
|
|
30
33
|
---
|
|
31
34
|
|
|
32
|
-
|
|
35
|
+
# Sync JSON (pontes i18n) - Sync JSON com suporte ICU / i18next
|
|
33
36
|
|
|
34
37
|
<iframe title="Como manter suas traduções JSON sincronizadas com Intlayer" class="m-auto aspect-[16/9] w-full overflow-hidden rounded-lg border-0" allow="autoplay; gyroscope;" loading="lazy" width="1080" height="auto" src="https://www.youtube.com/embed/MpGMxniDHNg?autoplay=0&origin=http://intlayer.org&controls=0&rel=1"/>
|
|
35
38
|
|
|
@@ -105,9 +108,27 @@ syncJSON({
|
|
|
105
108
|
source: ({ key, locale }) => string, // obrigatório
|
|
106
109
|
location?: string, // rótulo opcional, padrão: "plugin"
|
|
107
110
|
priority?: number, // prioridade opcional para resolução de conflitos, padrão: 0
|
|
111
|
+
format?: 'intlayer' | 'icu' | 'i18next', // formatador opcional, padrão: 'intlayer'
|
|
108
112
|
});
|
|
109
113
|
```
|
|
110
114
|
|
|
115
|
+
#### `format` ('intlayer' | 'icu' | 'i18next')
|
|
116
|
+
|
|
117
|
+
Especifica o formatador a ser usado para o conteúdo do dicionário ao sincronizar arquivos JSON. Isso permite usar diferentes sintaxes de formatação de mensagens compatíveis com várias bibliotecas i18n.
|
|
118
|
+
|
|
119
|
+
- `'intlayer'`: O formatador Intlayer padrão (padrão).
|
|
120
|
+
- `'icu'`: Usa formatação de mensagens ICU (compatível com bibliotecas como react-intl, vue-i18n).
|
|
121
|
+
- `'i18next'`: Usa formatação de mensagens i18next (compatível com i18next, next-i18next, Solid-i18next).
|
|
122
|
+
|
|
123
|
+
**Exemplo:**
|
|
124
|
+
|
|
125
|
+
```ts
|
|
126
|
+
syncJSON({
|
|
127
|
+
source: ({ key, locale }) => `./locales/${locale}/${key}.json`,
|
|
128
|
+
format: "i18next", // Usar formatação i18next para compatibilidade
|
|
129
|
+
}),
|
|
130
|
+
```
|
|
131
|
+
|
|
111
132
|
## Múltiplas fontes JSON e prioridade
|
|
112
133
|
|
|
113
134
|
Você pode adicionar múltiplos plugins `syncJSON` para sincronizar diferentes fontes JSON. Isso é útil quando você tem múltiplas bibliotecas i18n ou diferentes estruturas JSON no seu projeto.
|
|
@@ -134,6 +155,7 @@ export default defineConfig({
|
|
|
134
155
|
plugins: [
|
|
135
156
|
// Fonte JSON principal (maior prioridade)
|
|
136
157
|
syncJSON({
|
|
158
|
+
format: "i18next",
|
|
137
159
|
source: ({ key, locale }) => `./locales/${locale}/${key}.json`,
|
|
138
160
|
location: "main-translations",
|
|
139
161
|
priority: 10,
|
|
@@ -141,6 +163,7 @@ export default defineConfig({
|
|
|
141
163
|
|
|
142
164
|
// Fonte JSON de fallback (prioridade menor)
|
|
143
165
|
syncJSON({
|
|
166
|
+
format: "i18next",
|
|
144
167
|
source: ({ locale }) => `./fallback-locales/${locale}.json`,
|
|
145
168
|
location: "fallback-translations",
|
|
146
169
|
priority: 5,
|
|
@@ -148,6 +171,7 @@ export default defineConfig({
|
|
|
148
171
|
|
|
149
172
|
// Fonte JSON legado (prioridade mais baixa)
|
|
150
173
|
syncJSON({
|
|
174
|
+
format: "i18next",
|
|
151
175
|
source: ({ locale }) => `/my/other/app/legacy/${locale}/messages.json`,
|
|
152
176
|
location: "legacy-translations",
|
|
153
177
|
priority: 1,
|
|
@@ -178,6 +202,7 @@ import { syncJSON } from "@intlayer/sync-json-plugin";
|
|
|
178
202
|
export default {
|
|
179
203
|
plugins: [
|
|
180
204
|
syncJSON({
|
|
205
|
+
format: "i18next",
|
|
181
206
|
source: ({ key, locale }) => `./locales/${locale}/${key}.json`,
|
|
182
207
|
}),
|
|
183
208
|
],
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
---
|
|
2
2
|
createdAt: 2025-02-07
|
|
3
|
-
updatedAt: 2025-
|
|
3
|
+
updatedAt: 2025-12-13
|
|
4
4
|
title: Файл контента
|
|
5
5
|
description: Узнайте, как настраивать расширения для ваших файлов декларации контента. Следуйте этой документации, чтобы эффективно реализовывать условия в вашем проекте.
|
|
6
6
|
keywords:
|
|
@@ -12,6 +12,9 @@ slugs:
|
|
|
12
12
|
- concept
|
|
13
13
|
- content
|
|
14
14
|
history:
|
|
15
|
+
- version: 7.5.0
|
|
16
|
+
date: 2025-12-13
|
|
17
|
+
changes: Добавлена поддержка форматов ICU и i18next
|
|
15
18
|
- version: 6.0.0
|
|
16
19
|
date: 2025-09-20
|
|
17
20
|
changes: Добавлена документация по полям
|
|
@@ -386,6 +389,46 @@ Intlayer поддерживает различные типы содержимо
|
|
|
386
389
|
}
|
|
387
390
|
```
|
|
388
391
|
|
|
392
|
+
#### `format` ('intlayer' | 'icu' | 'i18next')
|
|
393
|
+
|
|
394
|
+
Указывает форматтер, который будет использоваться для содержимого словаря. Это позволяет использовать различные синтаксисы форматирования сообщений.
|
|
395
|
+
|
|
396
|
+
- `'intlayer'`: Форматтер Intlayer по умолчанию.
|
|
397
|
+
- `'icu'`: Использует форматирование сообщений ICU.
|
|
398
|
+
- `'i18next'`: Использует форматирование сообщений i18next.
|
|
399
|
+
|
|
400
|
+
**Пример:**
|
|
401
|
+
|
|
402
|
+
```typescript
|
|
403
|
+
{
|
|
404
|
+
key: "my-dictionary",
|
|
405
|
+
format: "icu",
|
|
406
|
+
content: {
|
|
407
|
+
message: "Hello {name}, you have {count, plural, one {# message} other {# messages}}"
|
|
408
|
+
}
|
|
409
|
+
}
|
|
410
|
+
```
|
|
411
|
+
|
|
412
|
+
#### `format` ('intlayer' | 'icu' | 'i18next')
|
|
413
|
+
|
|
414
|
+
Указывает форматтер для использования содержимого словаря. Это позволяет использовать различные синтаксисы форматирования сообщений.
|
|
415
|
+
|
|
416
|
+
- `'intlayer'`: Форматтер Intlayer по умолчанию.
|
|
417
|
+
- `'icu'`: Использует форматирование сообщений ICU.
|
|
418
|
+
- `'i18next'`: Использует форматирование сообщений i18next.
|
|
419
|
+
|
|
420
|
+
**Пример:**
|
|
421
|
+
|
|
422
|
+
```typescript
|
|
423
|
+
{
|
|
424
|
+
key: "my-dictionary",
|
|
425
|
+
format: "icu",
|
|
426
|
+
content: {
|
|
427
|
+
message: "Hello {name}, you have {count, plural, one {# message} other {# messages}}"
|
|
428
|
+
}
|
|
429
|
+
}
|
|
430
|
+
```
|
|
431
|
+
|
|
389
432
|
#### `locale` (LocalesValues)
|
|
390
433
|
|
|
391
434
|
Преобразует словарь в словарь для каждого локаля, где каждое поле, объявленное в содержимом, автоматически преобразуется в узел перевода. Когда это свойство установлено:
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
createdAt: 2024-03-07
|
|
3
3
|
updatedAt: 2025-10-03
|
|
4
4
|
title: Как перевести ваше Astro – руководство i18n 2025
|
|
5
|
-
description: Узнайте, как добавить интернационализацию (i18n)
|
|
5
|
+
description: Узнайте, как добавить интернационализацию (i18n) на ваш сайт Astro с помощью Intlayer. Следуйте этому руководству, чтобы сделать ваш сайт многоязычным.
|
|
6
6
|
keywords:
|
|
7
7
|
- Интернационализация
|
|
8
8
|
- Документация
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
createdAt: 2024-08-11
|
|
3
3
|
updatedAt: 2025-06-29
|
|
4
4
|
title: Как перевести ваше Express backend – руководство i18n 2025
|
|
5
|
-
description: Узнайте, как сделать ваш backend
|
|
5
|
+
description: Узнайте, как сделать ваш backend Express многоязычным. Следуйте документации для интернационализации (i18n) и перевода.
|
|
6
6
|
keywords:
|
|
7
7
|
- Интернационализация
|
|
8
8
|
- Документация
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
createdAt: 2025-09-09
|
|
3
3
|
updatedAt: 2025-09-09
|
|
4
4
|
title: Как перевести ваше Nest backend – руководство i18n 2025
|
|
5
|
-
description: Узнайте, как сделать ваш
|
|
5
|
+
description: Узнайте, как сделать ваш NestJS бэкенд многоязычным. Следуйте документации для интернационализации (i18n) и перевода.
|
|
6
6
|
keywords:
|
|
7
7
|
- Интернационализация
|
|
8
8
|
- Документация
|
|
@@ -421,6 +421,7 @@ const config: IntlayerConfig = {
|
|
|
421
421
|
plugins: [
|
|
422
422
|
// Синхронизируйте структуру папок по namespace с Intlayer
|
|
423
423
|
syncJSON({
|
|
424
|
+
format: "icu",
|
|
424
425
|
source: ({ key, locale }) => `./locales/${locale}/${key}.json`, // путь к JSON-файлам с переводами
|
|
425
426
|
}),
|
|
426
427
|
],
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
---
|
|
2
2
|
createdAt: 2025-09-09
|
|
3
|
-
updatedAt: 2025-
|
|
3
|
+
updatedAt: 2025-12-11
|
|
4
4
|
title: Как перевести ваше Tanstack Start – руководство i18n 2025
|
|
5
5
|
description: Узнайте, как добавить интернационализацию (i18n) в ваше приложение Tanstack Start с помощью Intlayer. Следуйте этому подробному руководству, чтобы сделать ваше приложение многоязычным с маршрутизацией, учитывающей локаль.
|
|
6
6
|
keywords:
|
|
@@ -636,17 +636,6 @@ export function NotFoundComponent() {
|
|
|
636
636
|
}
|
|
637
637
|
```
|
|
638
638
|
|
|
639
|
-
```tsx fileName="src/routes/__root.tsx"
|
|
640
|
-
import { createRootRoute } from "@tanstack/react-router";
|
|
641
|
-
|
|
642
|
-
// Корневой маршрут служит макетом верхнего уровня
|
|
643
|
-
// Он не обрабатывает 404 напрямую - это делегировано дочерним маршрутам
|
|
644
|
-
// Это сохраняет корень простым и позволяет маршрутам, осведомленным о локали, управлять своей собственной логикой 404
|
|
645
|
-
export const Route = createRootRoute({
|
|
646
|
-
component: Outlet,
|
|
647
|
-
});
|
|
648
|
-
```
|
|
649
|
-
|
|
650
639
|
```tsx fileName="src/routes/{-$locale}/route.tsx"
|
|
651
640
|
import { createFileRoute, Outlet, redirect } from "@tanstack/react-router";
|
|
652
641
|
import { validatePrefix } from "intlayer";
|