@intlayer/docs 8.5.0 → 8.5.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/dictionary/html.md +10 -3
- package/docs/ar/dictionary/markdown.md +15 -17
- package/docs/ar/intlayer_with_analog.md +8 -14
- package/docs/ar/intlayer_with_vite+lit.md +8 -57
- package/docs/ar/intlayer_with_vite+vue.md +3 -3
- package/docs/bn/intlayer_with_vite+lit.md +8 -57
- package/docs/cs/intlayer_with_vite+lit.md +8 -57
- package/docs/de/compiler.md +6 -1
- package/docs/de/configuration.md +12 -9
- package/docs/de/dictionary/html.md +11 -8
- package/docs/de/dictionary/markdown.md +17 -23
- package/docs/de/intlayer_with_analog.md +8 -14
- package/docs/de/intlayer_with_vite+lit.md +8 -57
- package/docs/de/intlayer_with_vite+vue.md +3 -3
- package/docs/en/compiler.md +2 -0
- package/docs/en/configuration.md +8 -8
- package/docs/en/dictionary/html.md +12 -9
- package/docs/en/dictionary/markdown.md +18 -24
- package/docs/en/intlayer_with_analog.md +8 -14
- package/docs/en/intlayer_with_vite+lit.md +10 -57
- package/docs/en/intlayer_with_vite+vue.md +13 -3
- package/docs/en-GB/dictionary/html.md +10 -3
- package/docs/en-GB/dictionary/markdown.md +16 -18
- package/docs/en-GB/intlayer_with_analog.md +8 -14
- package/docs/en-GB/intlayer_with_vite+lit.md +10 -57
- package/docs/en-GB/intlayer_with_vite+vue.md +3 -3
- package/docs/es/compiler.md +6 -1
- package/docs/es/configuration.md +12 -9
- package/docs/es/dictionary/html.md +11 -8
- package/docs/es/dictionary/markdown.md +18 -24
- package/docs/es/intlayer_with_analog.md +8 -14
- package/docs/es/intlayer_with_vite+lit.md +8 -57
- package/docs/es/intlayer_with_vite+vue.md +3 -3
- package/docs/fr/compiler.md +8 -3
- package/docs/fr/configuration.md +12 -9
- package/docs/fr/dictionary/html.md +11 -8
- package/docs/fr/dictionary/markdown.md +18 -24
- package/docs/fr/intlayer_with_analog.md +8 -14
- package/docs/fr/intlayer_with_vite+lit.md +8 -57
- package/docs/fr/intlayer_with_vite+vue.md +3 -3
- package/docs/hi/dictionary/html.md +10 -3
- package/docs/hi/dictionary/markdown.md +17 -19
- package/docs/hi/intlayer_with_analog.md +8 -14
- package/docs/hi/intlayer_with_vite+lit.md +8 -57
- package/docs/hi/intlayer_with_vite+vue.md +3 -3
- package/docs/id/dictionary/html.md +10 -3
- package/docs/id/dictionary/markdown.md +17 -19
- package/docs/id/intlayer_with_analog.md +8 -14
- package/docs/id/intlayer_with_vite+lit.md +8 -57
- package/docs/id/intlayer_with_vite+vue.md +3 -3
- package/docs/it/compiler.md +8 -3
- package/docs/it/configuration.md +12 -9
- package/docs/it/dictionary/html.md +11 -8
- package/docs/it/dictionary/markdown.md +18 -24
- package/docs/it/intlayer_with_analog.md +8 -14
- package/docs/it/intlayer_with_vite+lit.md +8 -57
- package/docs/it/intlayer_with_vite+vue.md +3 -3
- package/docs/ja/dictionary/html.md +11 -8
- package/docs/ja/dictionary/markdown.md +21 -24
- package/docs/ja/intlayer_with_analog.md +8 -14
- package/docs/ja/intlayer_with_vite+lit.md +8 -57
- package/docs/ja/intlayer_with_vite+vue.md +3 -3
- package/docs/ko/dictionary/html.md +11 -8
- package/docs/ko/dictionary/markdown.md +18 -24
- package/docs/ko/intlayer_with_analog.md +8 -14
- package/docs/ko/intlayer_with_vite+lit.md +8 -57
- package/docs/ko/intlayer_with_vite+vue.md +3 -3
- package/docs/nl/intlayer_with_vite+lit.md +8 -57
- package/docs/pl/dictionary/html.md +11 -8
- package/docs/pl/dictionary/markdown.md +18 -24
- package/docs/pl/intlayer_with_analog.md +8 -14
- package/docs/pl/intlayer_with_vite+lit.md +8 -57
- package/docs/pl/intlayer_with_vite+vue.md +3 -3
- package/docs/pt/compiler.md +7 -2
- package/docs/pt/configuration.md +11 -9
- package/docs/pt/dictionary/html.md +11 -8
- package/docs/pt/dictionary/markdown.md +18 -24
- package/docs/pt/intlayer_with_analog.md +8 -14
- package/docs/pt/intlayer_with_vite+lit.md +8 -57
- package/docs/pt/intlayer_with_vite+vue.md +3 -3
- package/docs/ru/dictionary/html.md +11 -8
- package/docs/ru/dictionary/markdown.md +18 -24
- package/docs/ru/intlayer_with_analog.md +8 -14
- package/docs/ru/intlayer_with_vite+lit.md +8 -57
- package/docs/ru/intlayer_with_vite+vue.md +3 -3
- package/docs/tr/dictionary/html.md +11 -8
- package/docs/tr/dictionary/markdown.md +18 -24
- package/docs/tr/intlayer_with_analog.md +8 -14
- package/docs/tr/intlayer_with_vite+lit.md +8 -57
- package/docs/tr/intlayer_with_vite+vue.md +3 -3
- package/docs/uk/dictionary/html.md +10 -3
- package/docs/uk/dictionary/markdown.md +17 -19
- package/docs/uk/intlayer_with_analog.md +8 -14
- package/docs/uk/intlayer_with_vite+lit.md +8 -57
- package/docs/uk/intlayer_with_vite+vue.md +3 -3
- package/docs/ur/intlayer_with_vite+lit.md +8 -57
- package/docs/vi/dictionary/html.md +10 -3
- package/docs/vi/dictionary/markdown.md +17 -19
- package/docs/vi/intlayer_with_analog.md +8 -14
- package/docs/vi/intlayer_with_vite+lit.md +8 -57
- package/docs/vi/intlayer_with_vite+vue.md +3 -3
- package/docs/zh/compiler.md +8 -3
- package/docs/zh/configuration.md +4 -1
- package/docs/zh/dictionary/html.md +11 -8
- package/docs/zh/dictionary/markdown.md +18 -24
- package/docs/zh/intlayer_with_analog.md +8 -14
- package/docs/zh/intlayer_with_vite+lit.md +8 -57
- package/docs/zh/intlayer_with_vite+vue.md +3 -3
- package/package.json +6 -6
|
@@ -17,6 +17,12 @@ slugs:
|
|
|
17
17
|
- content
|
|
18
18
|
- markdown
|
|
19
19
|
history:
|
|
20
|
+
- version: 8.5.0
|
|
21
|
+
date: 2026-03-24
|
|
22
|
+
changes: "Add `intlayerMarkdown` plugin object; use `app.use(intlayerMarkdown)` instead of `app.use(installIntlayerMarkdown)`"
|
|
23
|
+
- version: 8.5.0
|
|
24
|
+
date: 2026-03-24
|
|
25
|
+
changes: "move import from `{{framework}}-intlayer` to `{{framework}}-intlayer/markdown`"
|
|
20
26
|
- version: 8.0.0
|
|
21
27
|
date: 2026-01-22
|
|
22
28
|
changes: "Menambahkan utilitas MarkdownRenderer / useMarkdownRenderer / renderMarkdown dan opsi forceInline"
|
|
@@ -32,7 +38,7 @@ history:
|
|
|
32
38
|
|
|
33
39
|
Intlayer mendukung konten teks kaya yang didefinisikan menggunakan sintaks Markdown. Ini memungkinkan Anda menulis dan memelihara konten dengan format kaya secara mudah, seperti blog, artikel, dan lainnya.
|
|
34
40
|
|
|
35
|
-
##
|
|
41
|
+
## Mendeklarasikan Konten Markdown
|
|
36
42
|
|
|
37
43
|
Anda dapat menyatakan konten Markdown menggunakan fungsi `md` atau cukup sebagai string (jika mengandung sintaks Markdown).
|
|
38
44
|
|
|
@@ -90,7 +96,7 @@ Anda dapat menyatakan konten Markdown menggunakan fungsi `md` atau cukup sebagai
|
|
|
90
96
|
|
|
91
97
|
---
|
|
92
98
|
|
|
93
|
-
##
|
|
99
|
+
## Merender Markdown
|
|
94
100
|
|
|
95
101
|
Proses merender dapat ditangani secara otomatis oleh sistem konten Intlayer atau secara manual menggunakan alat khusus.
|
|
96
102
|
|
|
@@ -387,8 +393,6 @@ Anda dapat mengonfigurasi perenderan Markdown secara global untuk seluruh aplika
|
|
|
387
393
|
|
|
388
394
|
export const AppProvider = ({ children }) => (
|
|
389
395
|
<MarkdownProvider
|
|
390
|
-
forceBlock={true}
|
|
391
|
-
tagfilter={true}
|
|
392
396
|
components={{
|
|
393
397
|
h1: ({ children }) => <h1 className="text-2xl font-bold">{children}</h1>,
|
|
394
398
|
a: ({ href, children }) => <Link to={href}>{children}</Link>,
|
|
@@ -404,20 +408,20 @@ Anda dapat mengonfigurasi perenderan Markdown secara global untuk seluruh aplika
|
|
|
404
408
|
|
|
405
409
|
```typescript fileName="main.ts"
|
|
406
410
|
import { createApp } from "vue";
|
|
407
|
-
import {
|
|
411
|
+
import { intlayer } from "vue-intlayer";
|
|
412
|
+
import { intlayerMarkdown } from "vue-intlayer/markdown";
|
|
408
413
|
import App from "./App.vue";
|
|
409
414
|
|
|
410
415
|
const app = createApp(App);
|
|
411
416
|
|
|
412
|
-
app.use(
|
|
413
|
-
app.use(
|
|
414
|
-
forceBlock: true,
|
|
415
|
-
tagfilter: true,
|
|
417
|
+
app.use(intlayer);
|
|
418
|
+
app.use(intlayerMarkdown, {
|
|
416
419
|
components: {
|
|
417
|
-
h1:
|
|
418
|
-
|
|
419
|
-
|
|
420
|
-
|
|
420
|
+
h1: (props) =>
|
|
421
|
+
h('h1', { style: { color: 'orange' }, ...props }, props.children),
|
|
422
|
+
ComponentDemo: () => h('div', { style: { background: 'grey' } }, 'DEMO'),
|
|
423
|
+
bold: (props) => h('strong', props),
|
|
424
|
+
code: (props) => h('code', props),
|
|
421
425
|
},
|
|
422
426
|
});
|
|
423
427
|
|
|
@@ -434,8 +438,6 @@ Anda dapat mengonfigurasi perenderan Markdown secara global untuk seluruh aplika
|
|
|
434
438
|
</script>
|
|
435
439
|
|
|
436
440
|
<MarkdownProvider
|
|
437
|
-
forceBlock={true}
|
|
438
|
-
tagfilter={true}
|
|
439
441
|
components={{
|
|
440
442
|
h1: MyHeading,
|
|
441
443
|
}}
|
|
@@ -452,8 +454,6 @@ Anda dapat mengonfigurasi perenderan Markdown secara global untuk seluruh aplika
|
|
|
452
454
|
|
|
453
455
|
export const AppProvider = ({ children }) => (
|
|
454
456
|
<MarkdownProvider
|
|
455
|
-
forceBlock={true}
|
|
456
|
-
tagfilter={true}
|
|
457
457
|
components={{
|
|
458
458
|
h1: ({ children }) => <h1 className="text-2xl font-bold">{children}</h1>,
|
|
459
459
|
}}
|
|
@@ -471,8 +471,6 @@ Anda dapat mengonfigurasi perenderan Markdown secara global untuk seluruh aplika
|
|
|
471
471
|
|
|
472
472
|
export const AppProvider = (props) => (
|
|
473
473
|
<MarkdownProvider
|
|
474
|
-
forceBlock={true}
|
|
475
|
-
tagfilter={true}
|
|
476
474
|
components={{
|
|
477
475
|
h1: (props) => <h1 className="text-2xl font-bold">{props.children}</h1>,
|
|
478
476
|
}}
|
|
@@ -23,6 +23,14 @@ history:
|
|
|
23
23
|
|
|
24
24
|
# Terjemahkan aplikasi Analog (Angular) Anda menggunakan Intlayer | Internasionalisasi (i18n)
|
|
25
25
|
|
|
26
|
+
<iframe
|
|
27
|
+
src="https://stackblitz.com/github/aymericzip/intlayer-analog-template?embed=1&ctl=1&file=intlayer.config.ts"
|
|
28
|
+
className="m-auto overflow-hidden rounded-lg border-0 max-md:size-full max-md:h-[700px] md:aspect-16/9 md:w-full"
|
|
29
|
+
title="Demo CodeSandbox - How to Internationalize your application using Intlayer"
|
|
30
|
+
sandbox="allow-forms allow-modals allow-popups allow-presentation allow-same-origin allow-scripts"
|
|
31
|
+
loading="lazy"
|
|
32
|
+
/>
|
|
33
|
+
|
|
26
34
|
## Daftar Isi
|
|
27
35
|
|
|
28
36
|
<TOC/>
|
|
@@ -42,20 +50,6 @@ Dengan Intlayer, Anda dapat:
|
|
|
42
50
|
|
|
43
51
|
## Panduan Langkah demi Langkah untuk Menyiapkan Intlayer dalam Aplikasi Analog
|
|
44
52
|
|
|
45
|
-
<Tabs defaultTab="code">
|
|
46
|
-
<Tab label="Code" value="code">
|
|
47
|
-
|
|
48
|
-
<iframe
|
|
49
|
-
src="https://stackblitz.com/github/aymericzip/intlayer/tree/main/examples/vite-analog-app?embed=1&ctl=1&file=intlayer.config.ts"
|
|
50
|
-
className="m-auto overflow-hidden rounded-lg border-0 max-md:size-full max-md:h-[700px] md:aspect-16/9 md:w-full"
|
|
51
|
-
title="Demo CodeSandbox - How to Internationalize your application using Intlayer"
|
|
52
|
-
sandbox="allow-forms allow-modals allow-popups allow-presentation allow-same-origin allow-scripts"
|
|
53
|
-
loading="lazy"
|
|
54
|
-
/>
|
|
55
|
-
|
|
56
|
-
</Tab>
|
|
57
|
-
</Tabs>
|
|
58
|
-
|
|
59
53
|
Lihat [Templat Aplikasi](https://github.com/aymericzip/intlayer-analog-template) di GitHub.
|
|
60
54
|
|
|
61
55
|
### Langkah 1: Instal Dependensi
|
|
@@ -24,6 +24,14 @@ history:
|
|
|
24
24
|
|
|
25
25
|
# Terjemahkan situs web Vite dan Lit Anda dengan Intlayer | Internasionalisasi (i18n)
|
|
26
26
|
|
|
27
|
+
<iframe
|
|
28
|
+
src="https://stackblitz.com/github/aymericzip/intlayer-vite-lit-template?embed=1&ctl=1&file=intlayer.config.ts"
|
|
29
|
+
className="m-auto overflow-hidden rounded-lg border-0 max-md:size-full max-md:h-[700px] md:aspect-16/9 md:w-full"
|
|
30
|
+
title="Demo CodeSandbox - How to Internationalize your application using Intlayer"
|
|
31
|
+
sandbox="allow-forms allow-modals allow-popups allow-presentation allow-same-origin allow-scripts"
|
|
32
|
+
loading="lazy"
|
|
33
|
+
/>
|
|
34
|
+
|
|
27
35
|
## Daftar Isi
|
|
28
36
|
|
|
29
37
|
<TOC/>
|
|
@@ -631,63 +639,6 @@ const config: IntlayerConfig = {
|
|
|
631
639
|
export default config;
|
|
632
640
|
```
|
|
633
641
|
|
|
634
|
-
<Tabs>
|
|
635
|
-
<Tab value='Perintah Extract'>
|
|
636
|
-
|
|
637
|
-
Jalankan ekstraktor untuk mengubah komponen Anda dan mengekstrak konten
|
|
638
|
-
|
|
639
|
-
```bash packageManager="npm"
|
|
640
|
-
npx intlayer extract
|
|
641
|
-
```
|
|
642
|
-
|
|
643
|
-
```bash packageManager="pnpm"
|
|
644
|
-
pnpm intlayer extract
|
|
645
|
-
```
|
|
646
|
-
|
|
647
|
-
```bash packageManager="yarn"
|
|
648
|
-
yarn intlayer extract
|
|
649
|
-
```
|
|
650
|
-
|
|
651
|
-
```bash packageManager="bun"
|
|
652
|
-
bunx intlayer extract
|
|
653
|
-
```
|
|
654
|
-
|
|
655
|
-
</Tab>
|
|
656
|
-
<Tab value='Babel kompilator'>
|
|
657
|
-
|
|
658
|
-
Perbarui `vite.config.ts` Anda untuk menyertakan plugin `intlayerCompiler`:
|
|
659
|
-
|
|
660
|
-
```ts fileName="vite.config.ts"
|
|
661
|
-
import { defineConfig } from "vite";
|
|
662
|
-
import { intlayer, intlayerCompiler } from "vite-intlayer";
|
|
663
|
-
|
|
664
|
-
export default defineConfig({
|
|
665
|
-
plugins: [
|
|
666
|
-
intlayer(),
|
|
667
|
-
intlayerCompiler(), // Menambahkan plugin kompilator
|
|
668
|
-
],
|
|
669
|
-
});
|
|
670
|
-
```
|
|
671
|
-
|
|
672
|
-
```bash packageManager="npm"
|
|
673
|
-
npm run build # Atau npm run dev
|
|
674
|
-
```
|
|
675
|
-
|
|
676
|
-
```bash packageManager="pnpm"
|
|
677
|
-
pnpm run build # Atau pnpm run dev
|
|
678
|
-
```
|
|
679
|
-
|
|
680
|
-
```bash packageManager="yarn"
|
|
681
|
-
yarn build # Atau yarn dev
|
|
682
|
-
```
|
|
683
|
-
|
|
684
|
-
```bash packageManager="bun"
|
|
685
|
-
bun run build # Atau bun run dev
|
|
686
|
-
```
|
|
687
|
-
|
|
688
|
-
</Tab>
|
|
689
|
-
</Tabs>
|
|
690
|
-
|
|
691
642
|
### Konfigurasi TypeScript
|
|
692
643
|
|
|
693
644
|
Pastikan konfigurasi TypeScript Anda menyertakan tipe yang dibuat secara otomatis.
|
|
@@ -442,14 +442,14 @@ Untuk memanfaatkan fitur internasionalisasi Intlayer di seluruh aplikasi Vue And
|
|
|
442
442
|
|
|
443
443
|
```javascript fileName=main.js
|
|
444
444
|
import { createApp } from "vue";
|
|
445
|
-
import {
|
|
445
|
+
import { intlayer } from "vue-intlayer";
|
|
446
446
|
import App from "./App.vue";
|
|
447
447
|
import "./style.css";
|
|
448
448
|
|
|
449
449
|
const app = createApp(App);
|
|
450
450
|
|
|
451
451
|
// Menyuntikkan provider di tingkat atas
|
|
452
|
-
|
|
452
|
+
app.use(intlayer);
|
|
453
453
|
|
|
454
454
|
// Memasang aplikasi
|
|
455
455
|
app.mount("#app");
|
|
@@ -1024,7 +1024,7 @@ import { installIntlayer, installIntlayerMarkdown } from "vue-intlayer";
|
|
|
1024
1024
|
|
|
1025
1025
|
const app = createApp(App);
|
|
1026
1026
|
|
|
1027
|
-
|
|
1027
|
+
app.use(intlayer);
|
|
1028
1028
|
|
|
1029
1029
|
const md = new MarkdownIt({
|
|
1030
1030
|
html: true, // mengizinkan tag HTML
|
package/docs/it/compiler.md
CHANGED
|
@@ -207,8 +207,11 @@ const config: IntlayerConfig = {
|
|
|
207
207
|
output: ({ fileName, extension }) => `./${fileName}${extension}`,
|
|
208
208
|
|
|
209
209
|
/**
|
|
210
|
-
*
|
|
211
|
-
*
|
|
210
|
+
* Se salvare i componenti dopo averli trasformati.
|
|
211
|
+
*
|
|
212
|
+
* - Se impostato su `true`, il compilatore riscriverà il file del componente sul disco. Pertanto la trasformazione sarà permanente e il compilatore salterà la trasformazione per il processo successivo. In questo modo, il compilatore può trasformare l'app e poi può essere rimosso.
|
|
213
|
+
*
|
|
214
|
+
* - Se impostato su `false`, il compilatore inietterà la chiamata alla funzione `useIntlayer()` nel codice solo nell'output della build, mantenendo intatta la base di codice originale. La trasformazione verrà eseguita solo in memoria.
|
|
212
215
|
*/
|
|
213
216
|
saveComponents: false,
|
|
214
217
|
|
|
@@ -286,7 +289,9 @@ Le seguenti proprietà possono essere configurate nel blocco `compiler` del file
|
|
|
286
289
|
- **saveComponents**:
|
|
287
290
|
- _Tipo_: `boolean`
|
|
288
291
|
- _Predefinito_: `false`
|
|
289
|
-
- _Descrizione_: Indica se i componenti
|
|
292
|
+
- _Descrizione_: Indica se i componenti debbano essere salvati dopo essere stati trasformati.
|
|
293
|
+
- Se impostato su `true`, il compilatore riscriverà il file del componente sul disco. La trasformazione sarà permanente e il compilatore potrà essere rimosso.
|
|
294
|
+
- Se impostato su `false`, il compilatore inietterà la chiamata alla funzione `useIntlayer()` nel codice solo nell'output della build, mantenendo intatta la base di codice originale. La trasformazione verrà eseguita solo in memoria.
|
|
290
295
|
|
|
291
296
|
### Riempire le traduzioni mancanti
|
|
292
297
|
|
package/docs/it/configuration.md
CHANGED
|
@@ -518,7 +518,10 @@ const config: IntlayerConfig = {
|
|
|
518
518
|
|
|
519
519
|
/**
|
|
520
520
|
* Se salvare i componenti dopo averli trasformati.
|
|
521
|
-
*
|
|
521
|
+
*
|
|
522
|
+
* - Se impostato su `true`, il compilatore riscriverà il file del componente sul disco. Pertanto la trasformazione sarà permanente e il compilatore salterà la trasformazione per il processo successivo. In questo modo, il compilatore può trasformare l'app e poi può essere rimosso.
|
|
523
|
+
*
|
|
524
|
+
* - Se impostato su `false`, il compilatore inietterà la chiamata alla funzione `useIntlayer()` nel codice solo nell'output della build, mantenendo intatta la base di codice originale. La trasformazione verrà eseguita solo in memoria.
|
|
522
525
|
*/
|
|
523
526
|
saveComponents: false,
|
|
524
527
|
|
|
@@ -932,14 +935,14 @@ Queste impostazioni sono per utenti esperti e per la configurazione interna di I
|
|
|
932
935
|
|
|
933
936
|
Impostazioni che controllano il compilatore Intlayer, che raccoglie i dizionari direttamente dai tuoi componenti.
|
|
934
937
|
|
|
935
|
-
| Campo | Descrizione | Tipo | Predefinito | Esempio | Commenti
|
|
936
|
-
| --------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------- | ----------- | -------------------------------------------------------------------------------------------------------------------------------------------------------- |
|
|
937
|
-
| `enabled` | Indica se il compilatore debba essere attivo per raccogliere i dizionari. | `boolean` | <br/> `'build-only'` | `true` | `'build-only'` | `'build-only'` salta il compilatore durante lo sviluppo per build più veloci; viene eseguito solo durante i comandi di build.
|
|
938
|
-
| `dictionaryKeyPrefix` | Prefisso per le chiavi del dizionario raccolte. | `string` | `''` | `'mio-prefisso-'` | Anteposto alla chiave generata (basata sul nome del file) per evitare conflitti.
|
|
939
|
-
| `saveComponents` |
|
|
940
|
-
| `output` | Determina il percorso del file di output. Sostituisce `outputDir`. Supporta variabili template: `{{fileName}}`, <br/> `{{key}}`, <br/> `{{locale}}`, <br/> `{{extension}}`, <br/> `{{componentFileName}}`, <br/> `{{componentExtension}}`, <br/> `{{format}}`, <br/> `{{componentFormat}}`, <br/> `{{componentDirPath}}`. | `boolean` | <br/> `FilePathPattern` | <br/> `Partial<Record<Locale, boolean | FilePathPattern>>` | `undefined` | `'./{{fileName}}{{extension}}'` <br/> `'/locales/{{locale}}/{{key}}.json'` <br/> `{ en: ({ key }) => './locales/en/${key}.json', fr: '...', es: false }` | • Percorsi `./` risolti rispetto alla directory del componente.<br/>• Percorsi `/` rispetto alla base del progetto.<br/>• `{{locale}}` abilita la generazione per locale.<br/>• Supporta la notazione ad oggetto per locale.
|
|
941
|
-
| `noMetadata` | Se `true`, il compilatore rimuove i metadati del dizionario (chiave, wrapper del contenuto) dall'output. | `boolean` | `false` | `false` → `{"key":"mia-chiave","content":{"key":"valore"}}` <br/> `true` → `{"key":"valore"}` | • Utile per formati i18next o output JSON ICU MessageFormat.<br/>• Funziona bene con il plugin `loadJSON`.
|
|
942
|
-
| `dictionaryKeyPrefix` | Prefisso della chiave del dizionario | `string` | `''` | | Aggiungi un prefisso opzionale alle chiavi del dizionario estratto
|
|
938
|
+
| Campo | Descrizione | Tipo | Predefinito | Esempio | Commenti |
|
|
939
|
+
| --------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------- | ----------- | -------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
|
|
940
|
+
| `enabled` | Indica se il compilatore debba essere attivo per raccogliere i dizionari. | `boolean` | <br/> `'build-only'` | `true` | `'build-only'` | `'build-only'` salta il compilatore durante lo sviluppo per build più veloci; viene eseguito solo durante i comandi di build. |
|
|
941
|
+
| `dictionaryKeyPrefix` | Prefisso per le chiavi del dizionario raccolte. | `string` | `''` | `'mio-prefisso-'` | Anteposto alla chiave generata (basata sul nome del file) per evitare conflitti. |
|
|
942
|
+
| `saveComponents` | Indica se i componenti debbano essere salvati dopo essere stati trasformati. | `boolean` | `false` | | • Se impostato su `true`, il compilatore riscriverà il file del componente sul disco. La trasformazione sarà permanente e il compilatore potrà essere rimosso.<br/>• Se impostato su `false`, il compilatore inietterà la chiamata alla funzione `useIntlayer()` nel codice solo nell'output della build, mantenendo intatta la base di codice originale. |
|
|
943
|
+
| `output` | Determina il percorso del file di output. Sostituisce `outputDir`. Supporta variabili template: `{{fileName}}`, <br/> `{{key}}`, <br/> `{{locale}}`, <br/> `{{extension}}`, <br/> `{{componentFileName}}`, <br/> `{{componentExtension}}`, <br/> `{{format}}`, <br/> `{{componentFormat}}`, <br/> `{{componentDirPath}}`. | `boolean` | <br/> `FilePathPattern` | <br/> `Partial<Record<Locale, boolean | FilePathPattern>>` | `undefined` | `'./{{fileName}}{{extension}}'` <br/> `'/locales/{{locale}}/{{key}}.json'` <br/> `{ en: ({ key }) => './locales/en/${key}.json', fr: '...', es: false }` | • Percorsi `./` risolti rispetto alla directory del componente.<br/>• Percorsi `/` rispetto alla base del progetto.<br/>• `{{locale}}` abilita la generazione per locale.<br/>• Supporta la notazione ad oggetto per locale. |
|
|
944
|
+
| `noMetadata` | Se `true`, il compilatore rimuove i metadati del dizionario (chiave, wrapper del contenuto) dall'output. | `boolean` | `false` | `false` → `{"key":"mia-chiave","content":{"key":"valore"}}` <br/> `true` → `{"key":"valore"}` | • Utile per formati i18next o output JSON ICU MessageFormat.<br/>• Funziona bene con il plugin `loadJSON`. |
|
|
945
|
+
| `dictionaryKeyPrefix` | Prefisso della chiave del dizionario | `string` | `''` | | Aggiungi un prefisso opzionale alle chiavi del dizionario estratto |
|
|
943
946
|
|
|
944
947
|
---
|
|
945
948
|
|
|
@@ -21,6 +21,9 @@ slugs:
|
|
|
21
21
|
- content
|
|
22
22
|
- html
|
|
23
23
|
history:
|
|
24
|
+
- version: 8.5.0
|
|
25
|
+
date: 2026-03-24
|
|
26
|
+
changes: "Add `intlayerHTML` plugin object; use `app.use(intlayerHTML)` instead of `app.use(installIntlayerHTML)`"
|
|
24
27
|
- version: 8.5.0
|
|
25
28
|
date: 2026-03-24
|
|
26
29
|
changes: "spostare l'importazione da {{framework}}-intlayer a {{framework}}-intlayer/html"
|
|
@@ -284,14 +287,14 @@ Puoi configurare il rendering HTML a livello globale per l'intera applicazione.
|
|
|
284
287
|
|
|
285
288
|
```typescript fileName="main.ts"
|
|
286
289
|
import { createApp, h } from "vue";
|
|
287
|
-
import {
|
|
288
|
-
import {
|
|
290
|
+
import { intlayer } from "vue-intlayer";
|
|
291
|
+
import { intlayerHTML } from "vue-intlayer/html";
|
|
289
292
|
import App from "./App.vue";
|
|
290
293
|
|
|
291
294
|
const app = createApp(App);
|
|
292
295
|
|
|
293
|
-
app.use(
|
|
294
|
-
app.use(
|
|
296
|
+
app.use(intlayer);
|
|
297
|
+
app.use(intlayerHTML, {
|
|
295
298
|
components: {
|
|
296
299
|
p: (props, { slots }) => h("p", { class: "prose", ...props }, slots.default?.()),
|
|
297
300
|
CustomLink: (props, { slots }) => h("a", { href: "/details", ...props }, slots.default?.()),
|
|
@@ -305,14 +308,14 @@ Puoi configurare il rendering HTML a livello globale per l'intera applicazione.
|
|
|
305
308
|
|
|
306
309
|
```typescript fileName="main.ts"
|
|
307
310
|
import { createApp, h } from "vue";
|
|
308
|
-
import {
|
|
309
|
-
import {
|
|
311
|
+
import { intlayer } from "vue-intlayer";
|
|
312
|
+
import { intlayerHTML } from "vue-intlayer/html";
|
|
310
313
|
import App from "./App.vue";
|
|
311
314
|
|
|
312
315
|
const app = createApp(App);
|
|
313
316
|
|
|
314
|
-
app.use(
|
|
315
|
-
app.use(
|
|
317
|
+
app.use(intlayer);
|
|
318
|
+
app.use(intlayerHTML, {
|
|
316
319
|
renderHTML: async (html) => {
|
|
317
320
|
const { renderHTML } = await import('vue-intlayer/html');
|
|
318
321
|
return renderHTML(html);
|
|
@@ -17,6 +17,9 @@ slugs:
|
|
|
17
17
|
- content
|
|
18
18
|
- markdown
|
|
19
19
|
history:
|
|
20
|
+
- version: 8.5.0
|
|
21
|
+
date: 2026-03-24
|
|
22
|
+
changes: "Add `intlayerMarkdown` plugin object; use `app.use(intlayerMarkdown)` instead of `app.use(installIntlayerMarkdown)`"
|
|
20
23
|
- version: 8.5.0
|
|
21
24
|
date: 2026-03-24
|
|
22
25
|
changes: "spostare l'importazione da {{framework}}-intlayer a {{framework}}-intlayer/markdown"
|
|
@@ -35,7 +38,7 @@ history:
|
|
|
35
38
|
|
|
36
39
|
Intlayer supporta contenuti rich text definiti utilizzando la sintassi Markdown. Questo ti consente di scrivere e mantenere facilmente contenuti con formattazione ricca, come blog, articoli e altro.
|
|
37
40
|
|
|
38
|
-
##
|
|
41
|
+
## Dichiarare contenuti Markdown
|
|
39
42
|
|
|
40
43
|
Puoi dichiarare contenuti Markdown usando la funzione `md` o semplicemente come stringa (se contiene sintassi Markdown).
|
|
41
44
|
|
|
@@ -94,7 +97,7 @@ Puoi dichiarare contenuti Markdown usando la funzione `md` o semplicemente come
|
|
|
94
97
|
|
|
95
98
|
---
|
|
96
99
|
|
|
97
|
-
##
|
|
100
|
+
## Rendering di Markdown
|
|
98
101
|
|
|
99
102
|
Il rendering può essere gestito automaticamente dal sistema di contenuti di Intlayer o manualmente utilizzando strumenti specializzati.
|
|
100
103
|
|
|
@@ -391,8 +394,6 @@ Puoi configurare il rendering Markdown a livello globale per l'intera applicazio
|
|
|
391
394
|
|
|
392
395
|
export const AppProvider = ({ children }) => (
|
|
393
396
|
<MarkdownProvider
|
|
394
|
-
forceBlock={true}
|
|
395
|
-
tagfilter={true}
|
|
396
397
|
components={{
|
|
397
398
|
h1: ({ children }) => <h1 className="text-2xl font-bold">{children}</h1>,
|
|
398
399
|
a: ({ href, children }) => <Link to={href}>{children}</Link>,
|
|
@@ -427,21 +428,20 @@ Puoi configurare il rendering Markdown a livello globale per l'intera applicazio
|
|
|
427
428
|
|
|
428
429
|
```typescript fileName="main.ts"
|
|
429
430
|
import { createApp } from "vue";
|
|
430
|
-
import {
|
|
431
|
-
import {
|
|
431
|
+
import { intlayer } from "vue-intlayer";
|
|
432
|
+
import { intlayerMarkdown } from "vue-intlayer/markdown";
|
|
432
433
|
import App from "./App.vue";
|
|
433
434
|
|
|
434
435
|
const app = createApp(App);
|
|
435
436
|
|
|
436
|
-
app.use(
|
|
437
|
-
app.use(
|
|
438
|
-
forceBlock: true,
|
|
439
|
-
tagfilter: true,
|
|
437
|
+
app.use(intlayer);
|
|
438
|
+
app.use(intlayerMarkdown, {
|
|
440
439
|
components: {
|
|
441
|
-
h1:
|
|
442
|
-
|
|
443
|
-
|
|
444
|
-
|
|
440
|
+
h1: (props) =>
|
|
441
|
+
h('h1', { style: { color: 'orange' }, ...props }, props.children),
|
|
442
|
+
ComponentDemo: () => h('div', { style: { background: 'grey' } }, 'DEMO'),
|
|
443
|
+
bold: (props) => h('strong', props),
|
|
444
|
+
code: (props) => h('code', props),
|
|
445
445
|
},
|
|
446
446
|
});
|
|
447
447
|
|
|
@@ -452,14 +452,14 @@ Puoi configurare il rendering Markdown a livello globale per l'intera applicazio
|
|
|
452
452
|
|
|
453
453
|
```typescript fileName="main.ts"
|
|
454
454
|
import { createApp } from "vue";
|
|
455
|
-
import {
|
|
456
|
-
import {
|
|
455
|
+
import { intlayer } from "vue-intlayer";
|
|
456
|
+
import { intlayerMarkdown } from "vue-intlayer/markdown";
|
|
457
457
|
import App from "./App.vue";
|
|
458
458
|
|
|
459
459
|
const app = createApp(App);
|
|
460
460
|
|
|
461
|
-
app.use(
|
|
462
|
-
app.use(
|
|
461
|
+
app.use(intlayer);
|
|
462
|
+
app.use(intlayerMarkdown, {
|
|
463
463
|
renderMarkdown: async (md) => {
|
|
464
464
|
const { compileMarkdown } = await import('vue-intlayer/markdown');
|
|
465
465
|
return compileMarkdown(md);
|
|
@@ -481,8 +481,6 @@ Puoi configurare il rendering Markdown a livello globale per l'intera applicazio
|
|
|
481
481
|
</script>
|
|
482
482
|
|
|
483
483
|
<MarkdownProvider
|
|
484
|
-
forceBlock={true}
|
|
485
|
-
tagfilter={true}
|
|
486
484
|
components={{
|
|
487
485
|
h1: MyHeading,
|
|
488
486
|
}}
|
|
@@ -518,8 +516,6 @@ Puoi configurare il rendering Markdown a livello globale per l'intera applicazio
|
|
|
518
516
|
|
|
519
517
|
export const AppProvider = ({ children }) => (
|
|
520
518
|
<MarkdownProvider
|
|
521
|
-
forceBlock={true}
|
|
522
|
-
tagfilter={true}
|
|
523
519
|
components={{
|
|
524
520
|
h1: ({ children }) => <h1 className="text-2xl font-bold">{children}</h1>,
|
|
525
521
|
}}
|
|
@@ -556,8 +552,6 @@ Puoi configurare il rendering Markdown a livello globale per l'intera applicazio
|
|
|
556
552
|
|
|
557
553
|
export const AppProvider = (props) => (
|
|
558
554
|
<MarkdownProvider
|
|
559
|
-
forceBlock={true}
|
|
560
|
-
tagfilter={true}
|
|
561
555
|
components={{
|
|
562
556
|
h1: (props) => <h1 className="text-2xl font-bold">{props.children}</h1>,
|
|
563
557
|
}}
|
|
@@ -23,6 +23,14 @@ history:
|
|
|
23
23
|
|
|
24
24
|
# Traduci la tua app Analog (Angular) usando Intlayer | Internazionalizzazione (i18n)
|
|
25
25
|
|
|
26
|
+
<iframe
|
|
27
|
+
src="https://stackblitz.com/github/aymericzip/intlayer-analog-template?embed=1&ctl=1&file=intlayer.config.ts"
|
|
28
|
+
className="m-auto overflow-hidden rounded-lg border-0 max-md:size-full max-md:h-[700px] md:aspect-16/9 md:w-full"
|
|
29
|
+
title="Demo CodeSandbox - How to Internationalize your application using Intlayer"
|
|
30
|
+
sandbox="allow-forms allow-modals allow-popups allow-presentation allow-same-origin allow-scripts"
|
|
31
|
+
loading="lazy"
|
|
32
|
+
/>
|
|
33
|
+
|
|
26
34
|
## Sommario
|
|
27
35
|
|
|
28
36
|
<TOC/>
|
|
@@ -42,20 +50,6 @@ Con Intlayer, puoi:
|
|
|
42
50
|
|
|
43
51
|
## Guida Passo-Passo per Configurare Intlayer in un'Applicazione Analog
|
|
44
52
|
|
|
45
|
-
<Tabs defaultTab="code">
|
|
46
|
-
<Tab label="Code" value="code">
|
|
47
|
-
|
|
48
|
-
<iframe
|
|
49
|
-
src="https://stackblitz.com/github/aymericzip/intlayer/tree/main/examples/vite-analog-app?embed=1&ctl=1&file=intlayer.config.ts"
|
|
50
|
-
className="m-auto overflow-hidden rounded-lg border-0 max-md:size-full max-md:h-[700px] md:aspect-16/9 md:w-full"
|
|
51
|
-
title="Demo CodeSandbox - How to Internationalize your application using Intlayer"
|
|
52
|
-
sandbox="allow-forms allow-modals allow-popups allow-presentation allow-same-origin allow-scripts"
|
|
53
|
-
loading="lazy"
|
|
54
|
-
/>
|
|
55
|
-
|
|
56
|
-
</Tab>
|
|
57
|
-
</Tabs>
|
|
58
|
-
|
|
59
53
|
Vedi il [Template dell'Applicazione](https://github.com/aymericzip/intlayer-analog-template) su GitHub.
|
|
60
54
|
|
|
61
55
|
### Passaggio 1: Installa le Dipendenze
|
|
@@ -24,6 +24,14 @@ history:
|
|
|
24
24
|
|
|
25
25
|
# Traduci il tuo sito web Vite e Lit usando Intlayer | Internazionalizzazione (i18n)
|
|
26
26
|
|
|
27
|
+
<iframe
|
|
28
|
+
src="https://stackblitz.com/github/aymericzip/intlayer-vite-lit-template?embed=1&ctl=1&file=intlayer.config.ts"
|
|
29
|
+
className="m-auto overflow-hidden rounded-lg border-0 max-md:size-full max-md:h-[700px] md:aspect-16/9 md:w-full"
|
|
30
|
+
title="Demo CodeSandbox - How to Internationalize your application using Intlayer"
|
|
31
|
+
sandbox="allow-forms allow-modals allow-popups allow-presentation allow-same-origin allow-scripts"
|
|
32
|
+
loading="lazy"
|
|
33
|
+
/>
|
|
34
|
+
|
|
27
35
|
## Sommario
|
|
28
36
|
|
|
29
37
|
<TOC/>
|
|
@@ -640,63 +648,6 @@ const config: IntlayerConfig = {
|
|
|
640
648
|
export default config;
|
|
641
649
|
```
|
|
642
650
|
|
|
643
|
-
<Tabs>
|
|
644
|
-
<Tab value='Comando Extract'>
|
|
645
|
-
|
|
646
|
-
Esegui l'estrattore per trasformare i tuoi componenti ed estrarre il contenuto
|
|
647
|
-
|
|
648
|
-
```bash packageManager="npm"
|
|
649
|
-
npx intlayer extract
|
|
650
|
-
```
|
|
651
|
-
|
|
652
|
-
```bash packageManager="pnpm"
|
|
653
|
-
pnpm intlayer extract
|
|
654
|
-
```
|
|
655
|
-
|
|
656
|
-
```bash packageManager="yarn"
|
|
657
|
-
yarn intlayer extract
|
|
658
|
-
```
|
|
659
|
-
|
|
660
|
-
```bash packageManager="bun"
|
|
661
|
-
bunx intlayer extract
|
|
662
|
-
```
|
|
663
|
-
|
|
664
|
-
</Tab>
|
|
665
|
-
<Tab value='Compilatore Babel'>
|
|
666
|
-
|
|
667
|
-
Aggiorna il tuo `vite.config.ts` per includere il plugin `intlayerCompiler`:
|
|
668
|
-
|
|
669
|
-
```ts fileName="vite.config.ts"
|
|
670
|
-
import { defineConfig } from "vite";
|
|
671
|
-
import { intlayer, intlayerCompiler } from "vite-intlayer";
|
|
672
|
-
|
|
673
|
-
export default defineConfig({
|
|
674
|
-
plugins: [
|
|
675
|
-
intlayer(),
|
|
676
|
-
intlayerCompiler(), // Aggiunge il plugin del compilatore
|
|
677
|
-
],
|
|
678
|
-
});
|
|
679
|
-
```
|
|
680
|
-
|
|
681
|
-
```bash packageManager="npm"
|
|
682
|
-
npm run build # O npm run dev
|
|
683
|
-
```
|
|
684
|
-
|
|
685
|
-
```bash packageManager="pnpm"
|
|
686
|
-
pnpm run build # O pnpm run dev
|
|
687
|
-
```
|
|
688
|
-
|
|
689
|
-
```bash packageManager="yarn"
|
|
690
|
-
yarn build # O yarn dev
|
|
691
|
-
```
|
|
692
|
-
|
|
693
|
-
```bash packageManager="bun"
|
|
694
|
-
bun run build # O bun run dev
|
|
695
|
-
```
|
|
696
|
-
|
|
697
|
-
</Tab>
|
|
698
|
-
</Tabs>
|
|
699
|
-
|
|
700
651
|
### Configurare TypeScript
|
|
701
652
|
|
|
702
653
|
Assicurati che la tua configurazione TypeScript includa i tipi autogenerati.
|
|
@@ -447,14 +447,14 @@ Per utilizzare le funzionalità di internazionalizzazione di Intlayer in tutta l
|
|
|
447
447
|
|
|
448
448
|
```javascript fileName=main.js
|
|
449
449
|
import { createApp } from "vue";
|
|
450
|
-
import {
|
|
450
|
+
import { intlayer } from "vue-intlayer";
|
|
451
451
|
import App from "./App.vue";
|
|
452
452
|
import "./style.css";
|
|
453
453
|
|
|
454
454
|
const app = createApp(App);
|
|
455
455
|
|
|
456
456
|
// Inietta il provider al livello più alto
|
|
457
|
-
|
|
457
|
+
app.use(intlayer);
|
|
458
458
|
|
|
459
459
|
// Monta l'app
|
|
460
460
|
app.mount("#app");
|
|
@@ -1039,7 +1039,7 @@ import { installIntlayer, installIntlayerMarkdown } from "vue-intlayer";
|
|
|
1039
1039
|
|
|
1040
1040
|
const app = createApp(App);
|
|
1041
1041
|
|
|
1042
|
-
|
|
1042
|
+
app.use(intlayer);
|
|
1043
1043
|
|
|
1044
1044
|
const md = new MarkdownIt({
|
|
1045
1045
|
html: true, // consenti tag HTML
|