@intlayer/docs 8.4.6 → 8.4.8

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.
Files changed (33) hide show
  1. package/blog/en/next-i18next_vs_next-intl_vs_intlayer.md +1 -3
  2. package/blog/en-GB/next-i18next_vs_next-intl_vs_intlayer.md +1 -3
  3. package/blog/es/next-i18next_vs_next-intl_vs_intlayer.md +1 -3
  4. package/blog/id/next-i18next_vs_next-intl_vs_intlayer.md +1 -3
  5. package/blog/it/next-i18next_vs_next-intl_vs_intlayer.md +1 -3
  6. package/blog/ja/next-i18next_vs_next-intl_vs_intlayer.md +1 -3
  7. package/blog/ko/next-i18next_vs_next-intl_vs_intlayer.md +1 -3
  8. package/blog/uk/next-i18next_vs_next-intl_vs_intlayer.md +1 -3
  9. package/blog/vi/next-i18next_vs_next-intl_vs_intlayer.md +1 -3
  10. package/blog/zh/next-i18next_vs_next-intl_vs_intlayer.md +1 -3
  11. package/docs/ar/configuration.md +300 -264
  12. package/docs/cs/configuration.md +958 -0
  13. package/docs/de/configuration.md +285 -249
  14. package/docs/en/configuration.md +115 -137
  15. package/docs/en-GB/configuration.md +272 -237
  16. package/docs/es/configuration.md +161 -125
  17. package/docs/fr/configuration.md +137 -101
  18. package/docs/it/configuration.md +294 -259
  19. package/docs/ja/configuration.md +269 -233
  20. package/docs/nl/configuration.md +958 -0
  21. package/docs/pt/configuration.md +311 -275
  22. package/docs/ru/configuration.md +287 -272
  23. package/docs/tr/configuration.md +265 -229
  24. package/package.json +6 -6
  25. package/docs/bn/configuration.md +0 -922
  26. package/docs/hi/configuration.md +0 -922
  27. package/docs/id/configuration.md +0 -922
  28. package/docs/ko/configuration.md +0 -922
  29. package/docs/pl/configuration.md +0 -922
  30. package/docs/uk/configuration.md +0 -922
  31. package/docs/ur/configuration.md +0 -922
  32. package/docs/vi/configuration.md +0 -922
  33. package/docs/zh/configuration.md +0 -922
@@ -275,7 +275,7 @@ const config: IntlayerConfig = {
275
275
  watch: true,
276
276
 
277
277
  /**
278
- * Command to format newly created / updated .content files.
278
+ * Command to format newly created <br/> updated .content files.
279
279
  */
280
280
  formatCommand: 'npx prettier --write "{{file}}"',
281
281
  },
@@ -563,12 +563,12 @@ The following sections describe the various configuration settings available for
563
563
 
564
564
  Defines settings related to internationalization, including available locales and the default locale for the application.
565
565
 
566
- | Field | Type | Description | Example | Note |
567
- | ----------------- | ---------- | ------------------------------------------------------------------------------------------------------ | -------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
568
- | `locales` | `string[]` | The list of supported locales in the application. Default: `[Locales.ENGLISH]` | `['en', 'fr', 'es']` | |
569
- | `requiredLocales` | `string[]` | The list of required locales in the application. Default: `[]` | `[]` | If empty, all locales are required in `strict` mode. Ensure required locales are also defined in the `locales` field. |
570
- | `strictMode` | `string` | Ensure strong implementations of internationalized content using TypeScript. Default: `inclusive` | | If `"strict"`: the `t` function requires each declared locale to be defined — throws an error if one is missing or undeclared. If `"inclusive"`: warns on missing locales but accepts undeclared ones that exist. If `"loose"`: accepts any existing locale. |
571
- | `defaultLocale` | `string` | The default locale used as a fallback if the requested locale is not found. Default: `Locales.ENGLISH` | `'en'` | Used to determine the locale when none is specified in the URL, cookie, or header. |
566
+ | Field | Description | Type | Default | Example | Note |
567
+ | ----------------- | ---------------------------------------------------------------------------- | ---------- | ------------------- | -------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
568
+ | `locales` | The list of supported locales in the application. | `string[]` | `[Locales.ENGLISH]` | `['en', 'fr', 'es']` | |
569
+ | `requiredLocales` | The list of required locales in the application. | `string[]` | `[]` | `[]` | If empty, all locales are required in `strict` mode.<br/>• Ensure required locales are also defined in the `locales` field. |
570
+ | `strictMode` | Ensure strong implementations of internationalized content using TypeScript. | `string` | `'inclusive'` | | If `"strict"`: the `t` function requires each declared locale to be defined — throws an error if one is missing or undeclared.<br/>• If `"inclusive"`: warns on missing locales but accepts undeclared ones that exist.<br/>• If `"loose"`: accepts any existing locale. |
571
+ | `defaultLocale` | The default locale used as a fallback if the requested locale is not found. | `string` | `Locales.ENGLISH` | `'en'` | Used to determine the locale when none is specified in the URL, cookie, or header. |
572
572
 
573
573
  ---
574
574
 
@@ -576,31 +576,31 @@ Defines settings related to internationalization, including available locales an
576
576
 
577
577
  Defines settings related to the integrated editor, including server port and active status.
578
578
 
