Config
Config defines the boundary of a translation system.
It contains no executable logic and introduces no side effects.
Below is a minimal configuration example:
import { defineIntorConfig } from "intor"; export const intorConfig = defineIntorConfig({ defaultLocale: "en", supportedLocales: ["en", "fr"], });
Define
intorConfigin a dedicated file and export it as the only export.
This ensures reliable static analysis and CLI detection.
Overview
Config is composed of the following sections:
- Locale : Defines the locales supported and used by the system.
- Messages : Provides static translation messages directly used by the system.
- Translator : Defines display behavior during translation.
- Routing : Defines how locale resolution and navigation are configured.
- Persistence : Defines the strategy for persisting locale state.
- Loader : Defines how translation content is loaded into the system.
- Observability : Defines logging and diagnostic behavior.