@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-09-09
|
|
3
|
-
updatedAt: 2025-
|
|
3
|
+
updatedAt: 2025-12-11
|
|
4
4
|
title: Cara menerjemahkan aplikasi Tanstack Start Anda – panduan i18n 2025
|
|
5
5
|
description: Pelajari cara menambahkan internasionalisasi (i18n) ke aplikasi Tanstack Start Anda menggunakan Intlayer. Ikuti panduan komprehensif ini untuk membuat aplikasi Anda multibahasa dengan routing yang mendukung locale.
|
|
6
6
|
keywords:
|
|
@@ -626,17 +626,6 @@ export function NotFoundComponent() {
|
|
|
626
626
|
}
|
|
627
627
|
```
|
|
628
628
|
|
|
629
|
-
```tsx fileName="src/routes/__root.tsx"
|
|
630
|
-
import { createRootRoute } from "@tanstack/react-router";
|
|
631
|
-
|
|
632
|
-
// Rute root berfungsi sebagai tata letak tingkat atas
|
|
633
|
-
// Tidak menangani 404 secara langsung - itu didelegasikan ke rute anak
|
|
634
|
-
// Ini menjaga root tetap sederhana dan memungkinkan rute yang sadar locale mengelola logika 404 mereka sendiri
|
|
635
|
-
export const Route = createRootRoute({
|
|
636
|
-
component: Outlet,
|
|
637
|
-
});
|
|
638
|
-
```
|
|
639
|
-
|
|
640
629
|
```tsx fileName="src/routes/{-$locale}/route.tsx"
|
|
641
630
|
import { createFileRoute, Outlet, redirect } from "@tanstack/react-router";
|
|
642
631
|
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 Sinkronisasi JSON
|
|
5
5
|
description: Sinkronkan kamus Intlayer dengan file JSON i18n pihak ketiga (i18next, next-intl, react-intl, vue-i18n, dan lainnya). Pertahankan i18n Anda yang sudah ada sambil menggunakan Intlayer untuk mengelola, menerjemahkan, dan menguji pesan Anda.
|
|
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: Menambahkan dukungan format ICU dan i18next
|
|
27
30
|
- version: 6.1.6
|
|
28
31
|
date: 2025-10-05
|
|
29
32
|
changes: Dokumentasi awal plugin Sinkronisasi JSON
|
|
30
33
|
---
|
|
31
34
|
|
|
32
|
-
# Sinkronisasi JSON (jembatan i18n)
|
|
35
|
+
# Sinkronisasi JSON (jembatan i18n) - Sinkronisasi JSON dengan dukungan ICU / i18next
|
|
33
36
|
|
|
34
37
|
<iframe title="Cara menjaga terjemahan JSON Anda tetap sinkron dengan 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, // wajib
|
|
106
109
|
location?: string, // label opsional, default: "plugin"
|
|
107
110
|
priority?: number, // prioritas opsional untuk resolusi konflik, default: 0
|
|
111
|
+
format?: 'intlayer' | 'icu' | 'i18next', // formatter opsional, default: 'intlayer'
|
|
108
112
|
});
|
|
109
113
|
```
|
|
110
114
|
|
|
115
|
+
#### `format` ('intlayer' | 'icu' | 'i18next')
|
|
116
|
+
|
|
117
|
+
Menentukan formatter yang akan digunakan untuk konten kamus saat menyinkronkan file JSON. Ini memungkinkan penggunaan berbagai sintaks pemformatan pesan yang kompatibel dengan berbagai pustaka i18n.
|
|
118
|
+
|
|
119
|
+
- `'intlayer'`: Formatter Intlayer default (default).
|
|
120
|
+
- `'icu'`: Menggunakan pemformatan pesan ICU (kompatibel dengan pustaka seperti react-intl, vue-i18n).
|
|
121
|
+
- `'i18next'`: Menggunakan pemformatan pesan i18next (kompatibel dengan i18next, next-i18next, Solid-i18next).
|
|
122
|
+
|
|
123
|
+
**Contoh:**
|
|
124
|
+
|
|
125
|
+
```ts
|
|
126
|
+
syncJSON({
|
|
127
|
+
source: ({ key, locale }) => `./locales/${locale}/${key}.json`,
|
|
128
|
+
format: "i18next", // Gunakan pemformatan i18next untuk kompatibilitas
|
|
129
|
+
}),
|
|
130
|
+
```
|
|
131
|
+
|
|
111
132
|
## Beberapa sumber JSON dan prioritas
|
|
112
133
|
|
|
113
134
|
Anda dapat menambahkan beberapa plugin `syncJSON` untuk menyinkronkan berbagai sumber JSON. Ini berguna ketika Anda memiliki beberapa pustaka i18n atau struktur JSON yang berbeda dalam proyek Anda.
|
|
@@ -134,6 +155,7 @@ export default defineConfig({
|
|
|
134
155
|
plugins: [
|
|
135
156
|
// Sumber JSON utama (prioritas tertinggi)
|
|
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
|
// Sumber JSON cadangan (prioritas lebih rendah)
|
|
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
|
// Sumber JSON Legacy (prioritas terendah)
|
|
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: File di Contenuto
|
|
5
5
|
description: Scopri come personalizzare le estensioni per i tuoi file di dichiarazione dei contenuti. Segui questa documentazione per implementare condizioni in modo efficiente nel tuo progetto.
|
|
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: Aggiunto supporto per i formati ICU e i18next
|
|
15
18
|
- version: 6.0.0
|
|
16
19
|
date: 2025-09-20
|
|
17
20
|
changes: Aggiunta documentazione dei campi
|
|
@@ -386,6 +389,26 @@ Array di stringhe per categorizzare e organizzare i dizionari. I tag forniscono
|
|
|
386
389
|
}
|
|
387
390
|
```
|
|
388
391
|
|
|
392
|
+
#### `format` ('intlayer' | 'icu' | 'i18next')
|
|
393
|
+
|
|
394
|
+
Specifica il formattatore da utilizzare per il contenuto del dizionario. Ciò consente di utilizzare diverse sintassi di formattazione dei messaggi.
|
|
395
|
+
|
|
396
|
+
- `'intlayer'`: Il formattatore Intlayer predefinito.
|
|
397
|
+
- `'icu'`: Utilizza la formattazione dei messaggi ICU.
|
|
398
|
+
- `'i18next'`: Utilizza la formattazione dei messaggi i18next.
|
|
399
|
+
|
|
400
|
+
**Esempio:**
|
|
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
|
+
|
|
389
412
|
#### `locale` (LocalesValues)
|
|
390
413
|
|
|
391
414
|
Trasforma il dizionario in un dizionario per locale in cui ogni campo dichiarato nel contenuto sarà automaticamente trasformato in un nodo di traduzione. Quando questa proprietà è impostata:
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
createdAt: 2024-03-07
|
|
3
3
|
updatedAt: 2025-10-03
|
|
4
4
|
title: Come tradurre la tua Astro – guida i18n 2025
|
|
5
|
-
description: Scopri come aggiungere l'internazionalizzazione (i18n)
|
|
5
|
+
description: Scopri come aggiungere l'internazionalizzazione (i18n) al tuo sito web Astro usando Intlayer. Segui questa guida per rendere il tuo sito multilingue.
|
|
6
6
|
keywords:
|
|
7
7
|
- Internazionalizzazione
|
|
8
8
|
- Documentazione
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
createdAt: 2024-08-11
|
|
3
3
|
updatedAt: 2025-06-29
|
|
4
4
|
title: Come tradurre la tua Express backend – guida i18n 2025
|
|
5
|
-
description: Scopri come rendere il tuo backend
|
|
5
|
+
description: Scopri come rendere il tuo backend Express multilingue. Segui la documentazione per internazionalizzare (i18n) e tradurlo.
|
|
6
6
|
keywords:
|
|
7
7
|
- Internazionalizzazione
|
|
8
8
|
- Documentazione
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
createdAt: 2025-09-09
|
|
3
3
|
updatedAt: 2025-09-09
|
|
4
4
|
title: Come tradurre la tua Nest backend – guida i18n 2025
|
|
5
|
-
description: Scopri come rendere il tuo backend
|
|
5
|
+
description: Scopri come rendere il tuo backend NestJS multilingue. Segui la documentazione per internazionalizzare (i18n) e tradurlo.
|
|
6
6
|
keywords:
|
|
7
7
|
- Internazionalizzazione
|
|
8
8
|
- Documentazione
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
---
|
|
2
2
|
createdAt: 2025-09-09
|
|
3
|
-
updatedAt: 2025-
|
|
3
|
+
updatedAt: 2025-12-11
|
|
4
4
|
title: Come tradurre la tua Tanstack Start – guida i18n 2025
|
|
5
5
|
description: Scopri come aggiungere l'internazionalizzazione (i18n) alla tua applicazione Tanstack Start utilizzando Intlayer. Segui questa guida completa per rendere la tua app multilingue con il routing consapevole della localizzazione.
|
|
6
6
|
keywords:
|
|
@@ -656,17 +656,6 @@ export function NotFoundComponent() {
|
|
|
656
656
|
}
|
|
657
657
|
```
|
|
658
658
|
|
|
659
|
-
```tsx fileName="src/routes/__root.tsx"
|
|
660
|
-
import { createRootRoute } from "@tanstack/react-router";
|
|
661
|
-
|
|
662
|
-
// La route radice funge da layout di livello superiore
|
|
663
|
-
// Non gestisce i 404 direttamente - questo è delegato alle route figlie
|
|
664
|
-
// Questo mantiene la radice semplice e consente alle route consapevoli della locale di gestire la propria logica 404
|
|
665
|
-
export const Route = createRootRoute({
|
|
666
|
-
component: Outlet,
|
|
667
|
-
});
|
|
668
|
-
```
|
|
669
|
-
|
|
670
659
|
```tsx fileName="src/routes/{-$locale}/route.tsx"
|
|
671
660
|
import { createFileRoute, Outlet, redirect } from "@tanstack/react-router";
|
|
672
661
|
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: Sincronizza i dizionari Intlayer con file JSON i18n di terze parti (i18next, next-intl, react-intl, vue-i18n e altri). Mantieni il tuo i18n esistente mentre usi Intlayer per gestire, tradurre e testare i tuoi messaggi.
|
|
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: Aggiunto supporto per i formati ICU e i18next
|
|
27
30
|
- version: 6.1.6
|
|
28
31
|
date: 2025-10-05
|
|
29
32
|
changes: Documentazione iniziale del plugin Sync JSON
|
|
30
33
|
---
|
|
31
34
|
|
|
32
|
-
# Sync JSON (ponti i18n)
|
|
35
|
+
# Sync JSON (ponti i18n) - Sync JSON con supporto ICU / i18next
|
|
33
36
|
|
|
34
37
|
<iframe title="Come mantenere sincronizzate le tue traduzioni JSON con 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, // richiesto
|
|
106
109
|
location?: string, // etichetta opzionale, predefinito: "plugin"
|
|
107
110
|
priority?: number, // priorità opzionale per la risoluzione dei conflitti, predefinito: 0
|
|
111
|
+
format?: 'intlayer' | 'icu' | 'i18next', // formattatore opzionale, predefinito: 'intlayer'
|
|
108
112
|
});
|
|
109
113
|
```
|
|
110
114
|
|
|
115
|
+
#### `format` ('intlayer' | 'icu' | 'i18next')
|
|
116
|
+
|
|
117
|
+
Specifica il formattatore da utilizzare per il contenuto del dizionario durante la sincronizzazione dei file JSON. Ciò consente di utilizzare diverse sintassi di formattazione dei messaggi compatibili con varie librerie i18n.
|
|
118
|
+
|
|
119
|
+
- `'intlayer'`: Il formattatore Intlayer predefinito (predefinito).
|
|
120
|
+
- `'icu'`: Utilizza la formattazione dei messaggi ICU (compatibile con librerie come react-intl, vue-i18n).
|
|
121
|
+
- `'i18next'`: Utilizza la formattazione dei messaggi i18next (compatibile con i18next, next-i18next, Solid-i18next).
|
|
122
|
+
|
|
123
|
+
**Esempio:**
|
|
124
|
+
|
|
125
|
+
```ts
|
|
126
|
+
syncJSON({
|
|
127
|
+
source: ({ key, locale }) => `./locales/${locale}/${key}.json`,
|
|
128
|
+
format: "i18next", // Usare la formattazione i18next per la compatibilità
|
|
129
|
+
}),
|
|
130
|
+
```
|
|
131
|
+
|
|
111
132
|
## Più sorgenti JSON e priorità
|
|
112
133
|
|
|
113
134
|
Puoi aggiungere più plugin `syncJSON` per sincronizzare diverse sorgenti JSON. Questo è utile quando hai più librerie i18n o diverse strutture JSON nel tuo progetto.
|
|
@@ -134,6 +155,7 @@ export default defineConfig({
|
|
|
134
155
|
plugins: [
|
|
135
156
|
// Sorgente JSON primaria (priorità più alta)
|
|
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
|
// Sorgente JSON di fallback (priorità più bassa)
|
|
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
|
// Sorgente JSON legacy (priorità più bassa)
|
|
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: フィールドのドキュメントを追加
|
|
@@ -387,6 +390,26 @@ Intlayerの辞書は`Dictionary`型で定義され、その動作を制御する
|
|
|
387
390
|
}
|
|
388
391
|
```
|
|
389
392
|
|
|
393
|
+
#### `format` ('intlayer' | 'icu' | 'i18next')
|
|
394
|
+
|
|
395
|
+
辞書コンテンツに使用するフォーマッターを指定します。これにより、異なるメッセージフォーマット構文を使用できます。
|
|
396
|
+
|
|
397
|
+
- `'intlayer'`: デフォルトのIntlayerフォーマッター。
|
|
398
|
+
- `'icu'`: ICUメッセージフォーマットを使用します。
|
|
399
|
+
- `'i18next'`: i18nextメッセージフォーマットを使用します。
|
|
400
|
+
|
|
401
|
+
**例:**
|
|
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
|
辞書をロケールごとの辞書に変換し、content内で宣言された各フィールドが自動的に翻訳ノードに変換されます。このプロパティが設定されている場合:
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
createdAt: 2024-03-07
|
|
3
3
|
updatedAt: 2025-10-03
|
|
4
4
|
title: Astroアプリを翻訳する方法 – i18nガイド 2025
|
|
5
|
-
description: Intlayerを使用して
|
|
5
|
+
description: Intlayerを使用してAstroウェブサイトに国際化(i18n)を追加する方法を学びます。このガイドに従ってサイトを多言語対応にしましょう。
|
|
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:
|
|
5
|
+
description: 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
|
- ドキュメント
|
|
@@ -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: Intlayerを使ってTanstack Startアプリケーションに国際化(i18n)を追加する方法を学びます。ロケール対応ルーティングで多言語対応アプリを作成するための包括的なガイドです。
|
|
6
6
|
keywords:
|
|
@@ -628,17 +628,6 @@ export function NotFoundComponent() {
|
|
|
628
628
|
}
|
|
629
629
|
```
|
|
630
630
|
|
|
631
|
-
```tsx fileName="src/routes/__root.tsx"
|
|
632
|
-
import { createRootRoute } from "@tanstack/react-router";
|
|
633
|
-
|
|
634
|
-
// ルートルートは最上位レイアウトとして機能します
|
|
635
|
-
// 404を直接処理しません - それは子ルートに委任されます
|
|
636
|
-
// これにより、ルートをシンプルに保ち、ロケール対応ルートが独自の404ロジックを管理できるようになります
|
|
637
|
-
export const Route = createRootRoute({
|
|
638
|
-
component: Outlet,
|
|
639
|
-
});
|
|
640
|
-
```
|
|
641
|
-
|
|
642
631
|
```tsx fileName="src/routes/{-$locale}/route.tsx"
|
|
643
632
|
import { createFileRoute, Outlet, redirect } from "@tanstack/react-router";
|
|
644
633
|
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: 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: 콘텐츠 파일
|
|
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 @@ content: { /* ... */ }
|
|
|
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
|
사전을 각 로케일별 사전으로 변환하며, content에 선언된 각 필드는 자동으로 번역 노드로 변환됩니다. 이 속성이 설정되면:
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
createdAt: 2024-03-07
|
|
3
3
|
updatedAt: 2025-10-03
|
|
4
4
|
title: Astro 앱 번역하는 방법 – i18n 가이드 2025
|
|
5
|
-
description: Intlayer를 사용하여
|
|
5
|
+
description: Intlayer를 사용하여 Astro 웹사이트에 국제화(i18n)를 추가하는 방법을 배우세요. 이 가이드를 따라 사이트를 다국어로 만드세요.
|
|
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:
|
|
5
|
+
description: 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
|
- 문서
|
|
@@ -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: Intlayer를 사용하여 Tanstack Start 애플리케이션에 국제화(i18n)를 추가하는 방법을 배우세요. 로케일 인식 라우팅으로 앱을 다국어 지원으로 만드는 종합 가이드를 따르세요.
|
|
6
6
|
keywords:
|
|
@@ -633,17 +633,6 @@ export function NotFoundComponent() {
|
|
|
633
633
|
}
|
|
634
634
|
```
|
|
635
635
|
|
|
636
|
-
```tsx fileName="src/routes/__root.tsx"
|
|
637
|
-
import { createRootRoute } from "@tanstack/react-router";
|
|
638
|
-
|
|
639
|
-
// 루트 경로는 최상위 레이아웃 역할을 합니다
|
|
640
|
-
// 404를 직접 처리하지 않습니다 - 이것은 자식 경로에 위임됩니다
|
|
641
|
-
// 이것은 루트를 단순하게 유지하고 로케일 인식 경로가 자체 404 로직을 관리할 수 있게 합니다
|
|
642
|
-
export const Route = createRootRoute({
|
|
643
|
-
component: Outlet,
|
|
644
|
-
});
|
|
645
|
-
```
|
|
646
|
-
|
|
647
636
|
```tsx fileName="src/routes/{-$locale}/route.tsx"
|
|
648
637
|
import { createFileRoute, Outlet, redirect } from "@tanstack/react-router";
|
|
649
638
|
import { validatePrefix } from "intlayer";
|