579
- | Field | Type | Description | Example | Note |
580
- | ---------------------------- | ------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
581
- | `applicationURL` | `string` | The URL of the application. Default: `''` | `'http://localhost:3000'`, `'https://example.com'`, `process.env.INTLAYER_EDITOR_URL` | Used to restrict the origin of the editor for security reasons. If set to `'*'`, the editor is accessible from any origin. |
582
- | `port` | `number` | The port used by the visual editor server. Default: `8000` | | |
583
- | `editorURL` | `string` | The URL of the editor server. Default: `'http://localhost:8000'` | `'http://localhost:3000'`, `'https://example.com'`, `process.env.INTLAYER_EDITOR_URL` | Used to restrict the origins that can interact with the application. If set to `'*'`, accessible from any origin. Should be set if port is changed or editor is hosted on a different domain. |
584
- | `cmsURL` | `string` | The URL of the Intlayer CMS. Default: `'https://intlayer.org'` | `'https://intlayer.org'` | |
585
- | `backendURL` | `string` | The URL of the backend server. Default: `https://back.intlayer.org` | `http://localhost:4000` | |
586
- | `enabled` | `boolean` | Indicates if the application interacts with the visual editor. Default: `true` | `process.env.NODE_ENV !== 'production'` | If `false`, the editor cannot interact with the application. Disabling for specific environments enforces security. |
587
- | `clientId` | `string &#124; undefined` | Allows intlayer packages to authenticate with the backend using oAuth2. To get an access token, go to [intlayer.org/project](https://app.intlayer.org/project). Default: `undefined` | | Keep secret; store in environment variables. |
588
- | `clientSecret` | `string &#124; undefined` | Allows intlayer packages to authenticate with the backend using oAuth2. To get an access token, go to [intlayer.org/project](https://app.intlayer.org/project). Default: `undefined` | | Keep secret; store in environment variables. |
589
- | `dictionaryPriorityStrategy` | `string` | Strategy to prioritize dictionaries when both local and distant are present. Default: `'local_first'` | `'distant_first'` | `'distant_first'`: prioritizes distant over local. `'local_first'`: prioritizes local over distant. |
590
- | `liveSync` | `boolean` | Indicates if the app server should hot reload content when a change is detected on the CMS / Visual Editor / Backend. Default: `true` | `true` | When a dictionary is added/updated, the app updates page content. Live sync externalizes content to another server, which may slightly impact performance. Recommend hosting both on the same machine. |
591
- | `liveSyncPort` | `number` | The port of the live sync server. Default: `4000` | `4000` | |
592
- | `liveSyncURL` | `string` | The URL of the live sync server. Default: `'http://localhost:{liveSyncPort}'` | `'https://example.com'` | Points to localhost by default; can be changed for a remote live sync server. |
579
+ | Field | Description | Type | Default | Example | Note |
580
+ | ---------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------- | ----------------------------------- | ----------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
581
+ | `applicationURL` | The URL of the application. | `string` | `undefined` | `'http://localhost:3000'` <br/> `'https://example.com'` <br/> `process.env.INTLAYER_EDITOR_URL` | Used to restrict the origin of the editor for security reasons.<br/>• If set to `'*'`, the editor is accessible from any origin. |
582
+ | `port` | The port used by the visual editor server. | `number` | `8000` | | |
583
+ | `editorURL` | The URL of the editor server. | `string` | `'http://localhost:8000'` | `'http://localhost:3000'` <br/> `'https://example.com'` <br/> `process.env.INTLAYER_EDITOR_URL` | Used to restrict the origins that can interact with the application.<br/>• If set to `'*'`, accessible from any origin.<br/>• Should be set if port is changed or editor is hosted on a different domain. |
584
+ | `cmsURL` | The URL of the Intlayer CMS. | `string` | `'https://app.intlayer.org'` | `'https://app.intlayer.org'` | |
585
+ | `backendURL` | The URL of the backend server. | `string` | `https://back.intlayer.org` | `http://localhost:4000` | |
586
+ | `enabled` | Indicates if the application interacts with the visual editor. | `boolean` | `false` | `process.env.NODE_ENV !== 'production'` | If `false`, the editor cannot interact with the application.<br/>• Disabling for specific environments enforces security. |
587
+ | `clientId` | Allows intlayer packages to authenticate with the backend using oAuth2. To get an access token, go to [intlayer.org/project](https://app.intlayer.org/project). | `string` &#124; <br/> `undefined` | `undefined` | | Keep secret; store in environment variables. |
588
+ | `clientSecret` | Allows intlayer packages to authenticate with the backend using oAuth2. To get an access token, go to [intlayer.org/project](https://app.intlayer.org/project). | `string` &#124; <br/> `undefined` | `undefined` | | Keep secret; store in environment variables. |
589
+ | `dictionaryPriorityStrategy` | Strategy to prioritize dictionaries when both local and distant are present. | `string` | `'local_first'` | `'distant_first'` | `'distant_first'`: prioritizes distant over local.<br/>• `'local_first'`: prioritizes local over distant. |
590
+ | `liveSync` | Indicates if the app server should hot reload content when a change is detected on the CMS <br/> Visual Editor <br/> Backend. | `boolean` | `true` | `true` | When a dictionary is added/updated, the app updates page content.<br/>• Live sync externalizes content to another server, which may slightly impact performance.<br/>• Recommend hosting both on the same machine. |
591
+ | `liveSyncPort` | The port of the live sync server. | `number` | `4000` | `4000` | |
592
+ | `liveSyncURL` | The URL of the live sync server. | `string` | `'http://localhost:{liveSyncPort}'` | `'https://example.com'` | Points to localhost by default; can be changed for a remote live sync server. |
593
593
 
594
594
  ### Routing Configuration
595
595
 
596
596
  Settings that control routing behavior, including URL structure, locale storage, and middleware handling.
597
597
 
598
- | Field | Type | Description | Example | Note |
599
- | ---------- | ---------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
600
- | `mode` | `'prefix-no-default' &#124; 'prefix-all' &#124; 'no-prefix' &#124; 'search-params'` | URL routing mode for locale handling. Default: `'prefix-no-default'` | `'prefix-no-default'`: `/dashboard` (en) or `/fr/dashboard` (fr). `'prefix-all'`: `/en/dashboard`. `'no-prefix'`: locale handled via other means. `'search-params'`: `/dashboard?locale=fr` | Does not impact cookie or locale storage management. |
601
- | `storage` | `false &#124; 'cookie' &#124; 'localStorage' &#124; 'sessionStorage' &#124; 'header' &#124; CookiesAttributes &#124; StorageAttributes &#124; Array` | Configuration for storing the locale in the client. Default: `['cookie', 'header']` | `'localStorage'`, `[{ type: 'cookie', name: 'custom-locale', secure: true }]` | See Storage Options table below. |
602
- | `basePath` | `string` | The base path for the application URLs. Default: `''` | `'/my-app'` | If app is at `https://example.com/my-app`, basePath is `'/my-app'` and URLs become `https://example.com/my-app/en`. |
603
- | `rewrite` | `Record<string, StrictModeLocaleMap<string>>` | Custom URL rewriting rules that override the default routing mode for specific paths. Supports `[param]` dynamic parameters. Default: `undefined` | See example below | Rewrite rules take precedence over `mode`. Works with Next.js and Vite. `getLocalizedUrl()` automatically applies matching rules. See [Custom URL Rewrites](https://github.com/aymericzip/intlayer/blob/main/docs/docs/en/custom_url_rewrites.md). |
598
+ | Field | Description | Type | Default | Example | Note |
599
+ | ---------- | ---------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ---------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
600
+ | `mode` | URL routing mode for locale handling. | `'prefix-no-default'` &#124; <br/> `'prefix-all'` &#124; <br/> `'no-prefix'` &#124; <br/> `'search-params'` | `'prefix-no-default'` | `'prefix-no-default'`: `/dashboard` (en) or `/fr/dashboard` (fr). `'prefix-all'`: `/en/dashboard`. `'no-prefix'`: locale handled via other means. `'search-params'`: `/dashboard?locale=fr` | Does not impact cookie or locale storage management. |
601
+ | `storage` | Configuration for storing the locale in the client. | `false` &#124; <br/> `'cookie'` &#124; <br/> `'localStorage'` &#124; <br/> `'sessionStorage'` &#124; <br/> `'header'` &#124; <br/> `CookiesAttributes` &#124; <br/> `StorageAttributes` &#124; <br/> `Array` | `['cookie', 'header']` | `'localStorage'` <br/> `[{ type: 'cookie', name: 'custom-locale', secure: true }]` | See Storage Options table below. |
602
+ | `basePath` | The base path for the application URLs. | `string` | `''` | `'/my-app'` | If app is at `https://example.com/my-app, basePath is `'/my-app'` and URLs become `https://example.com/my-app/en`. |
603
+ | `rewrite` | Custom URL rewriting rules that override the default routing mode for specific paths. Supports `[param]` dynamic parameters. | `Record<string, StrictModeLocaleMap<string>>` | `undefined` | See example below | Rewrite rules take precedence over `mode`.<br/>• Works with Next.js and Vite.<br/>• `getLocalizedUrl()` automatically applies matching rules.<br/>• See [Custom URL Rewrites](https://github.com/aymericzip/intlayer/blob/main/docs/docs/en/custom_url_rewrites.md). |
604
604
 
605
605
  **`rewrite` example**:
606
606
 
@@ -626,35 +626,35 @@ routing: {
626
626
 
627
627
  #### Storage Options
628
628
 
629
- | Value | Description | Note |
630
- | ------------------ | ---------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
631
- | `'cookie'` | Stores locale in cookies — accessible on both client and server side. | For GDPR compliance, ensure proper user consent. Customizable via `CookiesAttributes` (`{ type: 'cookie', name: 'custom-locale', secure: true, httpOnly: false }`). |
632
- | `'localStorage'` | Stores locale in the browser without expiration — client side only. | No expiration unless explicitly cleared. Intlayer proxy cannot access it. Customizable via `StorageAttributes` (`{ type: 'localStorage', name: 'custom-locale' }`). |
633
- | `'sessionStorage'` | Stores locale for the duration of the page session — client side only. | Cleared when tab/window is closed. Intlayer proxy cannot access it. Customizable via `StorageAttributes` (`{ type: 'sessionStorage', name: 'custom-locale' }`). |
634
- | `'header'` | Stores or transmits locale via HTTP headers — server side only. | Useful for API calls. Client side cannot access it. Customizable via `StorageAttributes` (`{ type: 'header', name: 'custom-locale' }`). |
629
+ | Value | Note | Description |
630
+ | ------------------ | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------- |
631
+ | `'cookie'` | For GDPR compliance, ensure proper user consent.<br/>• Customizable via `CookiesAttributes` (`{ type: 'cookie', name: 'custom-locale', secure: true, httpOnly: false }`). | Stores locale in cookies — accessible on both client and server side. |
632
+ | `'localStorage'` | No expiration unless explicitly cleared.<br/>• Intlayer proxy cannot access it.<br/>• Customizable via `StorageAttributes` (`{ type: 'localStorage', name: 'custom-locale' }`). | Stores locale in the browser without expiration — client side only. |
633
+ | `'sessionStorage'` | Cleared when tab/window is closed.<br/>• Intlayer proxy cannot access it.<br/>• Customizable via `StorageAttributes` (`{ type: 'sessionStorage', name: 'custom-locale' }`). | Stores locale for the duration of the page session — client side only. |
634
+ | `'header'` | Useful for API calls.<br/>• Client side cannot access it.<br/>• Customizable via `StorageAttributes` (`{ type: 'header', name: 'custom-locale' }`). | Stores or transmits locale via HTTP headers — server side only. |
635
635
 
636
636
  #### Cookie Attributes
637
637
 
638
638
  When using cookie storage, you can configure additional cookie attributes:
639
639
 
640
- | Field | Type | Description |
641
- | ---------- | ------------------------------------- | --------------------------------------------- |
642
- | `name` | `string` | Cookie name. Default: `'INTLAYER_LOCALE'` |
643
- | `domain` | `string` | Cookie domain. Default: `undefined` |
644
- | `path` | `string` | Cookie path. Default: `undefined` |
645
- | `secure` | `boolean` | Require HTTPS. Default: `undefined` |
646
- | `httpOnly` | `boolean` | HTTP-only flag. Default: `undefined` |
647
- | `sameSite` | `'strict' &#124; 'lax' &#124; 'none'` | SameSite policy. |
648
- | `expires` | `Date &#124; number` | Expiration date or days. Default: `undefined` |
640
+ | Field | Description | Type |
641
+ | ---------- | --------------------------------------------- | ----------------------------------------------------- |
642
+ | `name` | Cookie name. Default: `'INTLAYER_LOCALE'` | `string` |
643
+ | `domain` | Cookie domain. Default: `undefined` | `string` |
644
+ | `path` | Cookie path. Default: `undefined` | `string` |
645
+ | `secure` | Require HTTPS. Default: `undefined` | `boolean` |
646
+ | `httpOnly` | HTTP-only flag. Default: `undefined` | `boolean` |
647
+ | `sameSite` | SameSite policy. | `'strict'` &#124; <br/> `'lax'` &#124; <br/> `'none'` |
648
+ | `expires` | Expiration date or days. Default: `undefined` | `Date` &#124; <br/> `number` |
649
649
 
650
650
  #### Locale Storage Attributes
651
651
 
652
652
  When using localStorage or sessionStorage:
653
653
 
654
- | Field | Type | Description |
655
- | ------ | ---------------------------------------- | ---------------------------------------------- |
656
- | `type` | `'localStorage' &#124; 'sessionStorage'` | Storage type. |
657
- | `name` | `string` | Storage key name. Default: `'INTLAYER_LOCALE'` |
654
+ | Field | Description | Type |
655
+ | ------ | ---------------------------------------------- | ------------------------------------------------ |
656
+ | `type` | Storage type. | `'localStorage'` &#124; <br/> `'sessionStorage'` |
657
+ | `name` | Storage key name. Default: `'INTLAYER_LOCALE'` | `string` |
658
658
 
659
659
  #### Configuration Examples
660
660
 
@@ -795,14 +795,14 @@ export default config;
795
795
 
796
796
  Settings related to content handling within the application, including directory names, file extensions, and derived configurations.
797
797
 
798
- | Field | Type | Description | Example | Note |
799
- | ---------------- | ---------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------ |
800
- | `watch` | `boolean` | Indicates if Intlayer should watch for changes in content declaration files to rebuild dictionaries. Default: `process.env.NODE_ENV === 'development'` | | |
801
- | `fileExtensions` | `string[]` | File extensions to look for when building dictionaries. Default: `['.content.ts', '.content.js', '.content.cjs', '.content.mjs', '.content.json', '.content.json5', '.content.jsonc', '.content.tsx', '.content.jsx']` | `['.data.ts', '.data.js', '.data.json']` | Customizing can help avoid conflicts. |
802
- | `contentDir` | `string[]` | Directory path where content definition files (`.content.*`) are stored. Default: `['.']` | `['src', '../../ui-library', require.resolve("@my-package/content")]` | Used to watch for content files to rebuild dictionaries. |
803
- | `codeDir` | `string[]` | Directory path where the code is stored, relative to the base directory. Default: `['.']` | `['src', '../../ui-library']` | Used to watch for code files to transform (prune, optimize). Keeping separate from `contentDir` can improve build performance. |
804
- | `excludedPath` | `string[]` | Directories excluded from content search. Default: `['**/node_modules/**', '**/dist/**', '**/build/**', '**/.intlayer/**', '**/.next/**', '**/.nuxt/**', '**/.expo/**', '**/.vercel/**', '**/.turbo/**', '**/.tanstack/**']` | | Not yet used; planned for future implementation. |
805
- | `formatCommand` | `string` | Command to format content files when Intlayer writes them locally. Default: `undefined` | `'npx prettier --write "{{file}}" --log-level silent'` (Prettier), `'npx biome format "{{file}}" --write --log-level none'` (Biome), `'npx eslint --fix "{{file}}" --quiet'` (ESLint) | `{{file}}` is replaced with the file path. If not set, Intlayer auto-detects (tries prettier, biome, eslint). |
798
+ | Field | Description | Type | Default | Example | Note |
799
+ | ---------------- | ---------------------------------------------------------------------------------------------------- | ---------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------- |
800
+ | `watch` | Indicates if Intlayer should watch for changes in content declaration files to rebuild dictionaries. | `boolean` | `true` | | |
801
+ | `fileExtensions` | File extensions to look for when building dictionaries. | `string[]` | `['.content.ts', '.content.js', '.content.cjs', '.content.mjs', '.content.json', '.content.json5', '.content.jsonc', '.content.tsx', '.content.jsx']` | `['.data.ts', '.data.js', '.data.json']` | Customizing can help avoid conflicts. |
802
+ | `contentDir` | Directory path where content definition files (`.content.*`) are stored. | `string[]` | `['.']` | `['src', '../../ui-library', require.resolve("@my-package/content")]` | Used to watch for content files to rebuild dictionaries. |
803
+ | `codeDir` | Directory path where the code is stored, relative to the base directory. | `string[]` | `['.']` | `['src', '../../ui-library']` | Used to watch for code files to transform (prune, optimize).<br/>• Keeping separate from `contentDir` can improve build performance. |
804
+ | `excludedPath` | Directories excluded from content search. | `string[]` | `['**/node_modules/**', '**/dist/**', '**/build/**', '**/.intlayer/**', '**/.next/**', '**/.nuxt/**', '**/.expo/**', '**/.vercel/**', '**/.turbo/**', '**/.tanstack/**']` | | Not yet used; planned for future implementation. |
805
+ | `formatCommand` | Command to format content files when Intlayer writes them locally. | `string` | `undefined` | `'npx prettier --write "{{file}}" --log-level silent'` (Prettier), `'npx biome format "{{file}}" --write --log-level none'` (Biome), `'npx eslint --fix "{{file}}" --quiet'` (ESLint) | `{{file}}` is replaced with the file path.<br/>• If not set, Intlayer auto-detects (tries prettier, biome, eslint). |
806
806
 
807
807
  ---
808
808
 
@@ -810,16 +810,16 @@ Settings related to content handling within the application, including directory
810
810
 
811
811
  Settings related to internal paths and output results of Intlayer. These settings are typically internal and should not need to be modified by the user.
812
812
 
813
- | Field | Type | Description | Example | Note |
814
- | ------------------------- | -------- | ------------------------------------------------------------------------------------------------------------------ | -------------------- | ------------------------------------------------- |
815
- | `baseDir` | `string` | The base directory for the project. Default: `process.cwd()` | `'/path/to/project'` | Used to resolve all Intlayer-related directories. |
816
- | `dictionariesDir` | `string` | The directory path for storing localization dictionaries. Default: `'.intlayer/dictionary'` | | |
817
- | `moduleAugmentationDir` | `string` | Directory for module augmentation, allowing better IDE suggestions and type checking. Default: `'.intlayer/types'` | `'intlayer-types'` | Be sure to include this in `tsconfig.json`. |
818
- | `unmergedDictionariesDir` | `string` | The directory for storing unmerged dictionaries. Default: `'.intlayer/unmerged_dictionary'` | | |
819
- | `typesDir` | `string` | The directory for storing dictionary types. Default: `'.intlayer/types'` | | |
820
- | `mainDir` | `string` | The directory where main application files are stored. Default: `'.intlayer/main'` | | |
821
- | `configDir` | `string` | The directory where configuration files are stored. Default: `'.intlayer/config'` | | |
822
- | `cacheDir` | `string` | The directory where cache files are stored. Default: `'.intlayer/cache'` | | |
813
+ | Field | Description | Type | Default | Example | Note |
814
+ | ------------------------- | ------------------------------------------------------------------------------------- | -------- | --------------------------------- | -------------------- | ------------------------------------------------- |
815
+ | `baseDir` | The base directory for the project. | `string` | `process.cwd()` | `'/path/to/project'` | Used to resolve all Intlayer-related directories. |
816
+ | `dictionariesDir` | The directory path for storing localization dictionaries. | `string` | `'.intlayer/dictionary'` | | |
817
+ | `moduleAugmentationDir` | Directory for module augmentation, allowing better IDE suggestions and type checking. | `string` | `'.intlayer/types'` | `'intlayer-types'` | Be sure to include this in `tsconfig.json`. |
818
+ | `unmergedDictionariesDir` | The directory for storing unmerged dictionaries. | `string` | `'.intlayer/unmerged_dictionary'` | | |
819
+ | `typesDir` | The directory for storing dictionary types. | `string` | `'.intlayer/types'` | | |
820
+ | `mainDir` | The directory where main application files are stored. | `string` | `'.intlayer/main'` | | |
821
+ | `configDir` | The directory where configuration files are stored. | `string` | `'.intlayer/config'` | | |
822
+ | `cacheDir` | The directory where cache files are stored. | `string` | `'.intlayer/cache'` | | |
823
823
 
824
824
  ### Dictionary Configuration
825
825
 
@@ -832,20 +832,20 @@ This dictionary configuration serves two main purposes:
832
832
 
833
833
  For more information about content declaration files and how configuration values are applied, see the [Content File Documentation](https://github.com/aymericzip/intlayer/blob/main/docs/docs/en/dictionary/content_file.md).
834
834
 
835
- | Field | Type | Description | Example | Note |
836
- | --------------------------- | ----------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------- | ----------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
837
- | `fill` | `boolean &#124; FilePathPattern &#124; Partial<Record<Locale, boolean &#124; FilePathPattern>>` | Controls how auto-fill (AI translation) output files are generated. Default: `true` | See example below | `true`: default path (same file as source). `false`: disable. String/function template generates per-locale files. Object per-locale: each locale maps to its own pattern; `false` skips that locale. Including `{{locale}}` triggers per-locale generation. Dictionary-level `fill` always takes priority over this global config. |
838
- | `description` | | | | |
839
- | `locale` | | | | |
840
- | `contentAutoTransformation` | | | | |
841
- | `location` | | | | |
842
- | `importMode` | `'static' &#124; 'dynamic' &#124; 'fetch'` | Controls how dictionaries are imported. Default: `'static'` | `'dynamic'` | `'static'`: imported statically (replaces `useIntlayer` with `useDictionary`). `'dynamic'`: imported dynamically via Suspense (replaces with `useDictionaryDynamic`). `'fetch'`: fetched via live sync API; falls back to `'dynamic'` on failure. Relies on `@intlayer/babel` and `@intlayer/swc` plugins. Keys must be declared statically. Ignored if `optimize` is disabled. Does not affect `getIntlayer`, `getDictionary`, `useDictionary`, etc. |
843
- | `priority` | | | | |
844
- | `live` | | | | |
845
- | `schema` | | | | |
846
- | `title` | | | | |
847
- | `tags` | | | | |
848
- | `version` | | | | |
835
+ | Field | Description | Type | Default | Example | Note |
836
+ | --------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------- | -------------- | ------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
837
+ | `fill` | Controls how auto-fill (AI translation) output files are generated. | `boolean` &#124; <br/> `FilePathPattern` &#124; <br/> `Partial<Record<Locale, boolean &#124; FilePathPattern>>` | `true` | `{ en: '/locales/en/{{key}}.json', fr: ({ key }) => '/locales/fr/${key}.json', es: false }` | `true`: default path (same file as source).<br/>• `false`: disable.<br/>• String/function template generates per-locale files.<br/>• Object per-locale: each locale maps to its own pattern; `false` skips that locale.<br/>• Including `{{locale}}` triggers per-locale generation.<br/>• Dictionary-level `fill` always takes priority over this global config. |
838
+ | `description` | Helps understand the purpose of the dictionary in the editor and CMS. Also used as context for AI translation generation. | `string` | `undefined` | `'User profile section'` | |
839
+ | `locale` | Transforms the dictionary into a per-locale format. Each field declared becomes a translation node. If absent, the dictionary is treated as multilingual. | `LocalesValues` | `undefined` | `'en'` | Use this when the dictionary is specific to a single locale rather than containing translations for multiple locales. |
840
+ | `contentAutoTransformation` | Automatically transforms content strings into typed nodes (markdown, HTML, or insertion). | `boolean` &#124; <br/> `{ markdown?: boolean; html?: boolean; insertion?: boolean }` | `false` | `true` | • Markdown: `### Title` → `md('### Title')`.<br/>• HTML: `<div>Title</div>` → `html('<div>Title</div>')`.<br/>• Insertion: `Hello {{name}}` → `insert('Hello {{name}}')`. |
841
+ | `location` | Indicates where dictionary files are stored and their CMS synchronization mode. | `'local'` &#124; <br/> `'remote'` &#124; <br/> `'hybrid'` &#124; <br/> `'plugin'` &#124; <br/> `string` | `'local'` | `'hybrid'` | • `'local'`: managed locally only.<br/>• `'remote'`: managed remotely only (CMS).<br/>• `'hybrid'`: managed both locally and remotely.<br/>• `'plugin'` or custom string: managed by a plugin or custom source. |
842
+ | `importMode` | Controls how dictionaries are imported. | `'static'` &#124; <br/> `'dynamic'` &#124; <br/> `'fetch'` | `'static'` | `'dynamic'` | `'static'`: imported statically (replaces `useIntlayer` with `useDictionary`).<br/>• `'dynamic'`: imported dynamically via Suspense (replaces with `useDictionaryDynamic`).<br/>• `'fetch'`: fetched via live sync API; falls back to `'dynamic'` on failure.<br/>• Relies on `@intlayer/babel` and `@intlayer/swc` plugins.<br/>• Keys must be declared statically.<br/>• Ignored if `optimize` is disabled.<br/>• Does not affect `getIntlayer`, `getDictionary`, `useDictionary`, etc. |
843
+ | `priority` | Priority of the dictionary. Higher values take precedence over lower ones when resolving conflicts between dictionaries. | `number` | `undefined` | `1` | |
844
+ | `live` | Deprecated — use `importMode: 'fetch'` instead. Indicated whether dictionary content was fetched dynamically via the live sync API. | `boolean` | `undefined` | | Renamed to `importMode: 'fetch'` in v8.0.0. |
845
+ | `schema` | Auto-generated by Intlayer for JSON schema validation. | `'https://intlayer.org/schema.json'` | auto-generated | | Do not modify manually. |
846
+ | `title` | Helps identify the dictionary in the editor and CMS. | `string` | `undefined` | `'User Profile'` | |
847
+ | `tags` | Categorizes dictionaries and provides context or instructions for the editor and AI. | `string[]` | `undefined` | `['user', 'profile']` | |
848
+ | `version` | Version of the remote dictionary; helps track which version is currently in use. | `string` | `undefined` | `'1.0.0'` | • Manageable on the CMS.<br/>• Do not modify locally. |
849
849
 
850
850
  **`fill` example**:
851
851
 
@@ -865,10 +865,10 @@ dictionary: {
865
865
 
866
866
  Settings that control the logger, including the prefix to use.
867
867
 
868
- | Field | Type | Description | Example | Note |
869
- | -------- | ---------------------------------------------- | ------------------------------------------------------ | ----------------------- | -------------------------------------------------------------------------------------- |
870
- | `mode` | `'default' &#124; 'verbose' &#124; 'disabled'` | Indicates the mode of the logger. Default: `'default'` | `'verbose'` | `'verbose'`: logs more info for debugging. `'disabled'`: disables the logger entirely. |
871
- | `prefix` | `string` | The prefix of the logger. Default: `'[intlayer] '` | `'[my custom prefix] '` | |
868
+ | Field | Description | Type | Default | Example | Note |
869
+ | -------- | --------------------------------- | -------------------------------------------------------------- | --------------- | ---------------------- | ---------------------------------------------------------------------------------------------- |
870
+ | `mode` | Indicates the mode of the logger. | `'default'` &#124; <br/> `'verbose'` &#124; <br/> `'disabled'` | `'default'` | `'verbose'` | `'verbose'`: logs more info for debugging.<br/>• `'disabled'`: disables the logger entirely. |
871
+ | `prefix` | The prefix of the logger. | `string` | `'[intlayer] '` | `'[my custom prefix] '` | |
872
872
 
873
873
  ### AI Configuration
874
874
 
@@ -899,15 +899,15 @@ Intlayer supports multiple AI providers for enhanced flexibility and choice. Cur
899
899
  - **Together.ai**
900
900
  - **ollama**
901
901
 
902
- | Field | Type | Description | Example | Note |
903
- | -------------------- | ---------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
904
- | `provider` | `string` | The provider to use for the AI features of Intlayer. Default: `'openai'` | `'anthropic'` | Options: `'openai'`, `'anthropic'`, `'mistral'`, `'deepseek'`, `'gemini'`, `'ollama'`, `'openrouter'`, `'alibaba'`, `'fireworks'`, `'groq'`, `'huggingface'`, `'bedrock'`, `'googleaistudio'`, `'googlevertex'`, `'togetherai'`. Different providers require different API keys and have different pricing. |
905
- | `model` | `string` | The model to use for AI features. Default: None | `'gpt-4o-2024-11-20'` | Specific model varies by provider. |
906
- | `temperature` | `number` | Controls the randomness of AI responses. Default: None | `0.1` | Higher temperature = more creative and less predictable. |
907
- | `apiKey` | `string` | Your API key for the selected provider. Default: None | `process.env.OPENAI_API_KEY` | Keep secret; store in environment variables. |
908
- | `applicationContext` | `string` | Additional context about your application to help the AI generate more accurate translations (domain, audience, tone, terminology). Default: None | `'My application context'` | Can be used to add rules (e.g. `"You should not transform urls"`). |
909
- | `baseURL` | `string` | The base URL for the AI API. Default: None | `'https://api.openai.com/v1'`, `'http://localhost:5000'` | Can point to a local or custom AI API endpoint. |
910
- | `dataSerialization` | `'json' &#124; 'toon'` | Data serialization format for AI features. Default: `'json'` | `'toon'` | `'json'`: standard, reliable; uses more tokens. `'toon'`: fewer tokens, less consistent. Additional parameters are passed to the AI model as context (reasoning effort, verbosity, etc.). |
902
+ | Field | Description | Type | Default | Example | Note |
903
+ | -------------------- | ----------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------- | ------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
904
+ | `provider` | The provider to use for the AI features of Intlayer. | `'openai'` &#124; <br/> `'anthropic'` &#124; <br/> `'mistral'` &#124; <br/> `'deepseek'` &#124; <br/> `'gemini'` &#124; <br/> `'ollama'` &#124; <br/> `'openrouter'` &#124; <br/> `'alibaba'` &#124; <br/> `'fireworks'` &#124; <br/> `'groq'` &#124; <br/> `'huggingface'` &#124; <br/> `'bedrock'` &#124; <br/> `'googleaistudio'` &#124; <br/> `'googlevertex'` &#124; <br/> `'togetherai'` | `undefined` | `'anthropic'` | Different providers require different API keys and have different pricing. |
905
+ | `model` | The model to use for AI features. | `string` | None | `'gpt-4o-2024-11-20'` | Specific model varies by provider. |
906
+ | `temperature` | Controls the randomness of AI responses. | `number` | None | `0.1` | Higher temperature = more creative and less predictable. |
907
+ | `apiKey` | Your API key for the selected provider. | `string` | None | `process.env.OPENAI_API_KEY` | Keep secret; store in environment variables. |
908
+ | `applicationContext` | Additional context about your application to help the AI generate more accurate translations (domain, audience, tone, terminology). | `string` | None | `'My application context'` | Can be used to add rules (e.g. `"You should not transform urls"`). |
909
+ | `baseURL` | The base URL for the AI API. | `string` | None | `'https://api.openai.com/v1'` <br/> `'http://localhost:5000'` | Can point to a local or custom AI API endpoint. |
910
+ | `dataSerialization` | Data serialization format for AI features. | `'json'` &#124; <br/> `'toon'` | `undefined` | `'toon'` | `'json'`: standard, reliable; uses more tokens.<br/>• `'toon'`: fewer tokens, less consistent.<br/>• Additional parameters are passed to the AI model as context (reasoning effort, verbosity, etc.). |
911
911
 
912
912
  ### Build Configuration
913
913
 
@@ -919,13 +919,13 @@ Build options apply to the `@intlayer/babel` and `@intlayer/swc` plugins.
919
919
 
920
920
  > When optimized, Intlayer will replace dictionary calls to optimize chunking, so the final bundle only imports dictionaries that are actually used.
921
921
 
922
- | Field | Type | Description | Example | Note |
923
- | ----------------- | ------------------------ | --------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
924
- | `mode` | `'auto' &#124; 'manual'` | Controls the mode of the build. Default: `'auto'` | `'manual'` | `'auto'`: build enabled automatically when the application is built. `'manual'`: only runs when the build command is executed. Can be used to disable dictionary builds (e.g. to avoid running in Node.js environments). |
925
- | `optimize` | `boolean` | Controls whether the build should be optimized. Default: `undefined` | `process.env.NODE_ENV === 'production'` | If unset, optimization is triggered on framework build (Vite/Next.js). `true` forces optimization including dev mode. `false` disables it. When enabled, replaces dictionary calls to optimize chunking — only used dictionaries are imported. Relies on `@intlayer/babel` and `@intlayer/swc` plugins. Keys must be declared statically. |
926
- | `checkTypes` | `boolean` | Indicates if the build should check TypeScript types and log errors. Default: `false` | | Can slow down the build. |
927
- | `outputFormat` | `('esm' &#124; 'cjs')[]` | Controls the output format of the dictionaries. Default: `['cjs', 'esm']` | `['cjs']` | |
928
- | `traversePattern` | `string[]` | Patterns defining which files to traverse during optimization. Default: `['**/*.{js,ts,mjs,cjs,jsx,tsx}', '!**/node_modules/**']` | `['src/**/*.{ts,tsx}', '../ui-library/**/*.{ts,tsx}', '!**/node_modules/**']` | Limit optimization to relevant files to improve build performance. Ignored if `optimize` is disabled. Uses glob pattern. |
922
+ | Field | Description | Type | Default | Example | Note |
923
+ | ----------------- | -------------------------------------------------------------------- | -------------------------------- | --------------------------------------------------------- | ----------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
924
+ | `mode` | Controls the mode of the build. | `'auto'` &#124; <br/> `'manual'` | `'auto'` | `'manual'` | `'auto'`: build enabled automatically when the application is built.<br/>• `'manual'`: only runs when the build command is executed.<br/>• Can be used to disable dictionary builds (e.g. to avoid running in Node.js environments). |
925
+ | `optimize` | Controls whether the build should be optimized. | `boolean` | `undefined` | `process.env.NODE_ENV === 'production'` | If unset, optimization is triggered on framework build (Vite/Next.js).<br/>• `true` forces optimization including dev mode.<br/>• `false` disables it.<br/>• When enabled, replaces dictionary calls to optimize chunking — only used dictionaries are imported.<br/>• Relies on `@intlayer/babel` and `@intlayer/swc` plugins.<br/>• Keys must be declared statically. |
926
+ | `checkTypes` | Indicates if the build should check TypeScript types and log errors. | `boolean` | `false` | | Can slow down the build. |
927
+ | `outputFormat` | Controls the output format of the dictionaries. | `('esm' &#124; 'cjs')[]` | `['esm', 'cjs']` | `['cjs']` | |
928
+ | `traversePattern` | Patterns defining which files to traverse during optimization. | `string[]` | `['**/*.{tsx,ts,js,mjs,cjs,jsx,vue,svelte,svte}', '!**/node_modules/**', '!**/dist/**', '!**/.intlayer/**', '!**/*.config.*', '!**/*.test.*', '!**/*.spec.*', '!**/*.stories.*']` | `['src/**/*.{ts,tsx}', '../ui-library/**/*.{ts,tsx}', '!**/node_modules/**']` | Limit optimization to relevant files to improve build performance.<br/>• Ignored if `optimize` is disabled.<br/>• Uses glob pattern. |
929
929
 
930
930
  ---
931
931
 
@@ -933,47 +933,25 @@ Build options apply to the `@intlayer/babel` and `@intlayer/swc` plugins.
933
933
 
934
934
  Settings that control the Intlayer compiler, which extracts dictionaries straight from your components.
935
935
 
936
- | Field | Type | Description | Example | Note |
937
- | --------------------- | ----------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
938
- | `enabled` | `boolean &#124; 'build-only'` | Indicates if the compiler should be enabled to extract dictionaries. Default: `true` | `'build-only'` | `'build-only'` skips the compiler during development to speed up builds; only runs on build commands. |
939
- | `dictionaryKeyPrefix` | `string` | Prefix for the extracted dictionary keys. Default: `''` | `'my-key-'` | Added to the generated key (based on file name) to prevent conflicts. |
940
- | `saveComponents` | `boolean` | Indicates if components should be saved after being transformed. Default: `false` | | If `true`, replaces original files with transformed files. The compiler can then be removed after one run. |
941
- | `transformPattern` | `string &#124; string[]` | Patterns defining which files to traverse during optimization. Default: `['**/*.{ts,tsx,jsx,js,cjs,mjs,svelte,vue}', '!**/node_modules/**']` | `['src/**/*.{ts,tsx}', '!**/node_modules/**']` | Limit to relevant code files to improve build performance. |
942
- | `excludePattern` | `string &#124; string[]` | Patterns defining which files to exclude during optimization. Default: `['**/node_modules/**']` | `['**/node_modules/**', '!**/node_modules/react/**']` | |
943
- | `output` | `boolean &#124; FilePathPattern &#124; Partial<Record<Locale, boolean &#124; FilePathPattern>>` | Defines the output file path. Replaces `outputDir`. Supports template variables: `{{fileName}}`, `{{key}}`, `{{locale}}`, `{{extension}}`, `{{componentFileName}}`, `{{componentExtension}}`, `{{format}}`, `{{componentFormat}}`, `{{componentDirPath}}`. Default: `undefined` | See examples below | `./` paths resolve relative to the component directory. `/` paths resolve relative to the project root. Including `{{locale}}` generates separate per-locale dictionaries. Supports per-locale object notation; `false` skips that locale. |
944
- | `noMetadata` | `boolean` | If `true`, the compiler omits dictionary metadata (key, content wrapper) from the output. Default: `false` | | Useful for i18next or ICU MessageFormat JSON outputs. Works well with `loadJSON` plugin. |
936
+ | Field | Description | Type | Default | Example | Note |
937
+ | --------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------- | ----------- | -------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
938
+ | `enabled` | Indicates if the compiler should be enabled to extract dictionaries. | `boolean` &#124; <br/> `'build-only'` | `true` | `'build-only'` | `'build-only'` skips the compiler during development to speed up builds; only runs on build commands. |
939
+ | `dictionaryKeyPrefix` | Prefix for the extracted dictionary keys. | `string` | `''` | `'my-key-'` | Added to the generated key (based on file name) to prevent conflicts. |
940
+ | `saveComponents` | Indicates if components should be saved after being transformed. | `boolean` | `false` | | If `true`, replaces original files with transformed files.<br/>• The compiler can then be removed after one run. |
941
+ | `output` | Defines the output file path. Replaces `outputDir`. Supports template variables: `{{fileName}}`, <br/> `{{key}}`, <br/> `{{locale}}`, <br/> `{{extension}}`, <br/> `{{componentFileName}}`, <br/> `{{componentExtension}}`, <br/> `{{format}}`, <br/> `{{componentFormat}}`, <br/> `{{componentDirPath}}`. | `boolean` &#124; <br/> `FilePathPattern` &#124; <br/> `Partial<Record<Locale, boolean &#124; FilePathPattern>>` | `undefined` | `'./{{fileName}}{{extension}}'` <br/> `'/locales/{{locale}}/{{key}}.json'` <br/> `{ en: ({ key }) => './locales/en/${key}.json', fr: '...', es: false }` | `./` paths resolve relative to the component directory.<br/>• `/` paths resolve relative to the project root.<br/>• Including `{{locale}}` generates separate per-locale dictionaries.<br/>• Supports per-locale object notation; `false` skips that locale. |
942
+ | `noMetadata` | If `true`, the compiler omits dictionary metadata (key, content wrapper) from the output. | `boolean` | `false` | `false` → `{"key":"my-key","content":{"key":"value"}}` <br/> `true` → `{"key":"value"}` | • Useful for i18next or ICU MessageFormat JSON outputs.<br/>• Works well with `loadJSON` plugin. |
943
+ | `dictionaryKeyPrefix` | Dictionary key prefix | `string` | `''` | | Add an optional prefix for the extracted dictionary keys |
945
944
 
946
- **`output` examples**:
945
+ ### Custom Schemas
947
946
 
948
- - Multilingual file near component: `'./{{fileName}}{{extension}}'` or `({ fileName, extension }) => \`./${fileName}${extension}\``
949
- - Centralized per-locale JSON: `'/locales/{{locale}}/{{key}}.content.json'` or `({ key, locale }) => \`/locales/${locale}/${key}.content.json\``
950
- - Object per-locale (different pattern per locale, skip some):
947
+ | Field | Description | Type |
948
+ | --------- | --------------------------------------------------------------------------------- | --------------------------- |
949
+ | `schemas` | Permet de définir des schémas Zod pour valider la structure de vos dictionnaires. | `Record<string, ZodSchema>` |
951
950
 
952
- ```ts
953
- output: {
954
- en: ({ key }) => `./locales/en/${key}.json`,
955
- fr: '/locales/fr/{{key}}.content.json',
956
- es: false, // skip Spanish
957
- }
958
- ```
959
-
960
- **`noMetadata` example**:
961
-
962
- If `true`:
963
-
964
- ```json
965
- {
966
- "key": "value"
967
- }
968
- ```
951
+ ---
969
952
 
970
- If `false`:
953
+ ### Plugins
971
954
 
972
- ```json
973
- {
974
- "key": "value",
975
- "content": {
976
- "key": "value"
977
- }
978
- }
979
- ```
955
+ | Field | Description | Type |
956
+ | --------- | ------------------------------------- | ------------------ |
957
+ | `plugins` | Liste des plugins Intlayer à activer. | `IntlayerPlugin[]` |