Exports and peers
Verify TanStack i18n package entry points and subpath exports. Inspect required and optional peer dependencies for React and Solid.
@wadiou/tanstack-i18n ships as a core entry plus framework subpaths. Install the core package first, then add subpaths for the stack you actually use.
Subpath exports
| Subpath | Purpose | Guide |
|---|---|---|
@wadiou/tanstack-i18n | defineLocaleConfig, createLocaleRuntime, and core constants/types | Configuration, Locale runtime |
@wadiou/tanstack-i18n/adapters | Adapter factories (cookie, localStorage, acceptLanguage, custom); serverFncustom | Adapters |
@wadiou/tanstack-i18n/react-router | createNavigation for React (createToLocalizedRoute | TanStack Router |
@wadiou/tanstack-i18n/solid-router | createNavigation for Solid (createToLocalizedRoute | TanStack Router |
@wadiou/tanstack-i18n/react | createLocaleProvider, useLocaleContext | Change locale, use-intl |
@wadiou/tanstack-i18n/solid | Solid createLocaleProvider | Change locale |
@wadiou/tanstack-i18n/react-start | createStartLocaleHelpers — exposes locale.server.createServerEntry and isomorphic getLocale | TanStack Start |
@wadiou/tanstack-i18n/solid-start | createStartLocaleHelpers — exposes locale.server.createServerEntry and isomorphic getLocale for Solid | TanStack Start |
The core entry covers locale config and runtime. Adapters are loaded from the /adapters subpath. Other subpaths add framework bindings — you do not need every subpath on day one.
Peer dependencies
Peers are optional — install only what your stack uses:
| Entry | Peers |
|---|---|
@wadiou/tanstack-i18n | — |
@wadiou/tanstack-i18n/react | react |
@wadiou/tanstack-i18n/solid | solid-js |
@wadiou/tanstack-i18n/react-router | @tanstack/react-router |
@wadiou/tanstack-i18n/solid-router | @tanstack/solid-router |
@wadiou/tanstack-i18n/react-start | @tanstack/react-start |
@wadiou/tanstack-i18n/solid-start | @tanstack/solid-start |
Install only what you need
- React + TanStack Start and Router — core,
@wadiou/tanstack-i18n/react,@wadiou/tanstack-i18n/react-router, and@wadiou/tanstack-i18n/react-startwhen you wire routing and the server entry. - Solid — core,
@wadiou/tanstack-i18n/solid,@wadiou/tanstack-i18n/solid-router, and@wadiou/tanstack-i18n/solid-startfor the same roles.
See Install for package manager commands and a first config snippet.
Default constants
Exported from the core entry for docs and custom adapters:
| Constant | Value | Used when |
|---|---|---|
DEFAULT_URL_PREFIX | "as-needed" | url.prefix omitted |
DEFAULT_COOKIE_NAME | "LOCALE" | cookie() with no name |
DEFAULT_DETECTED_LOCALE_HEADER | "X-Locale-Detected" | firstVisit.detectedLocaleHeader omitted |
Full normalization table: Configuration — Defaults at a glance.
For runtime guarantees (redirects, getLocale order), see Behavior contract.
Type details live in package JSDoc and .d.ts files — there are no generated TypeDoc pages in v1.