@intlayer/docs 8.9.4-canary.0 → 8.9.5
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/dist/cjs/generated/docs.entry.cjs +20 -0
- package/dist/cjs/generated/docs.entry.cjs.map +1 -1
- package/dist/esm/generated/docs.entry.mjs +20 -0
- package/dist/esm/generated/docs.entry.mjs.map +1 -1
- package/dist/types/generated/docs.entry.d.ts +1 -0
- package/dist/types/generated/docs.entry.d.ts.map +1 -1
- package/docs/ar/benchmark/index.md +0 -3
- package/docs/ar/benchmark/nextjs.md +15 -6
- package/docs/ar/benchmark/solid.md +155 -0
- package/docs/ar/benchmark/svelte.md +148 -0
- package/docs/ar/benchmark/tanstack.md +12 -3
- package/docs/ar/benchmark/vue.md +160 -0
- package/docs/ar/configuration.md +16 -12
- package/docs/ar/dictionary/content_file.md +51 -1
- package/docs/ar/mcp_server.md +30 -17
- package/docs/ar/plugins/sync-po.md +333 -0
- package/docs/bn/configuration.md +16 -12
- package/docs/cs/configuration.md +16 -12
- package/docs/de/benchmark/index.md +0 -3
- package/docs/de/benchmark/nextjs.md +15 -6
- package/docs/de/benchmark/solid.md +155 -0
- package/docs/de/benchmark/svelte.md +148 -0
- package/docs/de/benchmark/tanstack.md +12 -3
- package/docs/de/benchmark/vue.md +160 -0
- package/docs/de/configuration.md +16 -12
- package/docs/de/dictionary/content_file.md +52 -2
- package/docs/de/mcp_server.md +29 -16
- package/docs/de/plugins/sync-po.md +332 -0
- package/docs/en/benchmark/nextjs.md +11 -2
- package/docs/en/benchmark/solid.md +22 -4
- package/docs/en/benchmark/svelte.md +17 -5
- package/docs/en/benchmark/tanstack.md +18 -3
- package/docs/en/benchmark/vue.md +17 -11
- package/docs/en/configuration.md +16 -13
- package/docs/en/dictionary/content_file.md +51 -1
- package/docs/en/mcp_server.md +31 -18
- package/docs/en/plugins/sync-po.md +333 -0
- package/docs/en-GB/benchmark/index.md +0 -3
- package/docs/en-GB/benchmark/nextjs.md +15 -6
- package/docs/en-GB/benchmark/solid.md +155 -0
- package/docs/en-GB/benchmark/svelte.md +148 -0
- package/docs/en-GB/benchmark/tanstack.md +12 -3
- package/docs/en-GB/benchmark/vue.md +160 -0
- package/docs/en-GB/configuration.md +15 -11
- package/docs/en-GB/dictionary/content_file.md +51 -1
- package/docs/en-GB/mcp_server.md +31 -18
- package/docs/en-GB/plugins/sync-po.md +333 -0
- package/docs/es/benchmark/index.md +0 -3
- package/docs/es/benchmark/nextjs.md +15 -6
- package/docs/es/benchmark/solid.md +155 -0
- package/docs/es/benchmark/svelte.md +148 -0
- package/docs/es/benchmark/tanstack.md +12 -3
- package/docs/es/benchmark/vue.md +160 -0
- package/docs/es/configuration.md +16 -12
- package/docs/es/dictionary/content_file.md +51 -1
- package/docs/es/mcp_server.md +30 -17
- package/docs/es/plugins/sync-po.md +333 -0
- package/docs/fr/benchmark/index.md +0 -3
- package/docs/fr/benchmark/nextjs.md +15 -6
- package/docs/fr/benchmark/solid.md +155 -0
- package/docs/fr/benchmark/svelte.md +148 -0
- package/docs/fr/benchmark/tanstack.md +12 -3
- package/docs/fr/benchmark/vue.md +160 -0
- package/docs/fr/configuration.md +16 -12
- package/docs/fr/dictionary/content_file.md +51 -1
- package/docs/fr/mcp_server.md +30 -17
- package/docs/fr/plugins/sync-po.md +333 -0
- package/docs/hi/benchmark/nextjs.md +15 -6
- package/docs/hi/benchmark/solid.md +155 -0
- package/docs/hi/benchmark/svelte.md +148 -0
- package/docs/hi/benchmark/tanstack.md +12 -3
- package/docs/hi/benchmark/vue.md +160 -0
- package/docs/hi/configuration.md +16 -12
- package/docs/hi/dictionary/content_file.md +51 -1
- package/docs/hi/mcp_server.md +31 -18
- package/docs/hi/plugins/sync-po.md +333 -0
- package/docs/id/benchmark/index.md +0 -3
- package/docs/id/benchmark/nextjs.md +15 -6
- package/docs/id/benchmark/solid.md +155 -0
- package/docs/id/benchmark/svelte.md +148 -0
- package/docs/id/benchmark/tanstack.md +12 -3
- package/docs/id/benchmark/vue.md +160 -0
- package/docs/id/configuration.md +16 -12
- package/docs/id/dictionary/content_file.md +51 -1
- package/docs/id/mcp_server.md +30 -17
- package/docs/id/plugins/sync-po.md +333 -0
- package/docs/it/benchmark/index.md +1 -4
- package/docs/it/benchmark/nextjs.md +15 -6
- package/docs/it/benchmark/solid.md +155 -0
- package/docs/it/benchmark/svelte.md +148 -0
- package/docs/it/benchmark/tanstack.md +12 -3
- package/docs/it/benchmark/vue.md +160 -0
- package/docs/it/configuration.md +16 -12
- package/docs/it/dictionary/content_file.md +51 -1
- package/docs/it/mcp_server.md +30 -17
- package/docs/it/plugins/sync-po.md +333 -0
- package/docs/ja/benchmark/index.md +5 -5
- package/docs/ja/benchmark/nextjs.md +15 -6
- package/docs/ja/benchmark/solid.md +155 -0
- package/docs/ja/benchmark/svelte.md +148 -0
- package/docs/ja/benchmark/tanstack.md +12 -3
- package/docs/ja/benchmark/vue.md +160 -0
- package/docs/ja/configuration.md +16 -12
- package/docs/ja/dictionary/content_file.md +50 -2
- package/docs/ja/intlayer_with_nextjs_no_locale_path.md +4 -3
- package/docs/ja/mcp_server.md +29 -16
- package/docs/ja/plugins/sync-po.md +333 -0
- package/docs/ko/benchmark/nextjs.md +15 -6
- package/docs/ko/benchmark/solid.md +155 -0
- package/docs/ko/benchmark/svelte.md +148 -0
- package/docs/ko/benchmark/tanstack.md +12 -3
- package/docs/ko/benchmark/vue.md +160 -0
- package/docs/ko/configuration.md +16 -12
- package/docs/ko/dictionary/content_file.md +51 -1
- package/docs/ko/intlayer_with_nextjs_no_locale_path.md +3 -2
- package/docs/ko/mcp_server.md +31 -18
- package/docs/ko/plugins/sync-po.md +333 -0
- package/docs/nl/configuration.md +16 -12
- package/docs/pl/benchmark/index.md +0 -3
- package/docs/pl/benchmark/nextjs.md +15 -6
- package/docs/pl/benchmark/solid.md +155 -0
- package/docs/pl/benchmark/svelte.md +148 -0
- package/docs/pl/benchmark/tanstack.md +12 -3
- package/docs/pl/benchmark/vue.md +160 -0
- package/docs/pl/configuration.md +16 -12
- package/docs/pl/dictionary/content_file.md +51 -1
- package/docs/pl/mcp_server.md +30 -17
- package/docs/pl/plugins/sync-po.md +333 -0
- package/docs/pt/benchmark/index.md +0 -3
- package/docs/pt/benchmark/nextjs.md +16 -7
- package/docs/pt/benchmark/solid.md +155 -0
- package/docs/pt/benchmark/svelte.md +148 -0
- package/docs/pt/benchmark/tanstack.md +13 -4
- package/docs/pt/benchmark/vue.md +160 -0
- package/docs/pt/configuration.md +16 -12
- package/docs/pt/dictionary/content_file.md +51 -1
- package/docs/pt/mcp_server.md +30 -17
- package/docs/pt/plugins/sync-po.md +333 -0
- package/docs/ru/benchmark/nextjs.md +15 -6
- package/docs/ru/benchmark/solid.md +155 -0
- package/docs/ru/benchmark/svelte.md +148 -0
- package/docs/ru/benchmark/tanstack.md +12 -3
- package/docs/ru/benchmark/vue.md +160 -0
- package/docs/ru/configuration.md +16 -12
- package/docs/ru/dictionary/content_file.md +52 -2
- package/docs/ru/mcp_server.md +30 -17
- package/docs/ru/plugins/sync-po.md +333 -0
- package/docs/tr/benchmark/index.md +0 -3
- package/docs/tr/benchmark/nextjs.md +15 -6
- package/docs/tr/benchmark/solid.md +155 -0
- package/docs/tr/benchmark/svelte.md +148 -0
- package/docs/tr/benchmark/tanstack.md +12 -3
- package/docs/tr/benchmark/vue.md +160 -0
- package/docs/tr/configuration.md +16 -12
- package/docs/tr/dictionary/content_file.md +51 -1
- package/docs/tr/mcp_server.md +31 -18
- package/docs/tr/plugins/sync-po.md +333 -0
- package/docs/uk/benchmark/nextjs.md +15 -6
- package/docs/uk/benchmark/solid.md +155 -0
- package/docs/uk/benchmark/svelte.md +148 -0
- package/docs/uk/benchmark/tanstack.md +12 -3
- package/docs/uk/benchmark/vue.md +160 -0
- package/docs/uk/configuration.md +16 -12
- package/docs/uk/dictionary/content_file.md +51 -1
- package/docs/uk/mcp_server.md +29 -16
- package/docs/uk/plugins/sync-po.md +333 -0
- package/docs/ur/configuration.md +16 -12
- package/docs/vi/benchmark/index.md +0 -3
- package/docs/vi/benchmark/nextjs.md +15 -6
- package/docs/vi/benchmark/solid.md +155 -0
- package/docs/vi/benchmark/svelte.md +148 -0
- package/docs/vi/benchmark/tanstack.md +12 -3
- package/docs/vi/benchmark/vue.md +160 -0
- package/docs/vi/configuration.md +16 -12
- package/docs/vi/dictionary/content_file.md +51 -1
- package/docs/vi/intlayer_with_nextjs_15.md +10 -57
- package/docs/vi/mcp_server.md +30 -17
- package/docs/vi/plugins/sync-po.md +333 -0
- package/docs/zh/benchmark/nextjs.md +15 -6
- package/docs/zh/benchmark/solid.md +155 -0
- package/docs/zh/benchmark/svelte.md +148 -0
- package/docs/zh/benchmark/tanstack.md +12 -3
- package/docs/zh/benchmark/vue.md +160 -0
- package/docs/zh/configuration.md +16 -12
- package/docs/zh/dictionary/content_file.md +51 -3
- package/docs/zh/mcp_server.md +31 -18
- package/docs/zh/plugins/sync-po.md +333 -0
- package/frequent_questions/ar/intlayerNode.md +3 -3
- package/frequent_questions/de/intlayerNode.md +3 -3
- package/frequent_questions/en/intlayerNode.md +3 -3
- package/frequent_questions/en-GB/intlayerNode.md +3 -3
- package/frequent_questions/es/intlayerNode.md +3 -3
- package/frequent_questions/fr/intlayerNode.md +3 -3
- package/frequent_questions/hi/intlayerNode.md +3 -3
- package/frequent_questions/id/intlayerNode.md +3 -3
- package/frequent_questions/it/intlayerNode.md +3 -3
- package/frequent_questions/ja/intlayerNode.md +3 -3
- package/frequent_questions/ko/intlayerNode.md +3 -3
- package/frequent_questions/pl/intlayerNode.md +3 -3
- package/frequent_questions/pt/intlayerNode.md +3 -3
- package/frequent_questions/ru/intlayerNode.md +3 -3
- package/frequent_questions/tr/intlayerNode.md +3 -3
- package/frequent_questions/uk/intlayerNode.md +3 -3
- package/frequent_questions/vi/intlayerNode.md +3 -3
- package/frequent_questions/zh/intlayerNode.md +3 -3
- package/package.json +8 -8
- package/src/generated/docs.entry.ts +20 -0
package/docs/id/mcp_server.md
CHANGED
|
@@ -23,7 +23,7 @@ history:
|
|
|
23
23
|
changes: "Menambahkan pengaturan Claude Desktop"
|
|
24
24
|
- version: 5.5.12
|
|
25
25
|
date: 2025-07-10
|
|
26
|
-
changes: "Menambahkan transport
|
|
26
|
+
changes: "Menambahkan transport Streamable HTTP dan server jarak jauh"
|
|
27
27
|
- version: 5.5.10
|
|
28
28
|
date: 2025-06-29
|
|
29
29
|
changes: "Inisialisasi riwayat"
|
|
@@ -51,12 +51,12 @@ Dengan mengaktifkan Intlayer MCP Server di IDE Anda, Anda membuka:
|
|
|
51
51
|
|
|
52
52
|
> Lihat daftar lengkap perintah dan opsi di [dokumentasi Intlayer CLI](https://github.com/aymericzip/intlayer/blob/main/docs/docs/id/cli/index.md).
|
|
53
53
|
|
|
54
|
-
## Server lokal (stdio) vs Server jarak jauh (
|
|
54
|
+
## Server lokal (stdio) vs Server jarak jauh (Streamable HTTP)
|
|
55
55
|
|
|
56
56
|
Server MCP dapat digunakan dengan dua cara:
|
|
57
57
|
|
|
58
58
|
- Server lokal (stdio)
|
|
59
|
-
- Server jarak jauh (
|
|
59
|
+
- Server jarak jauh (Streamable HTTP)
|
|
60
60
|
|
|
61
61
|
### Server lokal (stdio) (direkomendasikan)
|
|
62
62
|
|
|
@@ -64,7 +64,7 @@ Intlayer menyediakan paket NPM yang dapat diinstal secara lokal di mesin Anda. P
|
|
|
64
64
|
|
|
65
65
|
Server ini adalah cara yang direkomendasikan untuk menggunakan server MCP. Karena server ini mengintegrasikan semua fitur dari server MCP, termasuk alat CLI.
|
|
66
66
|
|
|
67
|
-
### Server jarak jauh (
|
|
67
|
+
### Server jarak jauh (Streamable HTTP)
|
|
68
68
|
|
|
69
69
|
Server MCP juga dapat digunakan secara jarak jauh, menggunakan metode transport SSE. Server ini dihosting oleh Intlayer, dan tersedia di https://mcp.intlayer.org. Server ini dapat diakses secara publik, tanpa autentikasi, dan gratis untuk digunakan.
|
|
70
70
|
|
|
@@ -97,7 +97,7 @@ bun x intlayer init mcp
|
|
|
97
97
|
Perintah ini akan:
|
|
98
98
|
|
|
99
99
|
1. Menanyakan platform apa yang Anda gunakan (Cursor, VS Code, Claude Desktop, dll.).
|
|
100
|
-
2. Menanyakan metode transportasi apa yang ingin Anda gunakan (Server lokal (stdio) atau Server jarak jauh (
|
|
100
|
+
2. Menanyakan metode transportasi apa yang ingin Anda gunakan (Server lokal (stdio) atau Server jarak jauh (Streamable HTTP)).
|
|
101
101
|
3. Secara otomatis memperbarui file konfigurasi Anda (misalnya, `.cursor/mcp.json`, `.vscode/mcp.json`, atau konfigurasi global Claude Desktop).
|
|
102
102
|
|
|
103
103
|
---
|
|
@@ -107,7 +107,7 @@ Perintah ini akan:
|
|
|
107
107
|
1. Buka Command Palette (Ctrl+Shift+P atau Cmd+Shift+P).
|
|
108
108
|
2. Ketik `Intlayer: Setup AI Agent Skills`
|
|
109
109
|
3. Pilih platform yang Anda gunakan (mis. `VS Code`, `Cursor`, `Windsurf`, `OpenCode`, `Claude Code`, `GitHub Copilot Workspace`, dll.).
|
|
110
|
-
4. Pilih MCP yang akan diinstal (stdio,
|
|
110
|
+
4. Pilih MCP yang akan diinstal (stdio, Streamable HTTP)
|
|
111
111
|
5. Tekan Enter.
|
|
112
112
|
|
|
113
113
|
---
|
|
@@ -131,16 +131,16 @@ Di root proyek Anda, tambahkan file konfigurasi `.cursor/mcp.json` berikut:
|
|
|
131
131
|
}
|
|
132
132
|
```
|
|
133
133
|
|
|
134
|
-
### Server jarak jauh (
|
|
134
|
+
### Server jarak jauh (Streamable HTTP)
|
|
135
135
|
|
|
136
|
-
Untuk menghubungkan ke server Intlayer MCP jarak jauh menggunakan Server-Sent Events (
|
|
136
|
+
Untuk menghubungkan ke server Intlayer MCP jarak jauh menggunakan Server-Sent Events (Streamable HTTP), Anda dapat mengonfigurasi klien MCP Anda untuk terhubung ke layanan yang dihosting.
|
|
137
137
|
|
|
138
138
|
```json fileName=".cursor/mcp.json"
|
|
139
139
|
{
|
|
140
140
|
"mcpServers": {
|
|
141
|
-
"intlayer": {
|
|
142
|
-
"
|
|
143
|
-
"
|
|
141
|
+
"intlayer-sse": {
|
|
142
|
+
"command": "npx",
|
|
143
|
+
"args": ["-y", "mcp-remote@latest", "https://mcp.intlayer.org"]
|
|
144
144
|
}
|
|
145
145
|
}
|
|
146
146
|
}
|
|
@@ -172,16 +172,16 @@ Buat file `.vscode/mcp.json` di root proyek Anda:
|
|
|
172
172
|
}
|
|
173
173
|
```
|
|
174
174
|
|
|
175
|
-
### Server jarak jauh (
|
|
175
|
+
### Server jarak jauh (Streamable HTTP)
|
|
176
176
|
|
|
177
|
-
Untuk menghubungkan ke server Intlayer MCP jarak jauh menggunakan Server-Sent Events (
|
|
177
|
+
Untuk menghubungkan ke server Intlayer MCP jarak jauh menggunakan Server-Sent Events (Streamable HTTP), Anda dapat mengonfigurasi klien MCP Anda untuk terhubung ke layanan yang dihosting.
|
|
178
178
|
|
|
179
179
|
```json fileName=".vscode/mcp.json"
|
|
180
180
|
{
|
|
181
181
|
"servers": {
|
|
182
|
-
"intlayer": {
|
|
183
|
-
"
|
|
184
|
-
"
|
|
182
|
+
"intlayer-sse": {
|
|
183
|
+
"command": "npx",
|
|
184
|
+
"args": ["-y", "mcp-remote@latest", "https://mcp.intlayer.org"]
|
|
185
185
|
}
|
|
186
186
|
}
|
|
187
187
|
}
|
|
@@ -191,7 +191,7 @@ Untuk menghubungkan ke server Intlayer MCP jarak jauh menggunakan Server-Sent Ev
|
|
|
191
191
|
|
|
192
192
|
## Pengaturan di ChatGPT
|
|
193
193
|
|
|
194
|
-
### Server jarak jauh (
|
|
194
|
+
### Server jarak jauh (Streamable HTTP)
|
|
195
195
|
|
|
196
196
|
Ikuti [dokumentasi resmi](https://platform.openai.com/docs/mcp#test-and-connect-your-mcp-server) untuk mengonfigurasi server MCP di ChatGPT.
|
|
197
197
|
|
|
@@ -232,6 +232,19 @@ Lokasi file konfigurasi:
|
|
|
232
232
|
}
|
|
233
233
|
```
|
|
234
234
|
|
|
235
|
+
### Server jarak jauh (Streamable HTTP)
|
|
236
|
+
|
|
237
|
+
```json fileName="claude_desktop_config.json"
|
|
238
|
+
{
|
|
239
|
+
"mcpServers": {
|
|
240
|
+
"intlayer-sse": {
|
|
241
|
+
"command": "npx",
|
|
242
|
+
"args": ["-y", "mcp-remote@latest", "https://mcp.intlayer.org"]
|
|
243
|
+
}
|
|
244
|
+
}
|
|
245
|
+
}
|
|
246
|
+
```
|
|
247
|
+
|
|
235
248
|
---
|
|
236
249
|
|
|
237
250
|
## Menggunakan MCP Server melalui CLI
|
|
@@ -0,0 +1,333 @@
|
|
|
1
|
+
---
|
|
2
|
+
createdAt: 2026-05-10
|
|
3
|
+
updatedAt: 2026-05-10
|
|
4
|
+
title: Plugin Sync PO
|
|
5
|
+
description: Sinkronkan kamus Intlayer dengan file Gettext PO. Pertahankan i18n Anda yang sudah ada sambil menggunakan Intlayer untuk mengelola, menerjemahkan, dan menguji pesan Anda.
|
|
6
|
+
keywords:
|
|
7
|
+
- Intlayer
|
|
8
|
+
- Sync PO
|
|
9
|
+
- Gettext
|
|
10
|
+
- i18n
|
|
11
|
+
- terjemahan
|
|
12
|
+
slugs:
|
|
13
|
+
- doc
|
|
14
|
+
- plugin
|
|
15
|
+
- sync-po
|
|
16
|
+
youtubeVideo: https://www.youtube.com/watch?v=MpGMxniDHNg
|
|
17
|
+
history:
|
|
18
|
+
- version: 8.9.4
|
|
19
|
+
date: 2026-05-10
|
|
20
|
+
changes: "Dokumentasi awal plugin Sync PO"
|
|
21
|
+
---
|
|
22
|
+
|
|
23
|
+
# Sync PO (jembatan i18n) - Sync PO dengan dukungan ICU / i18next
|
|
24
|
+
|
|
25
|
+
Gunakan Intlayer sebagai tambahan untuk stack i18n Anda yang sudah ada. Plugin ini menjaga pesan Gettext PO Anda tetap sinkron dengan kamus Intlayer sehingga Anda dapat:
|
|
26
|
+
|
|
27
|
+
- Mempertahankan alur kerja terjemahan berbasis PO yang sudah ada.
|
|
28
|
+
- Mengelola dan menerjemahkan pesan Anda dengan Intlayer (CLI, CI, penyedia, CMS), tanpa merombak aplikasi Anda.
|
|
29
|
+
- Mengirimkan tutorial dan konten SEO yang menargetkan setiap ekosistem, sambil menyarankan Intlayer sebagai lapisan manajemen PO.
|
|
30
|
+
|
|
31
|
+
Catatan dan cakupan saat ini:
|
|
32
|
+
|
|
33
|
+
- Eksternalisasi ke CMS berfungsi untuk terjemahan dan teks klasik.
|
|
34
|
+
- Belum ada dukungan untuk penyisipan, jamak/ICU, atau fitur runtime lanjutan dari pustaka lain di dalam entri PO itu sendiri.
|
|
35
|
+
- Editor visual belum didukung untuk output i18n pihak ketiga.
|
|
36
|
+
|
|
37
|
+
### Kapan menggunakan plugin ini
|
|
38
|
+
|
|
39
|
+
- Anda sudah menggunakan file Gettext PO untuk terjemahan Anda.
|
|
40
|
+
- Anda ingin pengisian berbantuan AI, pengujian di CI, dan operasi konten tanpa mengubah runtime rendering Anda.
|
|
41
|
+
|
|
42
|
+
## Instalasi
|
|
43
|
+
|
|
44
|
+
```bash
|
|
45
|
+
pnpm add -D @intlayer/sync-po-plugin
|
|
46
|
+
# atau
|
|
47
|
+
npm i -D @intlayer/sync-po-plugin
|
|
48
|
+
```
|
|
49
|
+
|
|
50
|
+
## Plugin
|
|
51
|
+
|
|
52
|
+
Paket ini menyediakan dua plugin:
|
|
53
|
+
|
|
54
|
+
- `loadPO`: Memuat file PO ke dalam kamus Intlayer.
|
|
55
|
+
- Plugin ini digunakan untuk memuat file PO dari sumber dan akan dimuat ke dalam kamus Intlayer. Ini dapat memindai semua basis kode dan mencari file PO tertentu.
|
|
56
|
+
Plugin ini dapat digunakan:
|
|
57
|
+
- jika Anda menggunakan pustaka i18n yang mengharuskan lokasi tertentu untuk file PO Anda dimuat, tetapi Anda ingin menempatkan deklarasi konten di mana pun Anda inginkan dalam basis kode Anda.
|
|
58
|
+
- Ini juga dapat digunakan jika Anda ingin mengambil pesan Anda dari sumber jarak jauh (misalnya: CMS, API, dll.) dan menyimpan pesan Anda dalam file PO.
|
|
59
|
+
|
|
60
|
+
> Di balik layar, plugin ini akan memindai semua basis kode dan mencari file PO tertentu serta memuatnya ke dalam kamus Intlayer.
|
|
61
|
+
> Perhatikan bahwa plugin ini tidak akan menulis output dan terjemahan kembali ke file PO.
|
|
62
|
+
|
|
63
|
+
- `syncPO`: Sinkronkan file PO dengan kamus Intlayer.
|
|
64
|
+
- Plugin ini digunakan untuk menyinkronkan file PO dengan kamus Intlayer. Ini dapat memindai lokasi yang diberikan dan memuat PO yang cocok dengan pola untuk file PO tertentu. Plugin ini berguna jika Anda ingin mendapatkan manfaat Intlayer sambil menggunakan pustaka i18n lain.
|
|
65
|
+
|
|
66
|
+
## Menggunakan kedua plugin
|
|
67
|
+
|
|
68
|
+
```ts fileName="intlayer.config.ts"
|
|
69
|
+
import { Locales, type IntlayerConfig } from "intlayer";
|
|
70
|
+
import { loadPO, syncPO } from "@intlayer/sync-po-plugin";
|
|
71
|
+
|
|
72
|
+
const config: IntlayerConfig = {
|
|
73
|
+
internationalization: {
|
|
74
|
+
locales: [Locales.ENGLISH, Locales.FRENCH, Locales.SPANISH],
|
|
75
|
+
defaultLocale: Locales.ENGLISH,
|
|
76
|
+
},
|
|
77
|
+
|
|
78
|
+
// Jaga agar file PO Anda saat ini tetap sinkron dengan kamus Intlayer
|
|
79
|
+
plugins: [
|
|
80
|
+
/**
|
|
81
|
+
* Akan memuat semua file PO di src yang cocok dengan pola {key}.i18n.po
|
|
82
|
+
*/
|
|
83
|
+
loadPO({
|
|
84
|
+
source: ({ key }) => `./src/**/${key}.i18n.po`,
|
|
85
|
+
locale: Locales.ENGLISH,
|
|
86
|
+
priority: 1, // Memastikan file PO ini lebih diutamakan daripada file di `./locales/en/${key}.po`
|
|
87
|
+
}),
|
|
88
|
+
/**
|
|
89
|
+
* Akan memuat, dan menulis output dan terjemahan kembali ke file PO di direktori locales
|
|
90
|
+
*/
|
|
91
|
+
syncPO({
|
|
92
|
+
source: ({ key, locale }) => `./locales/${locale}/${key}.po`,
|
|
93
|
+
priority: 0,
|
|
94
|
+
}),
|
|
95
|
+
],
|
|
96
|
+
};
|
|
97
|
+
|
|
98
|
+
export default config;
|
|
99
|
+
```
|
|
100
|
+
|
|
101
|
+
## Plugin `syncPO`
|
|
102
|
+
|
|
103
|
+
### Mulai cepat
|
|
104
|
+
|
|
105
|
+
Tambahkan plugin ke `intlayer.config.ts` Anda dan arahkan ke struktur PO Anda yang sudah ada.
|
|
106
|
+
|
|
107
|
+
```ts fileName="intlayer.config.ts"
|
|
108
|
+
import { Locales, type IntlayerConfig } from "intlayer";
|
|
109
|
+
import { syncPO } from "@intlayer/sync-po-plugin";
|
|
110
|
+
|
|
111
|
+
const config: IntlayerConfig = {
|
|
112
|
+
internationalization: {
|
|
113
|
+
locales: [Locales.ENGLISH, Locales.FRENCH, Locales.SPANISH],
|
|
114
|
+
defaultLocale: Locales.ENGLISH,
|
|
115
|
+
},
|
|
116
|
+
|
|
117
|
+
// Jaga agar file PO Anda saat ini tetap sinkron dengan kamus Intlayer
|
|
118
|
+
plugins: [
|
|
119
|
+
syncPO({
|
|
120
|
+
// Tata letak per-lokal, per-namespace
|
|
121
|
+
source: ({ key, locale }) => `./locales/${locale}/${key}.po`,
|
|
122
|
+
}),
|
|
123
|
+
],
|
|
124
|
+
};
|
|
125
|
+
|
|
126
|
+
export default config;
|
|
127
|
+
```
|
|
128
|
+
|
|
129
|
+
Alternatif: satu file per lokal:
|
|
130
|
+
|
|
131
|
+
```ts fileName="intlayer.config.ts"
|
|
132
|
+
import { Locales, type IntlayerConfig } from "intlayer";
|
|
133
|
+
import { syncPO } from "@intlayer/sync-po-plugin";
|
|
134
|
+
|
|
135
|
+
const config: IntlayerConfig = {
|
|
136
|
+
internationalization: {
|
|
137
|
+
locales: [Locales.ENGLISH, Locales.FRENCH],
|
|
138
|
+
defaultLocale: Locales.ENGLISH,
|
|
139
|
+
},
|
|
140
|
+
plugins: [
|
|
141
|
+
syncPO({
|
|
142
|
+
source: ({ locale }) => `./locales/${locale}.po`,
|
|
143
|
+
}),
|
|
144
|
+
],
|
|
145
|
+
};
|
|
146
|
+
|
|
147
|
+
export default config;
|
|
148
|
+
```
|
|
149
|
+
|
|
150
|
+
#### Cara kerjanya
|
|
151
|
+
|
|
152
|
+
- Baca: plugin menemukan file PO dari pembangun `source` Anda dan memuatnya sebagai kamus Intlayer.
|
|
153
|
+
- Tulis: setelah pembangunan dan pengisian, ia menulis PO yang dilokalkan kembali ke jalur yang sama (dengan header Gettext yang tepat).
|
|
154
|
+
- Pengisian otomatis: plugin mendeklarasikan jalur `autoFill` untuk setiap kamus. Menjalankan `intlayer fill` memperbarui hanya terjemahan yang hilang di file PO Anda secara default.
|
|
155
|
+
|
|
156
|
+
API:
|
|
157
|
+
|
|
158
|
+
```ts
|
|
159
|
+
syncPO({
|
|
160
|
+
source: ({ key, locale }) => string, // wajib
|
|
161
|
+
location?: string, // label opsional, default: "sync-po::path/to/source"
|
|
162
|
+
priority?: number, // prioritas opsional untuk resolusi konflik, default: 0
|
|
163
|
+
});
|
|
164
|
+
```
|
|
165
|
+
|
|
166
|
+
### Beberapa sumber PO dan prioritas
|
|
167
|
+
|
|
168
|
+
Anda dapat menambahkan beberapa plugin `syncPO` untuk menyinkronkan sumber PO yang berbeda. Ini berguna ketika Anda memiliki beberapa sumber terjemahan atau struktur PO yang berbeda dalam proyek Anda.
|
|
169
|
+
|
|
170
|
+
#### Sistem prioritas
|
|
171
|
+
|
|
172
|
+
Ketika beberapa plugin menargetkan kunci kamus yang sama, parameter `priority` menentukan plugin mana yang lebih diutamakan:
|
|
173
|
+
|
|
174
|
+
- Nomor prioritas yang lebih tinggi menang atas yang lebih rendah
|
|
175
|
+
- Prioritas default file `.content` adalah `0`
|
|
176
|
+
- Prioritas default plugin adalah `0`
|
|
177
|
+
- Plugin dengan prioritas yang sama diproses sesuai urutan kemunculannya dalam konfigurasi
|
|
178
|
+
|
|
179
|
+
```ts fileName="intlayer.config.ts"
|
|
180
|
+
import { Locales, type IntlayerConfig } from "intlayer";
|
|
181
|
+
import { syncPO } from "@intlayer/sync-po-plugin";
|
|
182
|
+
|
|
183
|
+
const config: IntlayerConfig = {
|
|
184
|
+
internationalization: {
|
|
185
|
+
locales: [Locales.ENGLISH, Locales.FRENCH],
|
|
186
|
+
defaultLocale: Locales.ENGLISH,
|
|
187
|
+
},
|
|
188
|
+
|
|
189
|
+
plugins: [
|
|
190
|
+
// Sumber PO utama (prioritas tertinggi)
|
|
191
|
+
syncPO({
|
|
192
|
+
source: ({ key, locale }) => `./locales/${locale}/${key}.po`,
|
|
193
|
+
location: "main-translations",
|
|
194
|
+
priority: 10,
|
|
195
|
+
}),
|
|
196
|
+
|
|
197
|
+
// Sumber PO cadangan (prioritas lebih rendah)
|
|
198
|
+
syncPO({
|
|
199
|
+
source: ({ locale }) => `./fallback-locales/${locale}.po`,
|
|
200
|
+
location: "fallback-translations",
|
|
201
|
+
priority: 5,
|
|
202
|
+
}),
|
|
203
|
+
|
|
204
|
+
// Sumber PO lama (prioritas terendah)
|
|
205
|
+
syncPO({
|
|
206
|
+
source: ({ locale }) => `/my/other/app/legacy/${locale}/messages.po`,
|
|
207
|
+
location: "legacy-translations",
|
|
208
|
+
priority: 1,
|
|
209
|
+
}),
|
|
210
|
+
],
|
|
211
|
+
};
|
|
212
|
+
|
|
213
|
+
export default config;
|
|
214
|
+
```
|
|
215
|
+
|
|
216
|
+
## Plugin Load PO
|
|
217
|
+
|
|
218
|
+
### Mulai cepat
|
|
219
|
+
|
|
220
|
+
Tambahkan plugin ke `intlayer.config.ts` Anda untuk memasukkan file PO yang ada sebagai kamus Intlayer. Plugin ini bersifat baca-saja (tidak ada penulisan ke disk):
|
|
221
|
+
|
|
222
|
+
```ts fileName="intlayer.config.ts"
|
|
223
|
+
import { Locales, type IntlayerConfig } from "intlayer";
|
|
224
|
+
import { loadPO } from "@intlayer/sync-po-plugin";
|
|
225
|
+
|
|
226
|
+
const config: IntlayerConfig = {
|
|
227
|
+
internationalization: {
|
|
228
|
+
locales: [Locales.ENGLISH, Locales.FRENCH, Locales.SPANISH],
|
|
229
|
+
defaultLocale: Locales.ENGLISH,
|
|
230
|
+
},
|
|
231
|
+
|
|
232
|
+
plugins: [
|
|
233
|
+
// Masukkan pesan PO yang terletak di mana saja di pohon sumber Anda
|
|
234
|
+
loadPO({
|
|
235
|
+
source: ({ key }) => `./src/**/${key}.i18n.po`,
|
|
236
|
+
// Muat satu lokal per instansi plugin (default ke defaultLocale konfigurasi)
|
|
237
|
+
locale: Locales.ENGLISH,
|
|
238
|
+
priority: 0,
|
|
239
|
+
}),
|
|
240
|
+
],
|
|
241
|
+
};
|
|
242
|
+
|
|
243
|
+
export default config;
|
|
244
|
+
```
|
|
245
|
+
|
|
246
|
+
Alternatif: tata letak per-lokal, masih baca-saja (hanya lokal yang dipilih yang dimuat):
|
|
247
|
+
|
|
248
|
+
```ts fileName="intlayer.config.ts"
|
|
249
|
+
import { Locales, type IntlayerConfig } from "intlayer";
|
|
250
|
+
import { loadPO } from "@intlayer/sync-po-plugin";
|
|
251
|
+
|
|
252
|
+
const config: IntlayerConfig = {
|
|
253
|
+
internationalization: {
|
|
254
|
+
locales: [Locales.ENGLISH, Locales.FRENCH],
|
|
255
|
+
defaultLocale: Locales.ENGLISH,
|
|
256
|
+
},
|
|
257
|
+
plugins: [
|
|
258
|
+
loadPO({
|
|
259
|
+
// Hanya file untuk Locales.FRENCH yang akan dimuat dari pola ini
|
|
260
|
+
source: ({ key, locale }) => `./locales/${locale}/${key}.po`,
|
|
261
|
+
locale: Locales.FRENCH,
|
|
262
|
+
}),
|
|
263
|
+
],
|
|
264
|
+
};
|
|
265
|
+
|
|
266
|
+
export default config;
|
|
267
|
+
```
|
|
268
|
+
|
|
269
|
+
### Cara kerjanya
|
|
270
|
+
|
|
271
|
+
- Temukan: membangun glob dari pembangun `source` Anda dan mengumpulkan file PO yang cocok.
|
|
272
|
+
- Masukkan: memuat setiap file PO sebagai kamus Intlayer dengan `locale` yang disediakan.
|
|
273
|
+
- Baca-saja: tidak menulis atau memformat file output; gunakan `syncPO` jika Anda memerlukan sinkronisasi bolak-balik.
|
|
274
|
+
- Siap pengisian otomatis: menentukan jalur `fill` sehingga `intlayer content fill` dapat mengisi kunci yang hilang.
|
|
275
|
+
|
|
276
|
+
### API
|
|
277
|
+
|
|
278
|
+
```ts
|
|
279
|
+
loadPO({
|
|
280
|
+
// Bangun jalur ke PO Anda. `locale` bersifat opsional jika struktur Anda tidak memiliki segmen lokal
|
|
281
|
+
source: ({ key, locale }) => string,
|
|
282
|
+
|
|
283
|
+
// Lokal target untuk kamus yang dimuat oleh instansi plugin ini
|
|
284
|
+
// Default ke configuration.internationalization.defaultLocale
|
|
285
|
+
locale?: Locale,
|
|
286
|
+
|
|
287
|
+
// Label opsional untuk mengidentifikasi sumber
|
|
288
|
+
location?: string, // default: "plugin"
|
|
289
|
+
|
|
290
|
+
// Prioritas yang digunakan untuk resolusi konflik terhadap sumber lain
|
|
291
|
+
priority?: number, // default: 0
|
|
292
|
+
});
|
|
293
|
+
```
|
|
294
|
+
|
|
295
|
+
### Perilaku dan konvensi
|
|
296
|
+
|
|
297
|
+
- Jika mask `source` Anda menyertakan placeholder lokal, hanya file untuk `locale` yang dipilih yang dimasukkan.
|
|
298
|
+
- Jika tidak ada segmen `{key}` di mask Anda, kunci kamus adalah "index".
|
|
299
|
+
- Kunci diturunkan dari jalur file dengan mengganti placeholder `{key}` di pembangun `source` Anda.
|
|
300
|
+
- Plugin hanya menggunakan file yang ditemukan dan tidak membuat lokal atau kunci yang hilang.
|
|
301
|
+
- Jalur `fill` disimpulkan dari `source` Anda dan digunakan untuk memperbarui nilai yang hilang melalui CLI saat Anda memilih untuk ikut serta.
|
|
302
|
+
|
|
303
|
+
## Resolusi konflik
|
|
304
|
+
|
|
305
|
+
Ketika kunci terjemahan yang sama ada di beberapa sumber PO:
|
|
306
|
+
|
|
307
|
+
1. Plugin dengan prioritas tertinggi menentukan nilai akhir
|
|
308
|
+
2. Sumber prioritas lebih rendah digunakan sebagai cadangan untuk kunci yang hilang
|
|
309
|
+
3. Ini memungkinkan Anda untuk mempertahankan terjemahan lama sambil secara bertahap bermigrasi ke struktur baru
|
|
310
|
+
|
|
311
|
+
## CLI
|
|
312
|
+
|
|
313
|
+
File PO yang disinkronkan akan dianggap sebagai file `.content` lainnya. Itu berarti, semua perintah intlayer akan tersedia untuk file PO yang disinkronkan. Termasuk:
|
|
314
|
+
|
|
315
|
+
- `intlayer content test` untuk menguji apakah ada terjemahan yang hilang
|
|
316
|
+
- `intlayer content list` untuk mencantumkan file PO yang disinkronkan
|
|
317
|
+
- `intlayer content fill` untuk mengisi terjemahan yang hilang
|
|
318
|
+
- `intlayer content push` untuk mendorong file PO yang disinkronkan
|
|
319
|
+
- `intlayer content pull` untuk menarik file PO yang disinkronkan
|
|
320
|
+
|
|
321
|
+
Lihat [Intlayer CLI](https://github.com/aymericzip/intlayer/blob/main/docs/docs/en/cli/index.md) untuk detail lebih lanjut.
|
|
322
|
+
|
|
323
|
+
## Batasan (saat ini)
|
|
324
|
+
|
|
325
|
+
- Tidak ada dukungan penyisipan atau jamak/ICU saat menargetkan pustaka pihak ketiga.
|
|
326
|
+
- Editor visual belum tersedia untuk runtime non-Intlayer.
|
|
327
|
+
- Hanya sinkronisasi PO; format katalog non-PO tidak didukung.
|
|
328
|
+
|
|
329
|
+
## Mengapa ini penting
|
|
330
|
+
|
|
331
|
+
- Kami dapat merekomendasikan solusi i18n yang sudah mapan dan memposisikan Intlayer sebagai tambahan.
|
|
332
|
+
- Kami memanfaatkan SEO/kata kunci mereka dengan tutorial yang diakhiri dengan menyarankan Intlayer untuk mengelola PO.
|
|
333
|
+
- Memperluas audiens yang dapat dituju dari "proyek baru" menjadi "tim mana pun yang sudah menggunakan i18n".
|
|
@@ -21,7 +21,7 @@ history:
|
|
|
21
21
|
|
|
22
22
|
# Benchmark - Rapporto
|
|
23
23
|
|
|
24
|
-
Benchmark Bloom è una suite di benchmark sulle prestazioni
|
|
24
|
+
Benchmark Bloom è una suite di benchmark sulle prestazioni que misura l'impatto reale delle librerie i18n (internazionalizzazione) su più framework React e strategie di caricamento.
|
|
25
25
|
|
|
26
26
|
Di seguito trovi i rapporti dettagliati e la documentazione tecnica per ciascun framework:
|
|
27
27
|
|
|
@@ -30,6 +30,3 @@ Di seguito trovi i rapporti dettagliati e la documentazione tecnica per ciascun
|
|
|
30
30
|
- [**Vue Benchmark Report**](https://github.com/aymericzip/intlayer/blob/main/docs/docs/en/benchmark/vue.md)
|
|
31
31
|
- [**Solid Benchmark Report**](https://github.com/aymericzip/intlayer/blob/main/docs/docs/en/benchmark/solid.md)
|
|
32
32
|
- [**Svelte Benchmark Report**](https://github.com/aymericzip/intlayer/blob/main/docs/docs/en/benchmark/svelte.md)
|
|
33
|
-
- [**Vue Benchmark Report**](https://github.com/aymericzip/intlayer/blob/main/docs/docs/en/benchmark/vue.md)
|
|
34
|
-
- [**Solid Benchmark Report**](https://github.com/aymericzip/intlayer/blob/main/docs/docs/en/benchmark/solid.md)
|
|
35
|
-
- [**Svelte Benchmark Report**](https://github.com/aymericzip/intlayer/blob/main/docs/docs/en/benchmark/svelte.md)
|
|
@@ -61,6 +61,13 @@ Poiché il problema è difficile, esistono molte soluzioni, alcune focalizzate s
|
|
|
61
61
|
|
|
62
62
|
Intlayer cerca di ottimizzare tutte queste dimensioni.
|
|
63
63
|
|
|
64
|
+
## TL;DR
|
|
65
|
+
|
|
66
|
+
- **Intlayer** e **next-translate**: Le migliori scelte per le prestazioni di Next.js, con l'impronta minima e il miglior supporto al rendering statico.
|
|
67
|
+
- **next-intl**: L'opzione più di tendenza, ma pesante e complessa da ottimizzare per grandi applicazioni.
|
|
68
|
+
- **next-i18next**: Popolare e ricca di plugin, ma comporta un peso del bundle significativo (~3× Intlayer).
|
|
69
|
+
- **Da evitare**: **gt-next** e **lingo.dev** a causa di gravi problemi di prestazioni, vendor lock-in ed errori che bloccano la build.
|
|
70
|
+
|
|
64
71
|
## Testa la tua app
|
|
65
72
|
|
|
66
73
|
Per far emergere questi problemi, ho creato uno scanner gratuito che puoi provare [qui](https://intlayer.org/i18n-seo-scanner).
|
|
@@ -99,14 +106,14 @@ Infine, `Intlayer` applica un'ottimizzazione build-time in modo che `useIntlayer
|
|
|
99
106
|
Per questo benchmark, abbiamo confrontato le seguenti librerie:
|
|
100
107
|
|
|
101
108
|
- `Base App` (Nessuna libreria i18n)
|
|
102
|
-
- `next-intlayer` (v8.7.
|
|
109
|
+
- `next-intlayer` (v8.7.12)
|
|
103
110
|
- `next-i18next` (v16.0.5)
|
|
104
111
|
- `next-intl` (v4.9.1)
|
|
105
112
|
- `@lingui/core` (v5.3.0)
|
|
106
113
|
- `next-translate` (v3.1.2)
|
|
107
114
|
- `next-international` (v1.3.1)
|
|
108
115
|
- `@inlang/paraglide-js` (v2.15.1)
|
|
109
|
-
-
|
|
116
|
+
- `@tolgee/react` (v7.0.0)
|
|
110
117
|
- `@lingo.dev/compiler` (v0.4.0)
|
|
111
118
|
- `wuchale` (v0.22.11)
|
|
112
119
|
- `gt-next` (v6.16.5)
|
|
@@ -161,10 +168,10 @@ Problemi riscontrati:
|
|
|
161
168
|
|
|
162
169
|
**(General Translation)** (`gt-next@6.16.5`):
|
|
163
170
|
|
|
164
|
-
- Per un'app da 110kb, `gt-
|
|
171
|
+
- Per un'app da 110kb, `gt-next` aggiunge più di 440kb extra.
|
|
165
172
|
- `Quota Exceeded, please upgrade your plan` al primissimo build con General Translation.
|
|
166
173
|
- Le traduzioni non vengono renderizzate; ottengo l'errore `Error: <T> used on the client-side outside of <GTProvider>`, che sembra essere un bug nella libreria.
|
|
167
|
-
- Durante l'implementazione di **gt-
|
|
174
|
+
- Durante l'implementazione di **gt-next**, ho riscontrato anche un [problema](https://github.com/generaltranslation/gt/issues/1210#event-24510646961) con la libreria: `does not provide an export named 'printAST' - @formatjs/icu-messageformat-parser`, che faceva fallire l'applicazione. Dopo aver segnalato questo problema, il manutentore lo ha risolto entro 24 ore.
|
|
168
175
|
- La libreria blocca il rendering statico delle pagine Next.js.
|
|
169
176
|
|
|
170
177
|
**(Lingo.dev)** (`@lingo.dev/compiler@0.4.0`):
|
|
@@ -186,9 +193,11 @@ L'idea alla base di `Wuchale` è interessante ma non ancora praticabile. Ho risc
|
|
|
186
193
|
Personalmente non mi piace dover rigenerare file JS prima di ogni push, il che crea un rischio costante di conflitti di merge tramite PR. Lo strumento sembra inoltre più focalizzato su Vite che su Next.js.
|
|
187
194
|
Infine, rispetto ad altre soluzioni, Paraglide non usa uno store (es. contesto React) per recuperare la lingua corrente per renderizzare il contenuto. Per ogni nodo analizzato, richiederà la lingua da localStorage / cookie ecc. Ciò porta all'esecuzione di logica non necessaria che impatta sulla reattività del componente.
|
|
188
195
|
|
|
196
|
+
> Nota su paraglide: la soluzione inietta codice nella tua codebase per l'importazione, di conseguenza la metrica 'dimensione della lib' nel report benchmark è quasi 0. La generazione del codice è un aspetto positivo, poiché la funzione utilizzata includerà solo la lógica necessaria (prefisso totale vs nessun prefisso, cookie vs storage, ecc.). In confronto, Intlayer esegue questo filtraggio tramite iniezioni di variabili d'ambiente nella build per forzare il bundler a scartare i contenuti in base alla logica. Grazie a ciò, paraglide e intlayer risultano soluzioni da 6 a 10 volte più leggere rispetto a i18next o next-intl.
|
|
197
|
+
|
|
189
198
|
### 3 — Soluzioni accettabili
|
|
190
199
|
|
|
191
|
-
**(Tolgee)** (
|
|
200
|
+
**(Tolgee)** (`@tolgee/react@7.0.0`):
|
|
192
201
|
|
|
193
202
|
`Tolgee` affronta molti dei problemi menzionati in precedenza. L'ho trovato più difficile da adottare rispetto a strumenti simili. Non fornisce type safety, il che rende anche più difficile individuare le chiavi mancanti a compile time. Ho dovuto avvolgere le funzioni di Tolgee con le mie per aggiungere il rilevamento delle chiavi mancanti.
|
|
194
203
|
|
|
@@ -216,7 +225,7 @@ I formati dei messaggi differiscono inoltre: `next-intl` usa ICU MessageFormat,
|
|
|
216
225
|
|
|
217
226
|
`next-translate` è la mia raccomandazione principale se ti piace un'API in stile `t()`. È elegante grazie a `next-translate-plugin`, caricando i namespace attraverso `getStaticProps` con un caricatore Webpack / Turbopack. È anche l'opzione più leggera qui (~2.5kb). Per il namespacing, la definizione dei namespace per pagina o percorso nella config è ben pensata e più facile da mantenere rispetto alle principali alternative come **next-intl** o **next-i18next**. Nella versione `3.1.2`, ho notato che il rendering statico non funzionava; Next.js ripiegava sul rendering dinamico.
|
|
218
227
|
|
|
219
|
-
**(Intlayer)** (`next-intlayer@8.7.
|
|
228
|
+
**(Intlayer)** (`next-intlayer@8.7.12`):
|
|
220
229
|
|
|
221
230
|
Non giudicherò personalmente `next-intlayer` per motivi di obiettività, essendo la mia propria soluzione.
|
|
222
231
|
|