Skip to content

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

NameTypeRequiredDescription
localesLocaleControls<TLocale>Yes
strategyRemixLocaleStrategyYes
loadMessages(locale: TLocale) => CompiledCatalogMessages | Promise<CompiledCatalogMessages>NoSynchronous or asynchronous executable catalog loader. Omit when using a registry.
catalogVersionstringNoDeployment version for client catalog assets. Defaults to a deterministic
digest of the executable catalog asset each locale serves.
catalogAssetsRemixCatalogAssetOptions<TLocale>NoConfiguration 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.
i18nOptionsRemixI18nOptions | RemixI18nOptionsResolver<TLocale>NoFormatting options for each request's i18n instance, such as timeZone,
or a function that returns them for the request and its resolved locale.
failureMessagestringNoMessage of the error run() and middleware() throw when the locale,
i18nOptions, or catalog cannot be resolved; the original error is its cause.
routeParamstringNo
cookieNamestringNo
cookieMaxAgenumberNo

Source entry on GitHub

Last updated: November 1, 2026