@intlayer/docs 8.3.0-canary.4 → 8.3.1
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/docs/ar/compiler.md +84 -49
- package/docs/ar/configuration.md +80 -37
- package/docs/ar/intlayer_with_nextjs_16.md +174 -1
- package/docs/ar/intlayer_with_nextjs_compiler.md +174 -1
- package/docs/ar/intlayer_with_react_router_v7.md +224 -1
- package/docs/ar/intlayer_with_react_router_v7_fs_routes.md +225 -1
- package/docs/ar/intlayer_with_svelte_kit.md +175 -2
- package/docs/ar/intlayer_with_tanstack.md +176 -1
- package/docs/ar/intlayer_with_vite+preact.md +174 -1
- package/docs/ar/intlayer_with_vite+react.md +174 -1
- package/docs/ar/intlayer_with_vite+solid.md +174 -1
- package/docs/ar/intlayer_with_vite+svelte.md +174 -1
- package/docs/ar/intlayer_with_vite+vue.md +174 -1
- package/docs/de/compiler.md +83 -48
- package/docs/de/configuration.md +434 -212
- package/docs/de/intlayer_with_nextjs_16.md +176 -1
- package/docs/de/intlayer_with_nextjs_compiler.md +106 -349
- package/docs/de/intlayer_with_react_router_v7.md +225 -2
- package/docs/de/intlayer_with_react_router_v7_fs_routes.md +221 -79
- package/docs/de/intlayer_with_svelte_kit.md +158 -2
- package/docs/de/intlayer_with_tanstack.md +159 -1
- package/docs/de/intlayer_with_vite+preact.md +157 -1
- package/docs/de/intlayer_with_vite+react.md +157 -1
- package/docs/de/intlayer_with_vite+solid.md +159 -3
- package/docs/de/intlayer_with_vite+svelte.md +157 -1
- package/docs/de/intlayer_with_vite+vue.md +157 -1
- package/docs/en/compiler.md +60 -33
- package/docs/en/configuration.md +80 -57
- package/docs/en/intlayer_with_nextjs_16.md +176 -0
- package/docs/en/intlayer_with_nextjs_compiler.md +179 -1
- package/docs/en/intlayer_with_react_router_v7.md +159 -0
- package/docs/en/intlayer_with_react_router_v7_fs_routes.md +159 -0
- package/docs/en/intlayer_with_svelte_kit.md +159 -0
- package/docs/en/intlayer_with_tanstack.md +160 -1
- package/docs/en/intlayer_with_vite+preact.md +159 -0
- package/docs/en/intlayer_with_vite+react.md +159 -0
- package/docs/en/intlayer_with_vite+solid.md +148 -27
- package/docs/en/intlayer_with_vite+svelte.md +159 -0
- package/docs/en/intlayer_with_vite+vue.md +142 -41
- package/docs/en-GB/compiler.md +66 -34
- package/docs/en-GB/configuration.md +78 -36
- package/docs/es/compiler.md +83 -48
- package/docs/es/configuration.md +429 -206
- package/docs/es/intlayer_with_adonisjs.md +1 -1
- package/docs/es/intlayer_with_express.md +1 -1
- package/docs/es/intlayer_with_fastify.md +1 -1
- package/docs/es/intlayer_with_hono.md +1 -1
- package/docs/es/intlayer_with_nestjs.md +1 -1
- package/docs/es/intlayer_with_nextjs_16.md +176 -3
- package/docs/es/intlayer_with_nextjs_compiler.md +175 -2
- package/docs/es/intlayer_with_nuxt.md +1 -1
- package/docs/es/intlayer_with_react_router_v7.md +227 -4
- package/docs/es/intlayer_with_react_router_v7_fs_routes.md +162 -4
- package/docs/es/intlayer_with_svelte_kit.md +158 -2
- package/docs/es/intlayer_with_tanstack.md +160 -2
- package/docs/es/intlayer_with_vite+preact.md +162 -6
- package/docs/es/intlayer_with_vite+react.md +160 -4
- package/docs/es/intlayer_with_vite+solid.md +163 -7
- package/docs/es/intlayer_with_vite+svelte.md +157 -1
- package/docs/es/intlayer_with_vite+vue.md +165 -9
- package/docs/fr/compiler.md +81 -46
- package/docs/fr/configuration.md +355 -134
- package/docs/fr/intlayer_with_adonisjs.md +1 -1
- package/docs/fr/intlayer_with_express.md +1 -1
- package/docs/fr/intlayer_with_fastify.md +1 -1
- package/docs/fr/intlayer_with_hono.md +1 -1
- package/docs/fr/intlayer_with_nestjs.md +1 -1
- package/docs/fr/intlayer_with_nextjs_16.md +183 -7
- package/docs/fr/intlayer_with_nextjs_compiler.md +179 -3
- package/docs/fr/intlayer_with_react_router_v7.md +229 -3
- package/docs/fr/intlayer_with_react_router_v7_fs_routes.md +237 -6
- package/docs/fr/intlayer_with_svelte_kit.md +158 -2
- package/docs/fr/intlayer_with_tanstack.md +159 -1
- package/docs/fr/intlayer_with_vite+preact.md +164 -8
- package/docs/fr/intlayer_with_vite+react.md +162 -6
- package/docs/fr/intlayer_with_vite+solid.md +163 -7
- package/docs/fr/intlayer_with_vite+svelte.md +157 -1
- package/docs/fr/intlayer_with_vite+vue.md +164 -8
- package/docs/hi/compiler.md +81 -46
- package/docs/hi/configuration.md +87 -44
- package/docs/hi/intlayer_with_nextjs_16.md +174 -1
- package/docs/hi/intlayer_with_nextjs_compiler.md +174 -1
- package/docs/hi/intlayer_with_react_router_v7.md +224 -1
- package/docs/hi/intlayer_with_react_router_v7_fs_routes.md +225 -1
- package/docs/hi/intlayer_with_svelte_kit.md +158 -2
- package/docs/hi/intlayer_with_tanstack.md +159 -1
- package/docs/hi/intlayer_with_vite+preact.md +157 -1
- package/docs/hi/intlayer_with_vite+react.md +157 -1
- package/docs/hi/intlayer_with_vite+solid.md +157 -1
- package/docs/hi/intlayer_with_vite+svelte.md +157 -1
- package/docs/hi/intlayer_with_vite+vue.md +157 -1
- package/docs/id/compiler.md +84 -51
- package/docs/id/configuration.md +83 -45
- package/docs/id/intlayer_with_nextjs_16.md +174 -1
- package/docs/id/intlayer_with_nextjs_compiler.md +174 -1
- package/docs/id/intlayer_with_react_router_v7.md +224 -1
- package/docs/id/intlayer_with_react_router_v7_fs_routes.md +225 -1
- package/docs/id/intlayer_with_svelte_kit.md +158 -2
- package/docs/id/intlayer_with_tanstack.md +159 -1
- package/docs/id/intlayer_with_vite+preact.md +157 -1
- package/docs/id/intlayer_with_vite+react.md +157 -1
- package/docs/id/intlayer_with_vite+solid.md +157 -1
- package/docs/id/intlayer_with_vite+svelte.md +157 -1
- package/docs/id/intlayer_with_vite+vue.md +157 -1
- package/docs/it/compiler.md +81 -46
- package/docs/it/configuration.md +426 -204
- package/docs/it/intlayer_with_nextjs_16.md +174 -1
- package/docs/it/intlayer_with_nextjs_compiler.md +174 -1
- package/docs/it/intlayer_with_react_router_v7.md +225 -2
- package/docs/it/intlayer_with_react_router_v7_fs_routes.md +226 -2
- package/docs/it/intlayer_with_svelte_kit.md +158 -2
- package/docs/it/intlayer_with_tanstack.md +159 -1
- package/docs/it/intlayer_with_vite+preact.md +157 -1
- package/docs/it/intlayer_with_vite+react.md +157 -1
- package/docs/it/intlayer_with_vite+solid.md +159 -3
- package/docs/it/intlayer_with_vite+svelte.md +157 -1
- package/docs/it/intlayer_with_vite+vue.md +157 -1
- package/docs/ja/compiler.md +94 -58
- package/docs/ja/configuration.md +88 -45
- package/docs/ja/intlayer_with_nextjs_16.md +174 -1
- package/docs/ja/intlayer_with_nextjs_compiler.md +174 -1
- package/docs/ja/intlayer_with_react_router_v7.md +184 -394
- package/docs/ja/intlayer_with_react_router_v7_fs_routes.md +226 -2
- package/docs/ja/intlayer_with_svelte_kit.md +119 -595
- package/docs/ja/intlayer_with_tanstack.md +131 -642
- package/docs/ja/intlayer_with_vite+preact.md +111 -1231
- package/docs/ja/intlayer_with_vite+react.md +129 -1304
- package/docs/ja/intlayer_with_vite+solid.md +159 -3
- package/docs/ja/intlayer_with_vite+svelte.md +157 -1
- package/docs/ja/intlayer_with_vite+vue.md +157 -1
- package/docs/ko/compiler.md +88 -52
- package/docs/ko/configuration.md +87 -44
- package/docs/ko/intlayer_with_nextjs_16.md +174 -1
- package/docs/ko/intlayer_with_nextjs_compiler.md +174 -1
- package/docs/ko/intlayer_with_react_router_v7.md +225 -2
- package/docs/ko/intlayer_with_react_router_v7_fs_routes.md +226 -2
- package/docs/ko/intlayer_with_svelte_kit.md +158 -2
- package/docs/ko/intlayer_with_tanstack.md +159 -1
- package/docs/ko/intlayer_with_vite+preact.md +157 -1
- package/docs/ko/intlayer_with_vite+react.md +157 -1
- package/docs/ko/intlayer_with_vite+solid.md +159 -3
- package/docs/ko/intlayer_with_vite+svelte.md +157 -1
- package/docs/ko/intlayer_with_vite+vue.md +157 -1
- package/docs/pl/compiler.md +84 -51
- package/docs/pl/configuration.md +83 -37
- package/docs/pl/intlayer_with_nextjs_16.md +174 -1
- package/docs/pl/intlayer_with_nextjs_compiler.md +174 -1
- package/docs/pl/intlayer_with_react_router_v7.md +224 -1
- package/docs/pl/intlayer_with_react_router_v7_fs_routes.md +225 -1
- package/docs/pl/intlayer_with_svelte_kit.md +158 -2
- package/docs/pl/intlayer_with_tanstack.md +159 -1
- package/docs/pl/intlayer_with_vite+preact.md +157 -1
- package/docs/pl/intlayer_with_vite+react.md +157 -1
- package/docs/pl/intlayer_with_vite+solid.md +157 -1
- package/docs/pl/intlayer_with_vite+svelte.md +157 -1
- package/docs/pl/intlayer_with_vite+vue.md +157 -1
- package/docs/pt/compiler.md +81 -46
- package/docs/pt/configuration.md +404 -194
- package/docs/pt/intlayer_with_nextjs_16.md +174 -1
- package/docs/pt/intlayer_with_nextjs_compiler.md +174 -1
- package/docs/pt/intlayer_with_react_router_v7.md +224 -1
- package/docs/pt/intlayer_with_react_router_v7_fs_routes.md +225 -1
- package/docs/pt/intlayer_with_svelte_kit.md +158 -2
- package/docs/pt/intlayer_with_tanstack.md +159 -1
- package/docs/pt/intlayer_with_vite+preact.md +157 -1
- package/docs/pt/intlayer_with_vite+react.md +157 -1
- package/docs/pt/intlayer_with_vite+solid.md +157 -1
- package/docs/pt/intlayer_with_vite+svelte.md +157 -1
- package/docs/pt/intlayer_with_vite+vue.md +157 -1
- package/docs/ru/compiler.md +90 -57
- package/docs/ru/configuration.md +76 -46
- package/docs/ru/intlayer_with_nextjs_16.md +174 -1
- package/docs/ru/intlayer_with_nextjs_compiler.md +174 -1
- package/docs/ru/intlayer_with_react_router_v7.md +224 -1
- package/docs/ru/intlayer_with_react_router_v7_fs_routes.md +225 -1
- package/docs/ru/intlayer_with_svelte_kit.md +158 -2
- package/docs/ru/intlayer_with_tanstack.md +159 -1
- package/docs/ru/intlayer_with_vite+preact.md +157 -1
- package/docs/ru/intlayer_with_vite+react.md +157 -1
- package/docs/ru/intlayer_with_vite+solid.md +157 -1
- package/docs/ru/intlayer_with_vite+svelte.md +157 -1
- package/docs/ru/intlayer_with_vite+vue.md +157 -1
- package/docs/tr/compiler.md +85 -52
- package/docs/tr/configuration.md +83 -40
- package/docs/tr/intlayer_with_nextjs_16.md +174 -1
- package/docs/tr/intlayer_with_nextjs_compiler.md +174 -1
- package/docs/tr/intlayer_with_react_router_v7.md +224 -1
- package/docs/tr/intlayer_with_react_router_v7_fs_routes.md +225 -1
- package/docs/tr/intlayer_with_svelte_kit.md +158 -2
- package/docs/tr/intlayer_with_tanstack.md +159 -1
- package/docs/tr/intlayer_with_vite+preact.md +157 -1
- package/docs/tr/intlayer_with_vite+react.md +157 -1
- package/docs/tr/intlayer_with_vite+solid.md +157 -1
- package/docs/tr/intlayer_with_vite+svelte.md +157 -1
- package/docs/tr/intlayer_with_vite+vue.md +157 -1
- package/docs/uk/compiler.md +96 -61
- package/docs/uk/configuration.md +83 -37
- package/docs/uk/intlayer_with_nextjs_16.md +174 -1
- package/docs/uk/intlayer_with_nextjs_compiler.md +174 -1
- package/docs/uk/intlayer_with_react_router_v7.md +224 -1
- package/docs/uk/intlayer_with_react_router_v7_fs_routes.md +225 -1
- package/docs/uk/intlayer_with_svelte_kit.md +157 -1
- package/docs/uk/intlayer_with_tanstack.md +159 -1
- package/docs/uk/intlayer_with_vite+preact.md +157 -1
- package/docs/uk/intlayer_with_vite+react.md +157 -1
- package/docs/uk/intlayer_with_vite+solid.md +157 -1
- package/docs/uk/intlayer_with_vite+svelte.md +157 -1
- package/docs/uk/intlayer_with_vite+vue.md +157 -1
- package/docs/vi/compiler.md +85 -50
- package/docs/vi/configuration.md +85 -39
- package/docs/vi/intlayer_with_nextjs_16.md +174 -1
- package/docs/vi/intlayer_with_nextjs_compiler.md +174 -1
- package/docs/vi/intlayer_with_react_router_v7.md +224 -1
- package/docs/vi/intlayer_with_react_router_v7_fs_routes.md +225 -1
- package/docs/vi/intlayer_with_svelte_kit.md +158 -2
- package/docs/vi/intlayer_with_tanstack.md +159 -1
- package/docs/vi/intlayer_with_vite+preact.md +157 -1
- package/docs/vi/intlayer_with_vite+react.md +157 -1
- package/docs/vi/intlayer_with_vite+solid.md +157 -1
- package/docs/vi/intlayer_with_vite+svelte.md +157 -1
- package/docs/vi/intlayer_with_vite+vue.md +157 -1
- package/docs/zh/compiler.md +84 -49
- package/docs/zh/configuration.md +80 -37
- package/docs/zh/intlayer_with_adonisjs.md +1 -1
- package/docs/zh/intlayer_with_express.md +1 -1
- package/docs/zh/intlayer_with_fastify.md +1 -1
- package/docs/zh/intlayer_with_hono.md +1 -1
- package/docs/zh/intlayer_with_nestjs.md +1 -1
- package/docs/zh/intlayer_with_nextjs_16.md +174 -1
- package/docs/zh/intlayer_with_nextjs_compiler.md +174 -1
- package/docs/zh/intlayer_with_react_router_v7.md +227 -4
- package/docs/zh/intlayer_with_react_router_v7_fs_routes.md +228 -4
- package/docs/zh/intlayer_with_svelte_kit.md +158 -2
- package/docs/zh/intlayer_with_tanstack.md +159 -1
- package/docs/zh/intlayer_with_vite+preact.md +159 -3
- package/docs/zh/intlayer_with_vite+react.md +157 -1
- package/docs/zh/intlayer_with_vite+solid.md +161 -5
- package/docs/zh/intlayer_with_vite+svelte.md +157 -1
- package/docs/zh/intlayer_with_vite+vue.md +158 -2
- package/package.json +6 -6
package/docs/id/configuration.md
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
---
|
|
2
2
|
createdAt: 2024-08-13
|
|
3
|
-
updatedAt: 2026-03-
|
|
3
|
+
updatedAt: 2026-03-12
|
|
4
4
|
title: Konfigurasi
|
|
5
5
|
description: Pelajari cara mengonfigurasi Intlayer untuk aplikasi Anda. Pahami berbagai pengaturan dan opsi yang tersedia untuk menyesuaikan Intlayer sesuai kebutuhan Anda.
|
|
6
6
|
keywords:
|
|
@@ -15,7 +15,7 @@ slugs:
|
|
|
15
15
|
- configuration
|
|
16
16
|
history:
|
|
17
17
|
- version: 8.3.0
|
|
18
|
-
|
|
18
|
+
date: 2026-03-11
|
|
19
19
|
changes: Pindahkan 'baseDir' dari konfigurasi 'content' ke 'system'
|
|
20
20
|
- version: 8.2.0
|
|
21
21
|
date: 2026-03-09
|
|
@@ -110,7 +110,7 @@ Intlayer menerima format file konfigurasi JSON, JS, MJS, dan TS:
|
|
|
110
110
|
|
|
111
111
|
## Contoh file konfigurasi
|
|
112
112
|
|
|
113
|
-
|
|
113
|
+
````typescript fileName="intlayer.config.ts" codeFormat="typescript"
|
|
114
114
|
import { Locales, type IntlayerConfig } from "intlayer";
|
|
115
115
|
import { nextjsRewrite } from "intlayer/routing";
|
|
116
116
|
import { z } from "zod";
|
|
@@ -208,7 +208,7 @@ const config: IntlayerConfig = {
|
|
|
208
208
|
* Options: 'cookie', 'localStorage', 'sessionStorage', 'header', or an array of these.
|
|
209
209
|
* Default: ['cookie', 'header']
|
|
210
210
|
*/
|
|
211
|
-
storage: "cookie",
|
|
211
|
+
storage: ["cookie", "header"],
|
|
212
212
|
|
|
213
213
|
/**
|
|
214
214
|
* Base path for the application URLs.
|
|
@@ -344,7 +344,16 @@ const config: IntlayerConfig = {
|
|
|
344
344
|
/**
|
|
345
345
|
* Base URL for the AI API.
|
|
346
346
|
*/
|
|
347
|
-
|
|
347
|
+
/**
|
|
348
|
+
* Data serialisasi
|
|
349
|
+
*
|
|
350
|
+
* Opsi:
|
|
351
|
+
* - "json": Standar, andal; menggunakan lebih banyak token.
|
|
352
|
+
* - "toon": Token lebih sedikit, kurang konsisten dibandingkan JSON.
|
|
353
|
+
*
|
|
354
|
+
* Default: "json"
|
|
355
|
+
*/
|
|
356
|
+
dataSerialization: "json",
|
|
348
357
|
},
|
|
349
358
|
|
|
350
359
|
/**
|
|
@@ -444,42 +453,70 @@ const config: IntlayerConfig = {
|
|
|
444
453
|
compiler: {
|
|
445
454
|
/**
|
|
446
455
|
* Menunjukkan apakah kompiler harus diaktifkan.
|
|
456
|
+
*
|
|
457
|
+
* - false : Menonaktifkan kompiler.
|
|
458
|
+
* - true : Mengaktifkan kompiler.
|
|
459
|
+
* - "build-only" : Melewatkan kompiler selama pengembangan untuk mempercepat waktu mulai.
|
|
460
|
+
*
|
|
461
|
+
* Nilai default : false
|
|
447
462
|
*/
|
|
448
463
|
enabled: true,
|
|
449
464
|
|
|
450
465
|
/**
|
|
451
|
-
*
|
|
452
|
-
|
|
453
|
-
|
|
454
|
-
|
|
455
|
-
|
|
456
|
-
|
|
457
|
-
|
|
458
|
-
|
|
459
|
-
*
|
|
466
|
+
* Mendefinisikan jalur file output. Menggantikan `outputDir`.
|
|
467
|
+
*
|
|
468
|
+
* - Jalur yang dimulai dengan `./` diselesaikan relatif terhadap direktori komponen.
|
|
469
|
+
* - Jalur yang dimulai dengan `/` diselesaikan relatif terhadap root proyek (`baseDir`).
|
|
470
|
+
*
|
|
471
|
+
* - Menyertakan variabel `{{locale}}` dalam jalur akan mengaktifkan pembuatan kamus yang dipisahkan berdasarkan bahasa.
|
|
472
|
+
*
|
|
473
|
+
* Contoh:
|
|
474
|
+
* ```ts
|
|
475
|
+
* {
|
|
476
|
+
* // Buat file .content.ts multi-bahasa di sebelah komponen
|
|
477
|
+
* output: ({ fileName, extension }) => `./${fileName}${extension}`,
|
|
478
|
+
*
|
|
479
|
+
* // output: './{{fileName}}{{extension}}', // Padanan menggunakan string template
|
|
480
|
+
* }
|
|
481
|
+
* ```
|
|
482
|
+
*
|
|
483
|
+
* ```ts
|
|
484
|
+
* {
|
|
485
|
+
* // Buat file JSON terpusat berdasarkan bahasa di root proyek
|
|
486
|
+
* output: ({ key, locale }) => `/locales/${locale}/${key}.content.json`,
|
|
487
|
+
*
|
|
488
|
+
* // output: '/locales/{{locale}}/{{key}}.content.json', // Padanan menggunakan string template
|
|
489
|
+
* }
|
|
490
|
+
* ```
|
|
491
|
+
*
|
|
492
|
+
* Daftar variabel:
|
|
493
|
+
* - `fileName`: Nama file.
|
|
494
|
+
* - `key`: Kunci konten.
|
|
495
|
+
* - `locale`: Bahasa konten.
|
|
496
|
+
* - `extension`: Ekstensi file.
|
|
497
|
+
* - `componentFileName`: Nama file komponen.
|
|
498
|
+
* - `componentExtension`: Ekstensi file komponen.
|
|
499
|
+
* - `format`: Format kamus.
|
|
500
|
+
* - `componentFormat`: Format kamus komponen.
|
|
501
|
+
* - `componentDirPath`: Jalur direktori komponen.
|
|
460
502
|
*/
|
|
461
|
-
|
|
503
|
+
output: ({ locale, key }) => `compiler/${locale}/${key}.json`,
|
|
462
504
|
|
|
463
505
|
/**
|
|
464
|
-
*
|
|
506
|
+
* Menunjukkan apakah komponen harus disimpan setelah ditransformasi.
|
|
507
|
+
* Dengan begitu, kompiler hanya perlu dijalankan sekali untuk mentransformasi aplikasi, lalu dapat dihapus.
|
|
465
508
|
*/
|
|
466
|
-
|
|
509
|
+
saveComponents: false,
|
|
467
510
|
|
|
468
511
|
/**
|
|
469
|
-
* Masukkan konten saja dalam file yang dihasilkan
|
|
512
|
+
* Masukkan konten saja dalam file yang dihasilkan. Berguna untuk output JSON i18next atau ICU MessageFormat per bahasa.
|
|
470
513
|
*/
|
|
471
514
|
noMetadata: false,
|
|
472
515
|
|
|
473
516
|
/**
|
|
474
517
|
* Awalan kunci kamus
|
|
475
518
|
*/
|
|
476
|
-
dictionaryKeyPrefix: "", //
|
|
477
|
-
|
|
478
|
-
/**
|
|
479
|
-
* Menunjukkan apakah komponen harus disimpan setelah ditransformasi.
|
|
480
|
-
* Dengan begitu, kompiler hanya perlu dijalankan sekali untuk mentransformasi aplikasi, lalu dapat dihapus.
|
|
481
|
-
*/
|
|
482
|
-
saveComponents: false,
|
|
519
|
+
dictionaryKeyPrefix: "", // Tambahkan awalan opsional untuk kunci kamus yang diekstrak
|
|
483
520
|
},
|
|
484
521
|
|
|
485
522
|
/**
|
|
@@ -498,7 +535,7 @@ const config: IntlayerConfig = {
|
|
|
498
535
|
};
|
|
499
536
|
|
|
500
537
|
export default config;
|
|
501
|
-
|
|
538
|
+
````
|
|
502
539
|
|
|
503
540
|
## Referensi Konfigurasi
|
|
504
541
|
|
|
@@ -878,7 +915,7 @@ Pengaturan terkait penanganan konten dalam aplikasi, termasuk nama direktori, ek
|
|
|
878
915
|
|
|
879
916
|
- **dictionariesDir**:
|
|
880
917
|
- _Tipe_: `string`
|
|
881
|
-
- _Default_: `'.intlayer/
|
|
918
|
+
- _Default_: `'.intlayer/dictionary'`
|
|
882
919
|
- _Deskripsi_: Jalur direktori untuk menyimpan hasil sementara atau output.
|
|
883
920
|
|
|
884
921
|
- **moduleAugmentationDir**:
|
|
@@ -894,12 +931,6 @@ Pengaturan terkait penanganan konten dalam aplikasi, termasuk nama direktori, ek
|
|
|
894
931
|
- _Deskripsi_: Direktori untuk menyimpan kamus yang belum digabungkan.
|
|
895
932
|
- _Contoh_: `'translations'`
|
|
896
933
|
|
|
897
|
-
- **dictionariesDir**:
|
|
898
|
-
- _Tipe_: `string`
|
|
899
|
-
- _Default_: `'.intlayer/dictionary'`
|
|
900
|
-
- _Deskripsi_: Direktori untuk menyimpan kamus lokal.
|
|
901
|
-
- _Contoh_: `'translations'`
|
|
902
|
-
|
|
903
934
|
- **typesDir**:
|
|
904
935
|
- _Tipe_: `string`
|
|
905
936
|
- _Default_: `'types'`
|
|
@@ -1157,7 +1188,7 @@ Pengaturan yang mengontrol kompiler Intlayer, yang mengekstrak kamus langsung da
|
|
|
1157
1188
|
|
|
1158
1189
|
- **dictionaryKeyPrefix**:
|
|
1159
1190
|
- _Tipe_: `string`
|
|
1160
|
-
- _Default_: `'
|
|
1191
|
+
- _Default_: `''`
|
|
1161
1192
|
- _Deskripsi_: Awalan untuk kunci kamus yang diekstrak.
|
|
1162
1193
|
- _Contoh_: `'my-key-'`
|
|
1163
1194
|
- _Catatan_: Saat kamus diekstrak, kunci dihasilkan berdasarkan nama file. Awalan ini ditambahkan ke kunci yang dihasilkan untuk mencegah konflik.
|
|
@@ -1181,30 +1212,37 @@ Pengaturan yang mengontrol kompiler Intlayer, yang mengekstrak kamus langsung da
|
|
|
1181
1212
|
- _Deskripsi_: Pola yang menentukan file mana yang harus dikecualikan selama optimasi.
|
|
1182
1213
|
- _Contoh_: `['**/node_modules/**', '!**/node_modules/react/**']`
|
|
1183
1214
|
|
|
1184
|
-
- **outputDir**:
|
|
1185
|
-
- _Tipe_: `string`
|
|
1186
|
-
- _Default_: `'compiler'`
|
|
1187
|
-
- _Deskripsi_: Direktori tempat kamus yang diekstrak akan disimpan, relatif terhadap jalur dasar proyek Anda.
|
|
1188
|
-
|
|
1189
1215
|
- **output**:
|
|
1190
1216
|
- _Tipe_: `FilePathPattern`
|
|
1191
|
-
- _Default_: `
|
|
1192
|
-
- _Deskripsi_: Mendefinisikan jalur file output. Menggantikan `outputDir`. Menangani variabel dinamis
|
|
1193
|
-
- _Catatan_: Jalur
|
|
1194
|
-
-
|
|
1217
|
+
- _Default_: `undefined`
|
|
1218
|
+
- _Deskripsi_: Mendefinisikan jalur file output. Menggantikan `outputDir`. Menangani variabel dinamis melalui string template atau fungsi. Variabel yang didukung: `{{fileName}}`, `{{key}}`, `{{locale}}`, `{{extension}}`, `{{componentFileName}}`, `{{componentExtension}}`, `{{format}}`, `{{componentFormat}}`, dan `{{componentDirPath}}`.
|
|
1219
|
+
- _Catatan_: Jalur yang dimulai dengan `./` diselesaikan relatif terhadap direktori komponen. Jalur yang dimulai dengan `/` diselesaikan relatif terhadap root proyek (`baseDir`).
|
|
1220
|
+
- _Catatan_: Menyertakan variabel `{{locale}}` dalam jalur akan mengaktifkan pembuatan kamus yang dipisahkan berdasarkan bahasa.
|
|
1221
|
+
- _Contoh_:
|
|
1222
|
+
- **Buat file multi-bahasa di samping komponen**:
|
|
1223
|
+
- String: `'./{{fileName}}{{extension}}'`
|
|
1224
|
+
- Fungsi: `({ fileName, extension }) => \`./${fileName}${extension}\``
|
|
1225
|
+
|
|
1226
|
+
- **Output file JSON terpusat per bahasa**:
|
|
1227
|
+
- String: `'/locales/{{locale}}/{{key}}.content.json'`
|
|
1228
|
+
- Fungsi: `({ key, locale }) => \`/locales/${locale}/${key}.content.json\``
|
|
1195
1229
|
|
|
1196
1230
|
- **noMetadata**:
|
|
1197
1231
|
- _Tipe_: `boolean`
|
|
1198
1232
|
- _Default_: `false`
|
|
1199
1233
|
- _Deskripsi_: Menunjukkan apakah metadata harus disimpan dalam file. Jika benar, kompiler tidak akan menyimpan metadata kamus (kunci, pembungkus konten).
|
|
1200
|
-
- _Catatan_: Berguna jika digunakan dengan plugin `loadJSON`.
|
|
1201
|
-
- _Contoh_:
|
|
1234
|
+
- _Catatan_: Berguna jika digunakan dengan plugin `loadJSON`. Berguna untuk output JSON i18next atau ICU MessageFormat per bahasa.
|
|
1235
|
+
- _Contoh_:
|
|
1236
|
+
Jika `true` :
|
|
1237
|
+
|
|
1202
1238
|
```json
|
|
1203
1239
|
{
|
|
1204
1240
|
"key": "value"
|
|
1205
1241
|
}
|
|
1206
1242
|
```
|
|
1243
|
+
|
|
1207
1244
|
Jika `false`:
|
|
1245
|
+
|
|
1208
1246
|
```json
|
|
1209
1247
|
{
|
|
1210
1248
|
"key": "value",
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
---
|
|
2
2
|
createdAt: 2024-12-06
|
|
3
|
-
updatedAt:
|
|
3
|
+
updatedAt: 2026-03-12
|
|
4
4
|
title: Next.js i18n - Cara menerjemahkan aplikasi Next.js 16 di 2026
|
|
5
5
|
description: Temukan cara membuat situs web Next.js 16 Anda menjadi multibahasa. Ikuti dokumentasi untuk melakukan internasionalisasi (i18n) dan menerjemahkannya.
|
|
6
6
|
keywords:
|
|
@@ -1442,6 +1442,179 @@ return (
|
|
|
1442
1442
|
> - atribut [`dir`](https://developer.mozilla.org/en-US/docs/Web/HTML/Global_attributes/dir)
|
|
1443
1443
|
> - atribut [`aria-current`](https://developer.mozilla.org/en-US/docs/Web/Accessibility/ARIA/Attributes/aria-current)
|
|
1444
1444
|
|
|
1445
|
+
### (Opsional) Langkah 1 : Ekstrak konten komponen Anda
|
|
1446
|
+
|
|
1447
|
+
Jika Anda memiliki basis kode yang ada, mengubah ribuan file bisa memakan waktu lama.
|
|
1448
|
+
|
|
1449
|
+
Untuk memudahkan proses ini, Intlayer mengusulkan [compiler](https://github.com/aymericzip/intlayer/blob/main/docs/docs/id/compiler.md) / [extractor](https://github.com/aymericzip/intlayer/blob/main/docs/docs/id/cli/extract.md) untuk mengubah komponen Anda dan mengekstrak kontennya.
|
|
1450
|
+
|
|
1451
|
+
Untuk mengaturnya, Anda dapat menambahkan bagian `compiler` di file `intlayer.config.ts` Anda:
|
|
1452
|
+
|
|
1453
|
+
```typescript fileName="intlayer.config.ts" codeFormat="typescript"
|
|
1454
|
+
import { type IntlayerConfig } from "intlayer";
|
|
1455
|
+
|
|
1456
|
+
const config: IntlayerConfig = {
|
|
1457
|
+
// ... Sisa konfigurasi Anda
|
|
1458
|
+
compiler: {
|
|
1459
|
+
/**
|
|
1460
|
+
* Menunjukkan apakah compiler harus diaktifkan.
|
|
1461
|
+
*/
|
|
1462
|
+
enabled: true,
|
|
1463
|
+
|
|
1464
|
+
/**
|
|
1465
|
+
* Menentukan jalur file output
|
|
1466
|
+
*/
|
|
1467
|
+
output: ({ fileName, extension }) => `./${fileName}${extension}`,
|
|
1468
|
+
|
|
1469
|
+
/**
|
|
1470
|
+
* Menunjukkan apakah komponen harus disimpan setelah diubah. Dengan begitu, compiler dapat dijalankan satu kali saja untuk mengubah aplikasi, lalu dapat dihapus.
|
|
1471
|
+
*/
|
|
1472
|
+
saveComponents: false,
|
|
1473
|
+
|
|
1474
|
+
/**
|
|
1475
|
+
* Prefiks kunci kamus
|
|
1476
|
+
*/
|
|
1477
|
+
dictionaryKeyPrefix: "",
|
|
1478
|
+
},
|
|
1479
|
+
};
|
|
1480
|
+
|
|
1481
|
+
export default config;
|
|
1482
|
+
```
|
|
1483
|
+
|
|
1484
|
+
```javascript fileName="intlayer.config.mjs" codeFormat="esm"
|
|
1485
|
+
/** @type {import('intlayer').IntlayerConfig} */
|
|
1486
|
+
const config = {
|
|
1487
|
+
// ... Sisa konfigurasi Anda
|
|
1488
|
+
compiler: {
|
|
1489
|
+
/**
|
|
1490
|
+
* Menunjukkan apakah compiler harus diaktifkan.
|
|
1491
|
+
*/
|
|
1492
|
+
enabled: true,
|
|
1493
|
+
|
|
1494
|
+
/**
|
|
1495
|
+
* Menentukan jalur file output
|
|
1496
|
+
*/
|
|
1497
|
+
output: ({ fileName, extension }) => `./${fileName}${extension}`,
|
|
1498
|
+
|
|
1499
|
+
/**
|
|
1500
|
+
* Menunjukkan apakah komponen harus disimpan setelah diubah. Dengan begitu, compiler dapat dijalankan satu kali saja untuk mengubah aplikasi, lalu dapat dihapus.
|
|
1501
|
+
*/
|
|
1502
|
+
saveComponents: false,
|
|
1503
|
+
|
|
1504
|
+
/**
|
|
1505
|
+
* Prefiks kunci kamus
|
|
1506
|
+
*/
|
|
1507
|
+
dictionaryKeyPrefix: "",
|
|
1508
|
+
},
|
|
1509
|
+
};
|
|
1510
|
+
|
|
1511
|
+
export default config;
|
|
1512
|
+
```
|
|
1513
|
+
|
|
1514
|
+
```javascript fileName="intlayer.config.cjs" codeFormat="commonjs"
|
|
1515
|
+
/** @type {import('intlayer').IntlayerConfig} */
|
|
1516
|
+
const config = {
|
|
1517
|
+
// ... Sisa konfigurasi Anda
|
|
1518
|
+
compiler: {
|
|
1519
|
+
/**
|
|
1520
|
+
* Menunjukkan apakah compiler harus diaktifkan.
|
|
1521
|
+
*/
|
|
1522
|
+
enabled: true,
|
|
1523
|
+
|
|
1524
|
+
/**
|
|
1525
|
+
* Menentukan jalur file output
|
|
1526
|
+
*/
|
|
1527
|
+
output: ({ fileName, extension }) => `./${fileName}${extension}`,
|
|
1528
|
+
|
|
1529
|
+
/**
|
|
1530
|
+
* Menunjukkan apakah komponen harus disimpan setelah diubah. Dengan begitu, compiler dapat dijalankan satu kali saja untuk mengubah aplikasi, lalu dapat dihapus.
|
|
1531
|
+
*/
|
|
1532
|
+
saveComponents: false,
|
|
1533
|
+
|
|
1534
|
+
/**
|
|
1535
|
+
* Prefiks kunci kamus
|
|
1536
|
+
*/
|
|
1537
|
+
dictionaryKeyPrefix: "",
|
|
1538
|
+
},
|
|
1539
|
+
};
|
|
1540
|
+
|
|
1541
|
+
module.exports = config;
|
|
1542
|
+
```
|
|
1543
|
+
|
|
1544
|
+
<Tabs>
|
|
1545
|
+
<Tab value='Perintah ekstrak'>
|
|
1546
|
+
|
|
1547
|
+
Jalankan extractor untuk mengubah komponen Anda dan mengekstrak kontennya
|
|
1548
|
+
|
|
1549
|
+
```bash packageManager="npm"
|
|
1550
|
+
npx intlayer extract
|
|
1551
|
+
```
|
|
1552
|
+
|
|
1553
|
+
```bash packageManager="pnpm"
|
|
1554
|
+
pnpm intlayer extract
|
|
1555
|
+
```
|
|
1556
|
+
|
|
1557
|
+
```bash packageManager="yarn"
|
|
1558
|
+
yarn intlayer extract
|
|
1559
|
+
```
|
|
1560
|
+
|
|
1561
|
+
```bash packageManager="bun"
|
|
1562
|
+
bunx intlayer extract
|
|
1563
|
+
```
|
|
1564
|
+
|
|
1565
|
+
</Tab>
|
|
1566
|
+
<Tab value='Compiler Babel'>
|
|
1567
|
+
|
|
1568
|
+
```bash packageManager="npm"
|
|
1569
|
+
npm install @intlayer/babel --save-dev
|
|
1570
|
+
```
|
|
1571
|
+
|
|
1572
|
+
```bash packageManager="pnpm"
|
|
1573
|
+
pnpm add @intlayer/babel --save-dev
|
|
1574
|
+
```
|
|
1575
|
+
|
|
1576
|
+
```bash packageManager="yarn"
|
|
1577
|
+
yarn add @intlayer/babel --save-dev
|
|
1578
|
+
```
|
|
1579
|
+
|
|
1580
|
+
```bash packageManager="bun"
|
|
1581
|
+
bun add @intlayer/babel --dev
|
|
1582
|
+
```
|
|
1583
|
+
|
|
1584
|
+
```js fileName="babel.config.js"
|
|
1585
|
+
const {
|
|
1586
|
+
intlayerExtractBabelPlugin,
|
|
1587
|
+
getExtractPluginOptions,
|
|
1588
|
+
} = require("@intlayer/babel");
|
|
1589
|
+
|
|
1590
|
+
module.exports = {
|
|
1591
|
+
presets: ["next/babel"],
|
|
1592
|
+
plugins: [
|
|
1593
|
+
// Ekstrak konten dari komponen ke dalam kamus
|
|
1594
|
+
[intlayerExtractBabelPlugin, getExtractPluginOptions()],
|
|
1595
|
+
],
|
|
1596
|
+
};
|
|
1597
|
+
```
|
|
1598
|
+
|
|
1599
|
+
```bash packageManager="npm"
|
|
1600
|
+
npm run build # Atau npm run dev
|
|
1601
|
+
```
|
|
1602
|
+
|
|
1603
|
+
```bash packageManager="pnpm"
|
|
1604
|
+
pnpm run build # Or pnpm run dev
|
|
1605
|
+
```
|
|
1606
|
+
|
|
1607
|
+
```bash packageManager="yarn"
|
|
1608
|
+
yarn build # Or yarn dev
|
|
1609
|
+
```
|
|
1610
|
+
|
|
1611
|
+
```bash packageManager="bun"
|
|
1612
|
+
bun run build # Or bun run dev
|
|
1613
|
+
```
|
|
1614
|
+
|
|
1615
|
+
</Tab>
|
|
1616
|
+
</Tabs>
|
|
1617
|
+
|
|
1445
1618
|
### (Opsional) Langkah 11: Membuat Komponen Link yang Dilokalkan
|
|
1446
1619
|
|
|
1447
1620
|
Untuk memastikan navigasi aplikasi Anda menghormati lokal saat ini, Anda dapat membuat komponen `Link` kustom. Komponen ini secara otomatis menambahkan awalan bahasa saat ini pada URL internal, sehingga. Misalnya, ketika pengguna berbahasa Prancis mengklik tautan ke halaman "Tentang", mereka akan diarahkan ke `/fr/about` alih-alih `/about`.
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
---
|
|
2
2
|
createdAt: 2026-01-10
|
|
3
|
-
updatedAt: 2026-
|
|
3
|
+
updatedAt: 2026-03-12
|
|
4
4
|
title: Next.js i18n - Ubah aplikasi Next.js yang sudah ada menjadi aplikasi multibahasa di 2026
|
|
5
5
|
description: Temukan cara membuat aplikasi Next.js Anda yang sudah ada menjadi multibahasa menggunakan Intlayer Compiler. Ikuti panduan dokumentasi untuk melakukan internasionalisasi (i18n) dan menerjemahkan aplikasi Anda menggunakan AI.
|
|
6
6
|
keywords:
|
|
@@ -501,6 +501,179 @@ Ekstensi ini menyediakan:
|
|
|
501
501
|
|
|
502
502
|
Baca [dokumentasi Ekstensi VS Code Intlayer](https://intlayer.org/doc/vs-code-extension) untuk instruksi mendetail tentang penggunaan ekstensi.
|
|
503
503
|
|
|
504
|
+
### (Opsional) Langkah 1 : Ekstrak konten komponen Anda
|
|
505
|
+
|
|
506
|
+
Jika Anda memiliki basis kode yang ada, mengubah ribuan file bisa memakan waktu lama.
|
|
507
|
+
|
|
508
|
+
Untuk memudahkan proses ini, Intlayer mengusulkan [compiler](https://github.com/aymericzip/intlayer/blob/main/docs/docs/id/compiler.md) / [extractor](https://github.com/aymericzip/intlayer/blob/main/docs/docs/id/cli/extract.md) untuk mengubah komponen Anda dan mengekstrak kontennya.
|
|
509
|
+
|
|
510
|
+
Untuk mengaturnya, Anda dapat menambahkan bagian `compiler` di file `intlayer.config.ts` Anda:
|
|
511
|
+
|
|
512
|
+
```typescript fileName="intlayer.config.ts" codeFormat="typescript"
|
|
513
|
+
import { type IntlayerConfig } from "intlayer";
|
|
514
|
+
|
|
515
|
+
const config: IntlayerConfig = {
|
|
516
|
+
// ... Sisa konfigurasi Anda
|
|
517
|
+
compiler: {
|
|
518
|
+
/**
|
|
519
|
+
* Menunjukkan apakah compiler harus diaktifkan.
|
|
520
|
+
*/
|
|
521
|
+
enabled: true,
|
|
522
|
+
|
|
523
|
+
/**
|
|
524
|
+
* Menentukan jalur file output
|
|
525
|
+
*/
|
|
526
|
+
output: ({ fileName, extension }) => `./${fileName}${extension}`,
|
|
527
|
+
|
|
528
|
+
/**
|
|
529
|
+
* Menunjukkan apakah komponen harus disimpan setelah diubah. Dengan begitu, compiler dapat dijalankan satu kali saja untuk mengubah aplikasi, lalu dapat dihapus.
|
|
530
|
+
*/
|
|
531
|
+
saveComponents: false,
|
|
532
|
+
|
|
533
|
+
/**
|
|
534
|
+
* Prefiks kunci kamus
|
|
535
|
+
*/
|
|
536
|
+
dictionaryKeyPrefix: "",
|
|
537
|
+
},
|
|
538
|
+
};
|
|
539
|
+
|
|
540
|
+
export default config;
|
|
541
|
+
```
|
|
542
|
+
|
|
543
|
+
```javascript fileName="intlayer.config.mjs" codeFormat="esm"
|
|
544
|
+
/** @type {import('intlayer').IntlayerConfig} */
|
|
545
|
+
const config = {
|
|
546
|
+
// ... Sisa konfigurasi Anda
|
|
547
|
+
compiler: {
|
|
548
|
+
/**
|
|
549
|
+
* Menunjukkan apakah compiler harus diaktifkan.
|
|
550
|
+
*/
|
|
551
|
+
enabled: true,
|
|
552
|
+
|
|
553
|
+
/**
|
|
554
|
+
* Menentukan jalur file output
|
|
555
|
+
*/
|
|
556
|
+
output: ({ fileName, extension }) => `./${fileName}${extension}`,
|
|
557
|
+
|
|
558
|
+
/**
|
|
559
|
+
* Menunjukkan apakah komponen harus disimpan setelah diubah. Dengan begitu, compiler dapat dijalankan satu kali saja untuk mengubah aplikasi, lalu dapat dihapus.
|
|
560
|
+
*/
|
|
561
|
+
saveComponents: false,
|
|
562
|
+
|
|
563
|
+
/**
|
|
564
|
+
* Prefiks kunci kamus
|
|
565
|
+
*/
|
|
566
|
+
dictionaryKeyPrefix: "",
|
|
567
|
+
},
|
|
568
|
+
};
|
|
569
|
+
|
|
570
|
+
export default config;
|
|
571
|
+
```
|
|
572
|
+
|
|
573
|
+
```javascript fileName="intlayer.config.cjs" codeFormat="commonjs"
|
|
574
|
+
/** @type {import('intlayer').IntlayerConfig} */
|
|
575
|
+
const config = {
|
|
576
|
+
// ... Sisa konfigurasi Anda
|
|
577
|
+
compiler: {
|
|
578
|
+
/**
|
|
579
|
+
* Menunjukkan apakah compiler harus diaktifkan.
|
|
580
|
+
*/
|
|
581
|
+
enabled: true,
|
|
582
|
+
|
|
583
|
+
/**
|
|
584
|
+
* Menentukan jalur file output
|
|
585
|
+
*/
|
|
586
|
+
output: ({ fileName, extension }) => `./${fileName}${extension}`,
|
|
587
|
+
|
|
588
|
+
/**
|
|
589
|
+
* Menunjukkan apakah komponen harus disimpan setelah diubah. Dengan begitu, compiler dapat dijalankan satu kali saja untuk mengubah aplikasi, lalu dapat dihapus.
|
|
590
|
+
*/
|
|
591
|
+
saveComponents: false,
|
|
592
|
+
|
|
593
|
+
/**
|
|
594
|
+
* Prefiks kunci kamus
|
|
595
|
+
*/
|
|
596
|
+
dictionaryKeyPrefix: "",
|
|
597
|
+
},
|
|
598
|
+
};
|
|
599
|
+
|
|
600
|
+
module.exports = config;
|
|
601
|
+
```
|
|
602
|
+
|
|
603
|
+
<Tabs>
|
|
604
|
+
<Tab value='Perintah ekstrak'>
|
|
605
|
+
|
|
606
|
+
Jalankan extractor untuk mengubah komponen Anda dan mengekstrak kontennya
|
|
607
|
+
|
|
608
|
+
```bash packageManager="npm"
|
|
609
|
+
npx intlayer extract
|
|
610
|
+
```
|
|
611
|
+
|
|
612
|
+
```bash packageManager="pnpm"
|
|
613
|
+
pnpm intlayer extract
|
|
614
|
+
```
|
|
615
|
+
|
|
616
|
+
```bash packageManager="yarn"
|
|
617
|
+
yarn intlayer extract
|
|
618
|
+
```
|
|
619
|
+
|
|
620
|
+
```bash packageManager="bun"
|
|
621
|
+
bunx intlayer extract
|
|
622
|
+
```
|
|
623
|
+
|
|
624
|
+
</Tab>
|
|
625
|
+
<Tab value='Compiler Babel'>
|
|
626
|
+
|
|
627
|
+
```bash packageManager="npm"
|
|
628
|
+
npm install @intlayer/babel --save-dev
|
|
629
|
+
```
|
|
630
|
+
|
|
631
|
+
```bash packageManager="pnpm"
|
|
632
|
+
pnpm add @intlayer/babel --save-dev
|
|
633
|
+
```
|
|
634
|
+
|
|
635
|
+
```bash packageManager="yarn"
|
|
636
|
+
yarn add @intlayer/babel --save-dev
|
|
637
|
+
```
|
|
638
|
+
|
|
639
|
+
```bash packageManager="bun"
|
|
640
|
+
bun add @intlayer/babel --dev
|
|
641
|
+
```
|
|
642
|
+
|
|
643
|
+
```js fileName="babel.config.js"
|
|
644
|
+
const {
|
|
645
|
+
intlayerExtractBabelPlugin,
|
|
646
|
+
getExtractPluginOptions,
|
|
647
|
+
} = require("@intlayer/babel");
|
|
648
|
+
|
|
649
|
+
module.exports = {
|
|
650
|
+
presets: ["next/babel"],
|
|
651
|
+
plugins: [
|
|
652
|
+
// Ekstrak konten dari komponen ke dalam kamus
|
|
653
|
+
[intlayerExtractBabelPlugin, getExtractPluginOptions()],
|
|
654
|
+
],
|
|
655
|
+
};
|
|
656
|
+
```
|
|
657
|
+
|
|
658
|
+
```bash packageManager="npm"
|
|
659
|
+
npm run build # Atau npm run dev
|
|
660
|
+
```
|
|
661
|
+
|
|
662
|
+
```bash packageManager="pnpm"
|
|
663
|
+
pnpm run build # Or pnpm run dev
|
|
664
|
+
```
|
|
665
|
+
|
|
666
|
+
```bash packageManager="yarn"
|
|
667
|
+
yarn build # Or yarn dev
|
|
668
|
+
```
|
|
669
|
+
|
|
670
|
+
```bash packageManager="bun"
|
|
671
|
+
bun run build # Or bun run dev
|
|
672
|
+
```
|
|
673
|
+
|
|
674
|
+
</Tab>
|
|
675
|
+
</Tabs>
|
|
676
|
+
|
|
504
677
|
### Melangkah Lebih Jauh
|
|
505
678
|
|
|
506
679
|
Untuk melangkah lebih jauh, Anda dapat mengimplementasikan [editor visual](https://github.com/aymericzip/intlayer/blob/main/docs/docs/id/intlayer_visual_editor.md) atau mengeksternalisasikan konten Anda menggunakan [CMS](https://github.com/aymericzip/intlayer/blob/main/docs/docs/id/intlayer_CMS.md).
|