@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
|
@@ -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: "przeniesienie importu z {{framework}}-intlayer do {{framework}}-intlayer/html"
|
|
@@ -284,14 +287,14 @@ Możesz skonfigurować renderowanie HTML globalnie dla całej aplikacji. To idea
|
|
|
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 @@ Możesz skonfigurować renderowanie HTML globalnie dla całej aplikacji. To idea
|
|
|
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: "przeniesienie importu z {{framework}}-intlayer do {{framework}}-intlayer/markdown"
|
|
@@ -35,7 +38,7 @@ history:
|
|
|
35
38
|
|
|
36
39
|
Intlayer obsługuje zawartość tekstu sformatowanego zdefiniowaną za pomocą składni Markdown. Pozwala to na łatwe pisanie i utrzymywanie treści z bogatym formatowaniem, takich jak blogi, artykuły i inne.
|
|
37
40
|
|
|
38
|
-
##
|
|
41
|
+
## Deklarowanie treści Markdown
|
|
39
42
|
|
|
40
43
|
Możesz zadeklarować treść Markdown, używając funkcji `md` lub po prostu jako łańcuch znaków (jeśli zawiera składnię Markdown).
|
|
41
44
|
|
|
@@ -94,7 +97,7 @@ Możesz zadeklarować treść Markdown, używając funkcji `md` lub po prostu ja
|
|
|
94
97
|
|
|
95
98
|
---
|
|
96
99
|
|
|
97
|
-
##
|
|
100
|
+
## Renderowanie Markdown
|
|
98
101
|
|
|
99
102
|
Renderowaniem można zająć się automatycznie za pomocą systemu treści Intlayer lub ręcznie przy użyciu specjalistycznych narzędzi.
|
|
100
103
|
|
|
@@ -387,8 +390,6 @@ Możesz skonfigurować renderowanie Markdown globalnie dla całej aplikacji. To
|
|
|
387
390
|
|
|
388
391
|
export const AppProvider = ({ children }) => (
|
|
389
392
|
<MarkdownProvider
|
|
390
|
-
forceBlock={true}
|
|
391
|
-
tagfilter={true}
|
|
392
393
|
components={{
|
|
393
394
|
h1: ({ children }) => <h1 className="text-2xl font-bold">{children}</h1>,
|
|
394
395
|
a: ({ href, children }) => <Link to={href}>{children}</Link>,
|
|
@@ -423,21 +424,20 @@ Możesz skonfigurować renderowanie Markdown globalnie dla całej aplikacji. To
|
|
|
423
424
|
|
|
424
425
|
```typescript fileName="main.ts"
|
|
425
426
|
import { createApp } from "vue";
|
|
426
|
-
import {
|
|
427
|
-
import {
|
|
427
|
+
import { intlayer } from "vue-intlayer";
|
|
428
|
+
import { intlayerMarkdown } from "vue-intlayer/markdown";
|
|
428
429
|
import App from "./App.vue";
|
|
429
430
|
|
|
430
431
|
const app = createApp(App);
|
|
431
432
|
|
|
432
|
-
app.use(
|
|
433
|
-
app.use(
|
|
434
|
-
forceBlock: true,
|
|
435
|
-
tagfilter: true,
|
|
433
|
+
app.use(intlayer);
|
|
434
|
+
app.use(intlayerMarkdown, {
|
|
436
435
|
components: {
|
|
437
|
-
h1:
|
|
438
|
-
|
|
439
|
-
|
|
440
|
-
|
|
436
|
+
h1: (props) =>
|
|
437
|
+
h('h1', { style: { color: 'orange' }, ...props }, props.children),
|
|
438
|
+
ComponentDemo: () => h('div', { style: { background: 'grey' } }, 'DEMO'),
|
|
439
|
+
bold: (props) => h('strong', props),
|
|
440
|
+
code: (props) => h('code', props),
|
|
441
441
|
},
|
|
442
442
|
});
|
|
443
443
|
|
|
@@ -448,14 +448,14 @@ Możesz skonfigurować renderowanie Markdown globalnie dla całej aplikacji. To
|
|
|
448
448
|
|
|
449
449
|
```typescript fileName="main.ts"
|
|
450
450
|
import { createApp } from "vue";
|
|
451
|
-
import {
|
|
452
|
-
import {
|
|
451
|
+
import { intlayer } from "vue-intlayer";
|
|
452
|
+
import { intlayerMarkdown } from "vue-intlayer/markdown";
|
|
453
453
|
import App from "./App.vue";
|
|
454
454
|
|
|
455
455
|
const app = createApp(App);
|
|
456
456
|
|
|
457
|
-
app.use(
|
|
458
|
-
app.use(
|
|
457
|
+
app.use(intlayer);
|
|
458
|
+
app.use(intlayerMarkdown, {
|
|
459
459
|
renderMarkdown: async (md) => {
|
|
460
460
|
const { compileMarkdown } = await import('vue-intlayer/markdown');
|
|
461
461
|
return compileMarkdown(md);
|
|
@@ -477,8 +477,6 @@ Możesz skonfigurować renderowanie Markdown globalnie dla całej aplikacji. To
|
|
|
477
477
|
</script>
|
|
478
478
|
|
|
479
479
|
<MarkdownProvider
|
|
480
|
-
forceBlock={true}
|
|
481
|
-
tagfilter={true}
|
|
482
480
|
components={{
|
|
483
481
|
h1: MyHeading,
|
|
484
482
|
}}
|
|
@@ -514,8 +512,6 @@ Możesz skonfigurować renderowanie Markdown globalnie dla całej aplikacji. To
|
|
|
514
512
|
|
|
515
513
|
export const AppProvider = ({ children }) => (
|
|
516
514
|
<MarkdownProvider
|
|
517
|
-
forceBlock={true}
|
|
518
|
-
tagfilter={true}
|
|
519
515
|
components={{
|
|
520
516
|
h1: ({ children }) => <h1 className="text-2xl font-bold">{children}</h1>,
|
|
521
517
|
}}
|
|
@@ -552,8 +548,6 @@ Możesz skonfigurować renderowanie Markdown globalnie dla całej aplikacji. To
|
|
|
552
548
|
|
|
553
549
|
export const AppProvider = (props) => (
|
|
554
550
|
<MarkdownProvider
|
|
555
|
-
forceBlock={true}
|
|
556
|
-
tagfilter={true}
|
|
557
551
|
components={{
|
|
558
552
|
h1: (props) => <h1 className="text-2xl font-bold">{props.children}</h1>,
|
|
559
553
|
}}
|
|
@@ -23,6 +23,14 @@ history:
|
|
|
23
23
|
|
|
24
24
|
# Przetłumacz swoją aplikację Analog (Angular) za pomocą Intlayer | Internacjonalizacja (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
|
## Spis treści
|
|
27
35
|
|
|
28
36
|
<TOC/>
|
|
@@ -42,20 +50,6 @@ Z Intlayer możesz:
|
|
|
42
50
|
|
|
43
51
|
## Przewodnik krok po kroku, jak skonfigurować Intlayer w aplikacji Analog
|
|
44
52
|
|
|
45
|
-
<Tabs defaultTab="code">
|
|
46
|
-
<Tab label="Kod" 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 - Jak przeprowadzić internacjonalizację aplikacji za pomocą 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
|
Zobacz [Szablon aplikacji](https://github.com/aymericzip/intlayer-analog-template) na GitHubie.
|
|
60
54
|
|
|
61
55
|
### Krok 1: Instalacja zależności
|
|
@@ -24,6 +24,14 @@ history:
|
|
|
24
24
|
|
|
25
25
|
# Przetłumacz swoją stronę Vite i Lit za pomocą Intlayer | Internacjonalizacja (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
|
## Spis treści
|
|
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='Polecenie Extract'>
|
|
636
|
-
|
|
637
|
-
Uruchom ekstraktor, aby przekształcić komponenty i wyodrębnić treść
|
|
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='Kompilator Babel'>
|
|
657
|
-
|
|
658
|
-
Zaktualizuj swój `vite.config.ts`, aby dołączyć wtyczkę `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(), // Dodaje wtyczkę kompilatora
|
|
668
|
-
],
|
|
669
|
-
});
|
|
670
|
-
```
|
|
671
|
-
|
|
672
|
-
```bash packageManager="npm"
|
|
673
|
-
npm run build # Lub npm run dev
|
|
674
|
-
```
|
|
675
|
-
|
|
676
|
-
```bash packageManager="pnpm"
|
|
677
|
-
pnpm run build # Lub pnpm run dev
|
|
678
|
-
```
|
|
679
|
-
|
|
680
|
-
```bash packageManager="yarn"
|
|
681
|
-
yarn build # Lub yarn dev
|
|
682
|
-
```
|
|
683
|
-
|
|
684
|
-
```bash packageManager="bun"
|
|
685
|
-
bun run build # Lub bun run dev
|
|
686
|
-
```
|
|
687
|
-
|
|
688
|
-
</Tab>
|
|
689
|
-
</Tabs>
|
|
690
|
-
|
|
691
642
|
### Konfiguracja TypeScript
|
|
692
643
|
|
|
693
644
|
Upewnij się, że Twoja konfiguracja TypeScript zawiera automatycznie generowane typy.
|
|
@@ -454,14 +454,14 @@ Aby wykorzystać funkcje internacjonalizacji Intlayer w całej aplikacji Vue, na
|
|
|
454
454
|
|
|
455
455
|
```javascript fileName=main.js
|
|
456
456
|
import { createApp } from "vue";
|
|
457
|
-
import {
|
|
457
|
+
import { intlayer } from "vue-intlayer";
|
|
458
458
|
import App from "./App.vue";
|
|
459
459
|
import "./style.css";
|
|
460
460
|
|
|
461
461
|
const app = createApp(App);
|
|
462
462
|
|
|
463
463
|
// Wstrzyknij providera na najwyższym poziomie
|
|
464
|
-
|
|
464
|
+
app.use(intlayer);
|
|
465
465
|
|
|
466
466
|
// Zamontuj aplikację
|
|
467
467
|
app.mount("#app");
|
|
@@ -1036,7 +1036,7 @@ import { installIntlayer, installIntlayerMarkdown } from "vue-intlayer";
|
|
|
1036
1036
|
|
|
1037
1037
|
const app = createApp(App);
|
|
1038
1038
|
|
|
1039
|
-
|
|
1039
|
+
app.use(intlayer);
|
|
1040
1040
|
|
|
1041
1041
|
const md = new MarkdownIt({
|
|
1042
1042
|
html: true, // zezwól na tagi HTML
|
package/docs/pt/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 deve guardar as componentes após serem transformadas.
|
|
211
|
+
*
|
|
212
|
+
* - Se `true`, o compilador reescreverá o arquivo do componente no disco. Portanto, a transformação será permanente, e o compilador pulará a transformação para o próximo processo. Dessa forma, o compilador pode transformar o app, e então pode ser removido.
|
|
213
|
+
*
|
|
214
|
+
* - Se `false`, o compilador injetará a chamada da função `useIntlayer()` no código apenas na saída da build, e manterá a base de código original intacta. A transformação será feita apenas em memória.
|
|
212
215
|
*/
|
|
213
216
|
saveComponents: false,
|
|
214
217
|
|
|
@@ -287,6 +290,8 @@ As seguintes propriedades podem ser configuradas no bloco `compiler` do seu arqu
|
|
|
287
290
|
- _Tipo_: `boolean`
|
|
288
291
|
- _Padrão_: `false`
|
|
289
292
|
- _Descrição_: Indica se os componentes devem ser salvos após serem transformados.
|
|
293
|
+
- Se `true`, o compilador reescreverá o arquivo do componente no disco. A transformação será permanente, e o compilador poderá ser removido.
|
|
294
|
+
- Se `false`, o compilador injetará a chamada da função `useIntlayer()` no código apenas na saída da build, mantendo a base de código original intacta. A transformação será feita apenas em memória.
|
|
290
295
|
|
|
291
296
|
### Preencher traduções ausentes
|
|
292
297
|
|
package/docs/pt/configuration.md
CHANGED
|
@@ -518,7 +518,10 @@ const config: IntlayerConfig = {
|
|
|
518
518
|
|
|
519
519
|
/**
|
|
520
520
|
* Se deve guardar as componentes após serem transformadas.
|
|
521
|
-
*
|
|
521
|
+
*
|
|
522
|
+
* - Se `true`, o compilador reescreverá o arquivo do componente no disco. Portanto, a transformação será permanente, e o compilador pulará a transformação para o próximo processo. Dessa forma, o compilador pode transformar o app, e então pode ser removido.
|
|
523
|
+
*
|
|
524
|
+
* - Se `false`, o compilador injetará a chamada da função `useIntlayer()` no código apenas na saída da build, e manterá a base de código original intacta. A transformação será feita apenas em memória.
|
|
522
525
|
*/
|
|
523
526
|
saveComponents: false,
|
|
524
527
|
|
|
@@ -932,14 +935,13 @@ Estas definições são para casos de uso avançados e configuração interna do
|
|
|
932
935
|
|
|
933
936
|
Configurações que controlam o compilador do Intlayer, que extrai dicionários diretamente das suas componentes.
|
|
934
937
|
|
|
935
|
-
| Campo | Descrição | Tipo | Padrão | Exemplo | Nota
|
|
936
|
-
| --------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------- | ----------- | -------------------------------------------------------------------------------------------------------------------------------------------------------- |
|
|
937
|
-
| `enabled` | Indica se o compilador deve estar ativado para a extração de dicionários. | `boolean` | <br/> `'build-only'` | `true` | `'build-only'` | `'build-only'` ignora o compilador durante o desenvolvimento para acelerar as builds; executado apenas nos comandos de build.
|
|
938
|
-
| `dictionaryKeyPrefix` | Prefixo para as chaves de dicionário extraídas. | `string` | `''` | `'meu-prefixo-'` | Adicionado à chave gerada (baseada no nome do ficheiro) para evitar conflitos.
|
|
939
|
-
| `saveComponents` |
|
|
940
|
-
| `output` | Define o caminho para os ficheiros de saída. Substitui `outputDir`. Suporta variáveis de 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 }` | • Caminhos `./` são resolvidos em relação ao diretório da componente.<br/>• Caminhos `/` em relação à raiz.<br/>• `{{locale}}` ativa a geração por idioma.<br/>• Suporta notação de objeto por idioma.
|
|
941
|
-
| `noMetadata` | Se `true`, o compilador omite os metadados do dicionário (chave, wrapper de conteúdo) da saída. | `boolean` | `false` | `false` → `{"key":"minha-chave","content":{"key":"valor"}}` <br/> `true` → `{"key":"valor"}` | • Útil para saídas i18next ou ICU MessageFormat JSON.<br/>• Funciona bem com o plugin `loadJSON`.
|
|
942
|
-
| `dictionaryKeyPrefix` | Prefixo da chave do dicionário | `string` | `''` | | Adicionar prefixo opcional para as chaves de dicionário extraídas |
|
|
938
|
+
| Campo | Descrição | Tipo | Padrão | Exemplo | Nota |
|
|
939
|
+
| --------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------- | ----------- | -------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
|
|
940
|
+
| `enabled` | Indica se o compilador deve estar ativado para a extração de dicionários. | `boolean` | <br/> `'build-only'` | `true` | `'build-only'` | `'build-only'` ignora o compilador durante o desenvolvimento para acelerar as builds; executado apenas nos comandos de build. |
|
|
941
|
+
| `dictionaryKeyPrefix` | Prefixo para as chaves de dicionário extraídas. | `string` | `''` | `'meu-prefixo-'` | Adicionado à chave gerada (baseada no nome do ficheiro) para evitar conflitos. |
|
|
942
|
+
| `saveComponents` | Indica se os componentes devem ser salvos após serem transformados. | `boolean` | `false` | | • Se `true`, o compilador reescreverá o arquivo do componente no disco. A transformação será permanente, e o compilador poderá ser removido.<br/>• Se `false`, o compilador injetará a chamada da função `useIntlayer()` no código apenas na saída da build, mantendo a base de código original intacta. |
|
|
943
|
+
| `output` | Define o caminho para os ficheiros de saída. Substitui `outputDir`. Suporta variáveis de 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 }` | • Caminhos `./` são resolvidos em relação ao diretório da componente.<br/>• Caminhos `/` em relação à raiz.<br/>• `{{locale}}` ativa a geração por idioma.<br/>• Suporta notação de objeto por idioma. |
|
|
944
|
+
| `noMetadata` | Se `true`, o compilador omite os metadados do dicionário (chave, wrapper de conteúdo) da saída. | `boolean` | `false` | `false` → `{"key":"minha-chave","content":{"key":"valor"}}` <br/> `true` → `{"key":"valor"}` | • Útil para saídas i18next ou ICU MessageFormat JSON.<br/>• Funciona bem com o plugin `loadJSON`. |
|
|
943
945
|
|
|
944
946
|
---
|
|
945
947
|
|
|
@@ -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: "mover a importação de {{framework}}-intlayer para {{framework}}-intlayer/html"
|
|
@@ -284,14 +287,14 @@ Você pode configurar a renderização de HTML globalmente para toda a sua aplic
|
|
|
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 @@ Você pode configurar a renderização de HTML globalmente para toda a sua aplic
|
|
|
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: "mover a importação de {{framework}}-intlayer para {{framework}}-intlayer/markdown"
|
|
@@ -35,7 +38,7 @@ history:
|
|
|
35
38
|
|
|
36
39
|
O Intlayer suporta conteúdo de texto rico definido usando a sintaxe Markdown. Isso permite que você escreva e mantenha facilmente conteúdos com formatação rica, como blogs, artigos e muito mais.
|
|
37
40
|
|
|
38
|
-
##
|
|
41
|
+
## Declarando Conteúdo Markdown
|
|
39
42
|
|
|
40
43
|
Você pode declarar conteúdo Markdown usando a função `md` ou simplesmente como uma string (se contiver sintaxe Markdown).
|
|
41
44
|
|
|
@@ -94,7 +97,7 @@ Você pode declarar conteúdo Markdown usando a função `md` ou simplesmente co
|
|
|
94
97
|
|
|
95
98
|
---
|
|
96
99
|
|
|
97
|
-
##
|
|
100
|
+
## Renderização de Markdown
|
|
98
101
|
|
|
99
102
|
A renderização pode ser feita automaticamente pelo sistema de conteúdo do Intlayer ou manualmente usando ferramentas especializadas.
|
|
100
103
|
|
|
@@ -387,8 +390,6 @@ Você pode configurar a renderização de Markdown globalmente para toda a sua a
|
|
|
387
390
|
|
|
388
391
|
export const AppProvider = ({ children }) => (
|
|
389
392
|
<MarkdownProvider
|
|
390
|
-
forceBlock={true}
|
|
391
|
-
tagfilter={true}
|
|
392
393
|
components={{
|
|
393
394
|
h1: ({ children }) => <h1 className="text-2xl font-bold">{children}</h1>,
|
|
394
395
|
a: ({ href, children }) => <Link to={href}>{children}</Link>,
|
|
@@ -423,21 +424,20 @@ Você pode configurar a renderização de Markdown globalmente para toda a sua a
|
|
|
423
424
|
|
|
424
425
|
```typescript fileName="main.ts"
|
|
425
426
|
import { createApp } from "vue";
|
|
426
|
-
import {
|
|
427
|
-
import {
|
|
427
|
+
import { intlayer } from "vue-intlayer";
|
|
428
|
+
import { intlayerMarkdown } from "vue-intlayer/markdown";
|
|
428
429
|
import App from "./App.vue";
|
|
429
430
|
|
|
430
431
|
const app = createApp(App);
|
|
431
432
|
|
|
432
|
-
app.use(
|
|
433
|
-
app.use(
|
|
434
|
-
forceBlock: true,
|
|
435
|
-
tagfilter: true,
|
|
433
|
+
app.use(intlayer);
|
|
434
|
+
app.use(intlayerMarkdown, {
|
|
436
435
|
components: {
|
|
437
|
-
h1:
|
|
438
|
-
|
|
439
|
-
|
|
440
|
-
|
|
436
|
+
h1: (props) =>
|
|
437
|
+
h('h1', { style: { color: 'orange' }, ...props }, props.children),
|
|
438
|
+
ComponentDemo: () => h('div', { style: { background: 'grey' } }, 'DEMO'),
|
|
439
|
+
bold: (props) => h('strong', props),
|
|
440
|
+
code: (props) => h('code', props),
|
|
441
441
|
},
|
|
442
442
|
});
|
|
443
443
|
|
|
@@ -448,14 +448,14 @@ Você pode configurar a renderização de Markdown globalmente para toda a sua a
|
|
|
448
448
|
|
|
449
449
|
```typescript fileName="main.ts"
|
|
450
450
|
import { createApp } from "vue";
|
|
451
|
-
import {
|
|
452
|
-
import {
|
|
451
|
+
import { intlayer } from "vue-intlayer";
|
|
452
|
+
import { intlayerMarkdown } from "vue-intlayer/markdown";
|
|
453
453
|
import App from "./App.vue";
|
|
454
454
|
|
|
455
455
|
const app = createApp(App);
|
|
456
456
|
|
|
457
|
-
app.use(
|
|
458
|
-
app.use(
|
|
457
|
+
app.use(intlayer);
|
|
458
|
+
app.use(intlayerMarkdown, {
|
|
459
459
|
renderMarkdown: async (md) => {
|
|
460
460
|
const { compileMarkdown } = await import('vue-intlayer/markdown');
|
|
461
461
|
return compileMarkdown(md);
|
|
@@ -477,8 +477,6 @@ Você pode configurar a renderização de Markdown globalmente para toda a sua a
|
|
|
477
477
|
</script>
|
|
478
478
|
|
|
479
479
|
<MarkdownProvider
|
|
480
|
-
forceBlock={true}
|
|
481
|
-
tagfilter={true}
|
|
482
480
|
components={{
|
|
483
481
|
h1: MyHeading,
|
|
484
482
|
}}
|
|
@@ -514,8 +512,6 @@ Você pode configurar a renderização de Markdown globalmente para toda a sua a
|
|
|
514
512
|
|
|
515
513
|
export const AppProvider = ({ children }) => (
|
|
516
514
|
<MarkdownProvider
|
|
517
|
-
forceBlock={true}
|
|
518
|
-
tagfilter={true}
|
|
519
515
|
components={{
|
|
520
516
|
h1: ({ children }) => <h1 className="text-2xl font-bold">{children}</h1>,
|
|
521
517
|
}}
|
|
@@ -552,8 +548,6 @@ Você pode configurar a renderização de Markdown globalmente para toda a sua a
|
|
|
552
548
|
|
|
553
549
|
export const AppProvider = (props) => (
|
|
554
550
|
<MarkdownProvider
|
|
555
|
-
forceBlock={true}
|
|
556
|
-
tagfilter={true}
|
|
557
551
|
components={{
|
|
558
552
|
h1: (props) => <h1 className="text-2xl font-bold">{props.children}</h1>,
|
|
559
553
|
}}
|
|
@@ -23,6 +23,14 @@ history:
|
|
|
23
23
|
|
|
24
24
|
# Traduza sua aplicação Analog (Angular) usando Intlayer | Internacionalização (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
|
## Sumário
|
|
27
35
|
|
|
28
36
|
<TOC/>
|
|
@@ -42,20 +50,6 @@ Com o Intlayer, você pode:
|
|
|
42
50
|
|
|
43
51
|
## Guia Passo a Passo para Configurar o Intlayer em uma Aplicação Analog
|
|
44
52
|
|
|
45
|
-
<Tabs defaultTab="code">
|
|
46
|
-
<Tab label="Código" 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 - Como Internacionalizar sua aplicação usando 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
|
Veja o [Modelo de Aplicação](https://github.com/aymericzip/intlayer-analog-template) no GitHub.
|
|
60
54
|
|
|
61
55
|
### Passo 1: Instalar Dependências
|
|
@@ -24,6 +24,14 @@ history:
|
|
|
24
24
|
|
|
25
25
|
# Traduza o seu website Vite e Lit usando Intlayer | Internacionalização (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
|
## Tabela de Conteúdos
|
|
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
|
-
Execute o extrator para transformar os seus componentes e extrair o conteúdo
|
|
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='Compilador Babel'>
|
|
666
|
-
|
|
667
|
-
Atualize o seu `vite.config.ts` para incluir o 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(), // Adiciona o plugin do compilador
|
|
677
|
-
],
|
|
678
|
-
});
|
|
679
|
-
```
|
|
680
|
-
|
|
681
|
-
```bash packageManager="npm"
|
|
682
|
-
npm run build # Ou npm run dev
|
|
683
|
-
```
|
|
684
|
-
|
|
685
|
-
```bash packageManager="pnpm"
|
|
686
|
-
pnpm run build # Ou pnpm run dev
|
|
687
|
-
```
|
|
688
|
-
|
|
689
|
-
```bash packageManager="yarn"
|
|
690
|
-
yarn build # Ou yarn dev
|
|
691
|
-
```
|
|
692
|
-
|
|
693
|
-
```bash packageManager="bun"
|
|
694
|
-
bun run build # Ou bun run dev
|
|
695
|
-
```
|
|
696
|
-
|
|
697
|
-
</Tab>
|
|
698
|
-
</Tabs>
|
|
699
|
-
|
|
700
651
|
### Configurar TypeScript
|
|
701
652
|
|
|
702
653
|
Certifique-se de que a sua configuração TypeScript inclui os tipos autogerados.
|