Remix / server: RemixI18nServerOptions
Functions, types, and exports for Remix / server: RemixI18nServerOptions.
Page outline
import type { RemixI18nServerOptions } from "@palamedes/remix/server"
type RemixI18nServerOptions<TLocale extends string> = {
locales: LocaleControls<TLocale>;
strategy: RemixLocaleStrategy;
/** Synchronous or asynchronous executable catalog loader. Omit when using a registry. */
loadMessages?: (locale: TLocale) => CompiledCatalogMessages | Promise<CompiledCatalogMessages>;
/**
* Deployment version for client catalog assets. Defaults to a deterministic
* digest of the executable catalog asset each locale serves.
*/
catalogVersion?: string;
/**
* Configuration for adapter-owned executable browser catalog assets. The
* adapter compiles the requested locale into an ESM module and serves it
* through `serveClientCatalogAsset()`; no catalog functions cross JSON.
*/
catalogAssets?: RemixCatalogAssetOptions<TLocale>;
/**
* Formatting options for each request's i18n instance, such as `timeZone`,
* or a function that returns them for the request and its resolved locale.
*/
i18nOptions?: RemixI18nOptions | RemixI18nOptionsResolver<TLocale>;
/**
* Message of the error `run()` and `middleware()` throw when the locale,
* `i18nOptions`, or catalog cannot be resolved; the original error is its `cause`.
*/
failureMessage?: string;
routeParam?: string;
cookieName?: string;
cookieMaxAge?: number;
};
Properties
| Name | Type | Required | Description |
|---|---|---|---|
locales | LocaleControls<TLocale> | Yes | |
strategy | RemixLocaleStrategy | Yes | |
loadMessages | (locale: TLocale) => CompiledCatalogMessages | Promise<CompiledCatalogMessages> | No | Synchronous or asynchronous executable catalog loader. Omit when using a registry. |
catalogVersion | string | No | Deployment version for client catalog assets. Defaults to a deterministic digest of the executable catalog asset each locale serves. |
catalogAssets | RemixCatalogAssetOptions<TLocale> | No | Configuration for adapter-owned executable browser catalog assets. The adapter compiles the requested locale into an ESM module and serves it through serveClientCatalogAsset(); no catalog functions cross JSON. |
i18nOptions | RemixI18nOptions | RemixI18nOptionsResolver<TLocale> | No | Formatting options for each request's i18n instance, such as timeZone,or a function that returns them for the request and its resolved locale. |
failureMessage | string | No | Message of the error run() and middleware() throw when the locale,i18nOptions, or catalog cannot be resolved; the original error is its cause. |
routeParam | string | No | |
cookieName | string | No | |
cookieMaxAge | number | No |
Last updated: November 1, 2026