Remix i18n · Server and browser
Remix i18n, from the request to the browser.
The new Remix is not React Router Framework Mode and it is not a React framework. Palamedes composes with its Node TypeScript loader, browser asset server, Fetch request model, and Remix component runtime so one locale reaches SSR, Frames, hydration, and interaction.
Palamedes 2.0 is out. Read the release notes.
- Integration
- Node + assets
- Verified against
- Remix 3.0.0
- Current scope
- Full stack
- Locale models
- 4 browser proofs
Post-compile transforms for server and browser modules.
Exact example pin with smoke and Chromium verification.
Server scope, browser macros, rich messages, and catalog bootstrap.
Cookie, route, subdomain, and TLD with browser verification.
@palamedes/remixv2.2.0876 downloads / month01 — The framework problem
Remix splits full-stack compilation across two post-compile loaders.
Server TypeScript flows through Node while browser modules flow through the asset server. A complete integration must transform both outputs, keep request state isolated, and install the matching catalog before translated client code runs.
02 — The Palamedes model
Join both Remix loaders, then carry one locale through the document.
Palamedes transforms the JavaScript Remix already compiled, shares immutable server catalogs, and delivers executable active-locale fragments through the asset server before translated browser modules run.
A composable Node loader
Register remix/node-tsx first and @palamedes/remix/register second. Macro-containing server modules are transformed once when Node loads them.
A post-compile asset loader
createPalamedesRemixAssetLoader() transforms ordinary and rich browser macros before Remix resolves imports, HMR boundaries, source maps, and minification.
Shared registry, automatic browser delivery
One catalog asset registry serves both the server scope and browser loader. The adapter derives message dependencies and initializes browser delivery; application code supplies locale policy and ordinary error UI.
03 — In TypeScript
Connect server catalogs and browser fragments through one registry.
server catalog and asset configuration
// package.json
{
"scripts": {
"start": "node --import remix/node-tsx --import @palamedes/remix/register server.ts"
}
}
// server.ts
import {
createPalamedesRemixAssetLoader,
createPalamedesRemixCatalogAssetRegistry,
PALAMEDES_REMIX_ASSET_PACKAGES,
} from "@palamedes/remix"
import { defineLocaleControls } from "@palamedes/core/locale"
import { createRemixI18nServer } from "@palamedes/remix/server"
import { createAssetServer } from "remix/assets"
const catalogAssets = createPalamedesRemixCatalogAssetRegistry()
const remixI18n = createRemixI18nServer({
locales: defineLocaleControls({ locales: ["en", "de"], defaultLocale: "en" }),
strategy: "cookie",
catalogAssets: { registry: catalogAssets },
})
const assets = createAssetServer({
basePath: "/assets",
allowFiles: ["app/**/public/**"],
allowPackages: ["remix", ...PALAMEDES_REMIX_ASSET_PACKAGES],
sourceMaps: process.env.NODE_ENV === "development" ? "external" : undefined,
scripts: {
loaders: [createPalamedesRemixAssetLoader({ catalogAssets })],
},
})
// Serve catalogAssets.serve(request) and remixI18n.serveClientCatalogAsset(request)
// before assets.fetch(request) under the asset namespace.The full example renders remixI18n.renderClientCatalog(locale) and await renderClientEntry(entryPath, { assetServer }) inside the request scope. The adapter loads dependencies and imports the application entry. Rich messages use @palamedes/remix/macro; initial and lazy delivery failures reach ordinary error UI.
04 — Locale strategy
Choose the URL model that fits your Remix product.
The same server helper supports cookie, route, subdomain, and TLD decisions. Every strategy verifies SSR, browser macros and rich messages, interaction, Frames, locale navigation, reloads, and catalog failure recovery under CSP.
Cookie
One URL for all locales. Useful for signed-in apps; an explicit language choice is persisted and opens a new document in that locale.
Route segment
/de/checkout-style paths. The SEO-friendly default for public content with indexable localized pages.
Subdomain
de.example.com. Clean separation per market, works well with regional CDNs and analytics splits.
05 — Proof and boundaries
Four complete server and browser proofs.
Remix remains separate from React Router Framework Mode. CI starts all four locale-strategy servers and runs Chromium against every strategy with SSR, hydration, rich messages, interaction, and locale navigation.
- Transforms
- Server + browser
- Catalog path
- Compiled ESM
- Remix components
- Rich + Frames
- Hosting
- Live HTTPS
Ordinary and rich macros are checked after Remix compilation.
Active-locale fragments and parser-free browser delivery are checked.
Rich elements, streamed Frames, and direct frame requests are covered.
All four strategies pass their public browser contracts.
06 — Questions
Remix i18n questions, answered
The short version of the decisions that usually block an implementation.
- Is Remix the same thing as React Router Framework Mode?
- No. React Router Framework Mode remains a React framework with a Vite plugin, route modules, loaders, and actions. Remix is a separate server-first full-stack project with its own packages, router, loaders, UI direction, and runtime model.
- Does Palamedes support Remix without React?
- Yes. The integration uses Remix components rather than React. It transforms ordinary core macros plus Remix-native Trans, Plural, Select, and SelectOrdinal components in server and browser modules.
- Can Remix browser modules use Palamedes macros?
- Yes. Share one createPalamedesRemixCatalogAssetRegistry() between the server and asset loader, allow PALAMEDES_REMIX_ASSET_PACKAGES, and render the adapter's client entry. It loads active-locale fragments before translated modules run; browser PO imports remain unsupported.
- Is Remix support production-ready?
- Yes. The adapter is Stable for remix@^3.0.0 and verified with Remix 3.0.0. All four strategies are verified in CI and on public HTTPS hosts, including Chromium interaction, Frames, and recovery.
07 — Keep exploring