@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
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
---
|
|
2
2
|
createdAt: 2025-04-18
|
|
3
|
-
updatedAt:
|
|
3
|
+
updatedAt: 2026-03-12
|
|
4
4
|
title: Vite + Solid i18n - Jak przetłumaczyć aplikację Solid w 2026
|
|
5
5
|
description: Dowiedz się, jak uczynić swoją stronę Vite i Solid wielojęzyczną. Postępuj zgodnie z dokumentacją, aby internacjonalizować (i18n) i tłumaczyć ją.
|
|
6
6
|
keywords:
|
|
@@ -577,6 +577,162 @@ Aby uzyskać więcej szczegółów na temat korzystania z rozszerzenia, zapoznaj
|
|
|
577
577
|
|
|
578
578
|
---
|
|
579
579
|
|
|
580
|
+
### (Opcjonalnie) Krok 12 : Wyodrębnij zawartość swoich komponentów
|
|
581
|
+
|
|
582
|
+
Jeśli masz istniejącą bazę kodu, transformacja tysięcy plików może być czasochłonna.
|
|
583
|
+
|
|
584
|
+
Aby ułatwić ten proces, Intlayer proponuje [kompilator](https://github.com/aymericzip/intlayer/blob/main/docs/docs/pl/compiler.md) / [ekstraktor](https://github.com/aymericzip/intlayer/blob/main/docs/docs/pl/cli/extract.md), aby przetransformować komponenty i wyodrębnić zawartość.
|
|
585
|
+
|
|
586
|
+
Aby go skonfigurować, możesz dodać sekcję `compiler` w pliku `intlayer.config.ts`:
|
|
587
|
+
|
|
588
|
+
```typescript fileName="intlayer.config.ts" codeFormat="typescript"
|
|
589
|
+
import { type IntlayerConfig } from "intlayer";
|
|
590
|
+
|
|
591
|
+
const config: IntlayerConfig = {
|
|
592
|
+
// ... Reszta Twojej konfiguracji
|
|
593
|
+
compiler: {
|
|
594
|
+
/**
|
|
595
|
+
* Wskazuje, czy kompilator powinien być włączony.
|
|
596
|
+
*/
|
|
597
|
+
enabled: true,
|
|
598
|
+
|
|
599
|
+
/**
|
|
600
|
+
* Definiuje ścieżkę plików wyjściowych
|
|
601
|
+
*/
|
|
602
|
+
output: ({ fileName, extension }) => `./${fileName}${extension}`,
|
|
603
|
+
|
|
604
|
+
/**
|
|
605
|
+
* Wskazuje, czy komponenty powinny zostać zapisane po transformacji. W ten sposób kompilator można uruchomić tylko raz, aby przetransformować aplikację, a następnie go usunąć.
|
|
606
|
+
*/
|
|
607
|
+
saveComponents: false,
|
|
608
|
+
|
|
609
|
+
/**
|
|
610
|
+
* Prefiks klucza słownika
|
|
611
|
+
*/
|
|
612
|
+
dictionaryKeyPrefix: "",
|
|
613
|
+
},
|
|
614
|
+
};
|
|
615
|
+
|
|
616
|
+
export default config;
|
|
617
|
+
```
|
|
618
|
+
|
|
619
|
+
```javascript fileName="intlayer.config.mjs" codeFormat="esm"
|
|
620
|
+
/** @type {import('intlayer').IntlayerConfig} */
|
|
621
|
+
const config = {
|
|
622
|
+
// ... Reszta Twojej konfiguracji
|
|
623
|
+
compiler: {
|
|
624
|
+
/**
|
|
625
|
+
* Wskazuje, czy kompilator powinien być włączony.
|
|
626
|
+
*/
|
|
627
|
+
enabled: true,
|
|
628
|
+
|
|
629
|
+
/**
|
|
630
|
+
* Definiuje ścieżkę plików wyjściowych
|
|
631
|
+
*/
|
|
632
|
+
output: ({ fileName, extension }) => `./${fileName}${extension}`,
|
|
633
|
+
|
|
634
|
+
/**
|
|
635
|
+
* Wskazuje, czy komponenty powinny zostać zapisane po transformacji. W ten sposób kompilator można uruchomić tylko raz, aby przetransformować aplikację, a następnie go usunąć.
|
|
636
|
+
*/
|
|
637
|
+
saveComponents: false,
|
|
638
|
+
|
|
639
|
+
/**
|
|
640
|
+
* Prefiks klucza słownika
|
|
641
|
+
*/
|
|
642
|
+
dictionaryKeyPrefix: "",
|
|
643
|
+
},
|
|
644
|
+
};
|
|
645
|
+
|
|
646
|
+
export default config;
|
|
647
|
+
```
|
|
648
|
+
|
|
649
|
+
```javascript fileName="intlayer.config.cjs" codeFormat="commonjs"
|
|
650
|
+
/** @type {import('intlayer').IntlayerConfig} */
|
|
651
|
+
const config = {
|
|
652
|
+
// ... Reszta Twojej konfiguracji
|
|
653
|
+
compiler: {
|
|
654
|
+
/**
|
|
655
|
+
* Wskazuje, czy kompilator powinien być włączony.
|
|
656
|
+
*/
|
|
657
|
+
enabled: true,
|
|
658
|
+
|
|
659
|
+
/**
|
|
660
|
+
* Definiuje ścieżkę plików wyjściowych
|
|
661
|
+
*/
|
|
662
|
+
output: ({ fileName, extension }) => `./${fileName}${extension}`,
|
|
663
|
+
|
|
664
|
+
/**
|
|
665
|
+
* Wskazuje, czy komponenty powinny zostać zapisane po transformacji. W ten sposób kompilator można uruchomić tylko raz, aby przetransformować aplikację, a następnie go usunąć.
|
|
666
|
+
*/
|
|
667
|
+
saveComponents: false,
|
|
668
|
+
|
|
669
|
+
/**
|
|
670
|
+
* Prefiks klucza słownika
|
|
671
|
+
*/
|
|
672
|
+
dictionaryKeyPrefix: "",
|
|
673
|
+
},
|
|
674
|
+
};
|
|
675
|
+
|
|
676
|
+
module.exports = config;
|
|
677
|
+
```
|
|
678
|
+
|
|
679
|
+
<Tabs>
|
|
680
|
+
<Tab value='Polecenie wyodrębniania'>
|
|
681
|
+
|
|
682
|
+
Uruchom ekstraktor, aby przetransformować komponenty i wyodrębnić zawartość
|
|
683
|
+
|
|
684
|
+
```bash packageManager="npm"
|
|
685
|
+
npx intlayer extract
|
|
686
|
+
```
|
|
687
|
+
|
|
688
|
+
```bash packageManager="pnpm"
|
|
689
|
+
pnpm intlayer extract
|
|
690
|
+
```
|
|
691
|
+
|
|
692
|
+
```bash packageManager="yarn"
|
|
693
|
+
yarn intlayer extract
|
|
694
|
+
```
|
|
695
|
+
|
|
696
|
+
```bash packageManager="bun"
|
|
697
|
+
bunx intlayer extract
|
|
698
|
+
```
|
|
699
|
+
|
|
700
|
+
</Tab>
|
|
701
|
+
<Tab value='Kompilator Babel'>
|
|
702
|
+
|
|
703
|
+
Zaktualizuj `vite.config.ts`, aby dołączyć wtyczkę `intlayerCompiler`:
|
|
704
|
+
|
|
705
|
+
```ts fileName="vite.config.ts"
|
|
706
|
+
import { defineConfig } from "vite";
|
|
707
|
+
import { intlayer, intlayerCompiler } from "vite-intlayer";
|
|
708
|
+
|
|
709
|
+
export default defineConfig({
|
|
710
|
+
plugins: [
|
|
711
|
+
intlayer(),
|
|
712
|
+
intlayerCompiler(), // Dodaje wtyczkę kompilatora
|
|
713
|
+
],
|
|
714
|
+
});
|
|
715
|
+
```
|
|
716
|
+
|
|
717
|
+
```bash packageManager="npm"
|
|
718
|
+
npm run build # Lub npm run dev
|
|
719
|
+
```
|
|
720
|
+
|
|
721
|
+
```bash packageManager="pnpm"
|
|
722
|
+
pnpm run build # Or pnpm run dev
|
|
723
|
+
```
|
|
724
|
+
|
|
725
|
+
```bash packageManager="yarn"
|
|
726
|
+
yarn build # Or yarn dev
|
|
727
|
+
```
|
|
728
|
+
|
|
729
|
+
```bash packageManager="bun"
|
|
730
|
+
bun run build # Or bun run dev
|
|
731
|
+
```
|
|
732
|
+
|
|
733
|
+
</Tab>
|
|
734
|
+
</Tabs>
|
|
735
|
+
|
|
580
736
|
### Idź dalej
|
|
581
737
|
|
|
582
738
|
Aby pójść dalej, możesz zaimplementować [edytor wizualny](https://github.com/aymericzip/intlayer/blob/main/docs/docs/pl/intlayer_visual_editor.md) lub wyeksportować swoją zawartość, korzystając z [CMS](https://github.com/aymericzip/intlayer/blob/main/docs/docs/pl/intlayer_CMS.md).
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
---
|
|
2
2
|
createdAt: 2025-04-18
|
|
3
|
-
updatedAt:
|
|
3
|
+
updatedAt: 2026-03-12
|
|
4
4
|
title: Vite + Svelte i18n - Jak przetłumaczyć aplikację Svelte w 2026
|
|
5
5
|
description: Dowiedz się, jak uczynić swoją stronę Vite i Svelte wielojęzyczną. Postępuj zgodnie z dokumentacją, aby zrealizować internacjonalizację (i18n) i tłumaczenie.
|
|
6
6
|
keywords:
|
|
@@ -495,6 +495,162 @@ Aby uzyskać więcej informacji na temat korzystania z rozszerzenia, zapoznaj si
|
|
|
495
495
|
|
|
496
496
|
---
|
|
497
497
|
|
|
498
|
+
### (Opcjonalnie) Krok 9 : Wyodrębnij zawartość swoich komponentów
|
|
499
|
+
|
|
500
|
+
Jeśli masz istniejącą bazę kodu, transformacja tysięcy plików może być czasochłonna.
|
|
501
|
+
|
|
502
|
+
Aby ułatwić ten proces, Intlayer proponuje [kompilator](https://github.com/aymericzip/intlayer/blob/main/docs/docs/pl/compiler.md) / [ekstraktor](https://github.com/aymericzip/intlayer/blob/main/docs/docs/pl/cli/extract.md), aby przetransformować komponenty i wyodrębnić zawartość.
|
|
503
|
+
|
|
504
|
+
Aby go skonfigurować, możesz dodać sekcję `compiler` w pliku `intlayer.config.ts`:
|
|
505
|
+
|
|
506
|
+
```typescript fileName="intlayer.config.ts" codeFormat="typescript"
|
|
507
|
+
import { type IntlayerConfig } from "intlayer";
|
|
508
|
+
|
|
509
|
+
const config: IntlayerConfig = {
|
|
510
|
+
// ... Reszta Twojej konfiguracji
|
|
511
|
+
compiler: {
|
|
512
|
+
/**
|
|
513
|
+
* Wskazuje, czy kompilator powinien być włączony.
|
|
514
|
+
*/
|
|
515
|
+
enabled: true,
|
|
516
|
+
|
|
517
|
+
/**
|
|
518
|
+
* Definiuje ścieżkę plików wyjściowych
|
|
519
|
+
*/
|
|
520
|
+
output: ({ fileName, extension }) => `./${fileName}${extension}`,
|
|
521
|
+
|
|
522
|
+
/**
|
|
523
|
+
* Wskazuje, czy komponenty powinny zostać zapisane po transformacji. W ten sposób kompilator można uruchomić tylko raz, aby przetransformować aplikację, a następnie go usunąć.
|
|
524
|
+
*/
|
|
525
|
+
saveComponents: false,
|
|
526
|
+
|
|
527
|
+
/**
|
|
528
|
+
* Prefiks klucza słownika
|
|
529
|
+
*/
|
|
530
|
+
dictionaryKeyPrefix: "",
|
|
531
|
+
},
|
|
532
|
+
};
|
|
533
|
+
|
|
534
|
+
export default config;
|
|
535
|
+
```
|
|
536
|
+
|
|
537
|
+
```javascript fileName="intlayer.config.mjs" codeFormat="esm"
|
|
538
|
+
/** @type {import('intlayer').IntlayerConfig} */
|
|
539
|
+
const config = {
|
|
540
|
+
// ... Reszta Twojej konfiguracji
|
|
541
|
+
compiler: {
|
|
542
|
+
/**
|
|
543
|
+
* Wskazuje, czy kompilator powinien być włączony.
|
|
544
|
+
*/
|
|
545
|
+
enabled: true,
|
|
546
|
+
|
|
547
|
+
/**
|
|
548
|
+
* Definiuje ścieżkę plików wyjściowych
|
|
549
|
+
*/
|
|
550
|
+
output: ({ fileName, extension }) => `./${fileName}${extension}`,
|
|
551
|
+
|
|
552
|
+
/**
|
|
553
|
+
* Wskazuje, czy komponenty powinny zostać zapisane po transformacji. W ten sposób kompilator można uruchomić tylko raz, aby przetransformować aplikację, a następnie go usunąć.
|
|
554
|
+
*/
|
|
555
|
+
saveComponents: false,
|
|
556
|
+
|
|
557
|
+
/**
|
|
558
|
+
* Prefiks klucza słownika
|
|
559
|
+
*/
|
|
560
|
+
dictionaryKeyPrefix: "",
|
|
561
|
+
},
|
|
562
|
+
};
|
|
563
|
+
|
|
564
|
+
export default config;
|
|
565
|
+
```
|
|
566
|
+
|
|
567
|
+
```javascript fileName="intlayer.config.cjs" codeFormat="commonjs"
|
|
568
|
+
/** @type {import('intlayer').IntlayerConfig} */
|
|
569
|
+
const config = {
|
|
570
|
+
// ... Reszta Twojej konfiguracji
|
|
571
|
+
compiler: {
|
|
572
|
+
/**
|
|
573
|
+
* Wskazuje, czy kompilator powinien być włączony.
|
|
574
|
+
*/
|
|
575
|
+
enabled: true,
|
|
576
|
+
|
|
577
|
+
/**
|
|
578
|
+
* Definiuje ścieżkę plików wyjściowych
|
|
579
|
+
*/
|
|
580
|
+
output: ({ fileName, extension }) => `./${fileName}${extension}`,
|
|
581
|
+
|
|
582
|
+
/**
|
|
583
|
+
* Wskazuje, czy komponenty powinny zostać zapisane po transformacji. W ten sposób kompilator można uruchomić tylko raz, aby przetransformować aplikację, a następnie go usunąć.
|
|
584
|
+
*/
|
|
585
|
+
saveComponents: false,
|
|
586
|
+
|
|
587
|
+
/**
|
|
588
|
+
* Prefiks klucza słownika
|
|
589
|
+
*/
|
|
590
|
+
dictionaryKeyPrefix: "",
|
|
591
|
+
},
|
|
592
|
+
};
|
|
593
|
+
|
|
594
|
+
module.exports = config;
|
|
595
|
+
```
|
|
596
|
+
|
|
597
|
+
<Tabs>
|
|
598
|
+
<Tab value='Polecenie wyodrębniania'>
|
|
599
|
+
|
|
600
|
+
Uruchom ekstraktor, aby przetransformować komponenty i wyodrębnić zawartość
|
|
601
|
+
|
|
602
|
+
```bash packageManager="npm"
|
|
603
|
+
npx intlayer extract
|
|
604
|
+
```
|
|
605
|
+
|
|
606
|
+
```bash packageManager="pnpm"
|
|
607
|
+
pnpm intlayer extract
|
|
608
|
+
```
|
|
609
|
+
|
|
610
|
+
```bash packageManager="yarn"
|
|
611
|
+
yarn intlayer extract
|
|
612
|
+
```
|
|
613
|
+
|
|
614
|
+
```bash packageManager="bun"
|
|
615
|
+
bunx intlayer extract
|
|
616
|
+
```
|
|
617
|
+
|
|
618
|
+
</Tab>
|
|
619
|
+
<Tab value='Kompilator Babel'>
|
|
620
|
+
|
|
621
|
+
Zaktualizuj `vite.config.ts`, aby dołączyć wtyczkę `intlayerCompiler`:
|
|
622
|
+
|
|
623
|
+
```ts fileName="vite.config.ts"
|
|
624
|
+
import { defineConfig } from "vite";
|
|
625
|
+
import { intlayer, intlayerCompiler } from "vite-intlayer";
|
|
626
|
+
|
|
627
|
+
export default defineConfig({
|
|
628
|
+
plugins: [
|
|
629
|
+
intlayer(),
|
|
630
|
+
intlayerCompiler(), // Dodaje wtyczkę kompilatora
|
|
631
|
+
],
|
|
632
|
+
});
|
|
633
|
+
```
|
|
634
|
+
|
|
635
|
+
```bash packageManager="npm"
|
|
636
|
+
npm run build # Lub npm run dev
|
|
637
|
+
```
|
|
638
|
+
|
|
639
|
+
```bash packageManager="pnpm"
|
|
640
|
+
pnpm run build # Or pnpm run dev
|
|
641
|
+
```
|
|
642
|
+
|
|
643
|
+
```bash packageManager="yarn"
|
|
644
|
+
yarn build # Or yarn dev
|
|
645
|
+
```
|
|
646
|
+
|
|
647
|
+
```bash packageManager="bun"
|
|
648
|
+
bun run build # Or bun run dev
|
|
649
|
+
```
|
|
650
|
+
|
|
651
|
+
</Tab>
|
|
652
|
+
</Tabs>
|
|
653
|
+
|
|
498
654
|
### Idź dalej
|
|
499
655
|
|
|
500
656
|
Aby pójść dalej, możesz zaimplementować [edytor wizualny](https://github.com/aymericzip/intlayer/blob/main/docs/docs/pl/intlayer_visual_editor.md) lub wyeksportować swoją zawartość, korzystając z [CMS](https://github.com/aymericzip/intlayer/blob/main/docs/docs/pl/intlayer_CMS.md).
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
---
|
|
2
2
|
createdAt: 2025-04-18
|
|
3
|
-
updatedAt:
|
|
3
|
+
updatedAt: 2026-03-12
|
|
4
4
|
title: Vite + Vue i18n - Jak przetłumaczyć aplikację Vue w 2026
|
|
5
5
|
description: Dowiedz się, jak uczynić swoją stronę Vite i Vue wielojęzyczną. Postępuj zgodnie z dokumentacją, aby zinternacjonalizować (i18n) i przetłumaczyć ją.
|
|
6
6
|
keywords:
|
|
@@ -1125,6 +1125,162 @@ Więcej szczegółów na temat korzystania z rozszerzenia znajdziesz w [dokument
|
|
|
1125
1125
|
|
|
1126
1126
|
---
|
|
1127
1127
|
|
|
1128
|
+
### (Opcjonalnie) Krok 12 : Wyodrębnij zawartość swoich komponentów
|
|
1129
|
+
|
|
1130
|
+
Jeśli masz istniejącą bazę kodu, transformacja tysięcy plików może być czasochłonna.
|
|
1131
|
+
|
|
1132
|
+
Aby ułatwić ten proces, Intlayer proponuje [kompilator](https://github.com/aymericzip/intlayer/blob/main/docs/docs/pl/compiler.md) / [ekstraktor](https://github.com/aymericzip/intlayer/blob/main/docs/docs/pl/cli/extract.md), aby przetransformować komponenty i wyodrębnić zawartość.
|
|
1133
|
+
|
|
1134
|
+
Aby go skonfigurować, możesz dodać sekcję `compiler` w pliku `intlayer.config.ts`:
|
|
1135
|
+
|
|
1136
|
+
```typescript fileName="intlayer.config.ts" codeFormat="typescript"
|
|
1137
|
+
import { type IntlayerConfig } from "intlayer";
|
|
1138
|
+
|
|
1139
|
+
const config: IntlayerConfig = {
|
|
1140
|
+
// ... Reszta Twojej konfiguracji
|
|
1141
|
+
compiler: {
|
|
1142
|
+
/**
|
|
1143
|
+
* Wskazuje, czy kompilator powinien być włączony.
|
|
1144
|
+
*/
|
|
1145
|
+
enabled: true,
|
|
1146
|
+
|
|
1147
|
+
/**
|
|
1148
|
+
* Definiuje ścieżkę plików wyjściowych
|
|
1149
|
+
*/
|
|
1150
|
+
output: ({ fileName, extension }) => `./${fileName}${extension}`,
|
|
1151
|
+
|
|
1152
|
+
/**
|
|
1153
|
+
* Wskazuje, czy komponenty powinny zostać zapisane po transformacji. W ten sposób kompilator można uruchomić tylko raz, aby przetransformować aplikację, a następnie go usunąć.
|
|
1154
|
+
*/
|
|
1155
|
+
saveComponents: false,
|
|
1156
|
+
|
|
1157
|
+
/**
|
|
1158
|
+
* Prefiks klucza słownika
|
|
1159
|
+
*/
|
|
1160
|
+
dictionaryKeyPrefix: "",
|
|
1161
|
+
},
|
|
1162
|
+
};
|
|
1163
|
+
|
|
1164
|
+
export default config;
|
|
1165
|
+
```
|
|
1166
|
+
|
|
1167
|
+
```javascript fileName="intlayer.config.mjs" codeFormat="esm"
|
|
1168
|
+
/** @type {import('intlayer').IntlayerConfig} */
|
|
1169
|
+
const config = {
|
|
1170
|
+
// ... Reszta Twojej konfiguracji
|
|
1171
|
+
compiler: {
|
|
1172
|
+
/**
|
|
1173
|
+
* Wskazuje, czy kompilator powinien być włączony.
|
|
1174
|
+
*/
|
|
1175
|
+
enabled: true,
|
|
1176
|
+
|
|
1177
|
+
/**
|
|
1178
|
+
* Definiuje ścieżkę plików wyjściowych
|
|
1179
|
+
*/
|
|
1180
|
+
output: ({ fileName, extension }) => `./${fileName}${extension}`,
|
|
1181
|
+
|
|
1182
|
+
/**
|
|
1183
|
+
* Wskazuje, czy komponenty powinny zostać zapisane po transformacji. W ten sposób kompilator można uruchomić tylko raz, aby przetransformować aplikację, a następnie go usunąć.
|
|
1184
|
+
*/
|
|
1185
|
+
saveComponents: false,
|
|
1186
|
+
|
|
1187
|
+
/**
|
|
1188
|
+
* Prefiks klucza słownika
|
|
1189
|
+
*/
|
|
1190
|
+
dictionaryKeyPrefix: "",
|
|
1191
|
+
},
|
|
1192
|
+
};
|
|
1193
|
+
|
|
1194
|
+
export default config;
|
|
1195
|
+
```
|
|
1196
|
+
|
|
1197
|
+
```javascript fileName="intlayer.config.cjs" codeFormat="commonjs"
|
|
1198
|
+
/** @type {import('intlayer').IntlayerConfig} */
|
|
1199
|
+
const config = {
|
|
1200
|
+
// ... Reszta Twojej konfiguracji
|
|
1201
|
+
compiler: {
|
|
1202
|
+
/**
|
|
1203
|
+
* Wskazuje, czy kompilator powinien być włączony.
|
|
1204
|
+
*/
|
|
1205
|
+
enabled: true,
|
|
1206
|
+
|
|
1207
|
+
/**
|
|
1208
|
+
* Definiuje ścieżkę plików wyjściowych
|
|
1209
|
+
*/
|
|
1210
|
+
output: ({ fileName, extension }) => `./${fileName}${extension}`,
|
|
1211
|
+
|
|
1212
|
+
/**
|
|
1213
|
+
* Wskazuje, czy komponenty powinny zostać zapisane po transformacji. W ten sposób kompilator można uruchomić tylko raz, aby przetransformować aplikację, a następnie go usunąć.
|
|
1214
|
+
*/
|
|
1215
|
+
saveComponents: false,
|
|
1216
|
+
|
|
1217
|
+
/**
|
|
1218
|
+
* Prefiks klucza słownika
|
|
1219
|
+
*/
|
|
1220
|
+
dictionaryKeyPrefix: "",
|
|
1221
|
+
},
|
|
1222
|
+
};
|
|
1223
|
+
|
|
1224
|
+
module.exports = config;
|
|
1225
|
+
```
|
|
1226
|
+
|
|
1227
|
+
<Tabs>
|
|
1228
|
+
<Tab value='Polecenie wyodrębniania'>
|
|
1229
|
+
|
|
1230
|
+
Uruchom ekstraktor, aby przetransformować komponenty i wyodrębnić zawartość
|
|
1231
|
+
|
|
1232
|
+
```bash packageManager="npm"
|
|
1233
|
+
npx intlayer extract
|
|
1234
|
+
```
|
|
1235
|
+
|
|
1236
|
+
```bash packageManager="pnpm"
|
|
1237
|
+
pnpm intlayer extract
|
|
1238
|
+
```
|
|
1239
|
+
|
|
1240
|
+
```bash packageManager="yarn"
|
|
1241
|
+
yarn intlayer extract
|
|
1242
|
+
```
|
|
1243
|
+
|
|
1244
|
+
```bash packageManager="bun"
|
|
1245
|
+
bunx intlayer extract
|
|
1246
|
+
```
|
|
1247
|
+
|
|
1248
|
+
</Tab>
|
|
1249
|
+
<Tab value='Kompilator Babel'>
|
|
1250
|
+
|
|
1251
|
+
Zaktualizuj `vite.config.ts`, aby dołączyć wtyczkę `intlayerCompiler`:
|
|
1252
|
+
|
|
1253
|
+
```ts fileName="vite.config.ts"
|
|
1254
|
+
import { defineConfig } from "vite";
|
|
1255
|
+
import { intlayer, intlayerCompiler } from "vite-intlayer";
|
|
1256
|
+
|
|
1257
|
+
export default defineConfig({
|
|
1258
|
+
plugins: [
|
|
1259
|
+
intlayer(),
|
|
1260
|
+
intlayerCompiler(), // Dodaje wtyczkę kompilatora
|
|
1261
|
+
],
|
|
1262
|
+
});
|
|
1263
|
+
```
|
|
1264
|
+
|
|
1265
|
+
```bash packageManager="npm"
|
|
1266
|
+
npm run build # Lub npm run dev
|
|
1267
|
+
```
|
|
1268
|
+
|
|
1269
|
+
```bash packageManager="pnpm"
|
|
1270
|
+
pnpm run build # Or pnpm run dev
|
|
1271
|
+
```
|
|
1272
|
+
|
|
1273
|
+
```bash packageManager="yarn"
|
|
1274
|
+
yarn build # Or yarn dev
|
|
1275
|
+
```
|
|
1276
|
+
|
|
1277
|
+
```bash packageManager="bun"
|
|
1278
|
+
bun run build # Or bun run dev
|
|
1279
|
+
```
|
|
1280
|
+
|
|
1281
|
+
</Tab>
|
|
1282
|
+
</Tabs>
|
|
1283
|
+
|
|
1128
1284
|
### Idź dalej
|
|
1129
1285
|
|
|
1130
1286
|
Aby iść dalej, możesz zaimplementować [edytor wizualny](https://github.com/aymericzip/intlayer/blob/main/docs/docs/pl/intlayer_visual_editor.md) lub wyodrębnić swoją zawartość, korzystając z [CMS](https://github.com/aymericzip/intlayer/blob/main/docs/docs/pl/intlayer_CMS.md).
|