
Web i18n: An Engineering Guide
Every multilingual site rests on a code-level i18n layer that translation cannot supply. The working model: six surfaces, the engineer's decisions, and what is stable to build on.
TL;DR: Every multilingual site rests on a code-level internationalization layer, and that layer cannot be added by translating strings — it is engineering: key architecture, message grammar, formatting APIs, locale routing, layout resilience, and testing. This guide gives you the working model for that layer: its six surfaces, the decisions the implementing engineer owns, and an honest ledger of which standards are stable to build on and which are still moving.
The layer translation cannot fix
A common way for a multilingual site to fail is also a predictable one. A team ships a successful single-language product, a second market arrives, and the plan becomes "translate the strings." Someone exports the English text, someone translates it, and the translated words go back into the same code — the same concatenated sentences, the same hardcoded date formats, the same two-branch plural logic, the same layouts sized to English labels. The words are now German or Arabic or Japanese. The product is still English underneath, and it shows: sentences assembled in the wrong order, "1 items", dates that read as the wrong month, buttons whose labels no longer fit inside them.
The distinction that untangles this is decades old and worth stating precisely. Internationalization (i18n) is the engineering that makes a codebase capable of serving any locale: strings externalized behind keys, messages that carry their own grammar, formatting computed from locale data, routing and fallback designed rather than accidental. Localization is the per-market work that fills that capability — translated content, market conventions, service and legal decisions per country. The W3C's working definition draws this line: internationalization is "the design and development of a product, application or document content that enables easy localization for target audiences that vary in culture, region, or language," and the same page names designers and developers as the people who internationalize products. On a web product, the code-level part of that work is engineering, and it belongs to engineers. This topic is about the first half. Market strategy, translation vendors, per-market payments and legal pages, and search architecture across locales are the localization literature's territory — a different altitude with its own decisions.
What makes the engineering half worth a deliberate investment is that its problems are permanent. Plural rules, time zones, text direction, and locale formats are properties of human languages and geography, not of any framework. Russian will have more plural forms than English regardless of which library is fashionable this year; a calendar date forced through a timestamp can shift across midnight when it is displayed in a different time zone — in JavaScript, for example, a date-only string such as "2026-03-01" is parsed as UTC. Frameworks and libraries cycle; the craft underneath them does not. That is exactly why the i18n layer deserves engineering ownership rather than a one-time setup task — the bugs it prevents will otherwise keep arriving for the lifetime of the product.
There is also a cost asymmetry to be honest about up front. Retrofitting i18n into a shipped single-locale codebase means touching nearly every user-facing string and most user-facing components: extracting text from hundreds of files, inventing a key scheme after the fact, re-specifying layouts that were pixel-fit to English. Building the layer before the second locale — even a thin version of it — is the cheap path. The rest of this guide maps what that layer contains, so the investment can be scoped instead of discovered.
Anatomy of the i18n layer
A working model makes the layer tractable. Whatever the stack, a complete i18n layer has six surfaces, and each is a place where a deliberate decision beats an accidental one.
| Surface | What it decides | The failure when it is skipped |
|---|---|---|
| Message externalization | Strings leave the code; keys and catalogs become the contract | Hardcoded text that no translator can reach |
| Message grammar | How plurals, gender, and variants are expressed per message | "1 items" logic that breaks in many languages |
| Data formatting | How dates, numbers, lists, and relative time render per locale | String templates that are wrong in many locales other than home |
| Locale plumbing | How locales route, negotiate, and fall back | Users trapped in the wrong language; mixed-language pages |
| Layout resilience | How components hold text of any length | Truncated buttons and crushed columns in longer languages |
| Verification | How i18n defects are caught before translation | Every defect found one translation round trip too late |
Message externalization is the base move: user-facing text lives in catalogs, addressed by keys, and the key architecture — what a key names, how catalogs are organized, what context travels to translators — is the contract everything else builds on. Message grammar is what separates working i18n from string interpolation: plurals and variants belong inside the message, resolved per locale by rules, which is what ICU MessageFormat exists to express. Data formatting is the surface the platform mostly solves — the ECMAScript Intl API computes dates, numbers, collation, and more from locale data that the browser or runtime provides; which locales and localizations are covered is implementation-dependent (ECMA-402 §4.4). Locale plumbing is where the chosen locale lives in URLs, how a request negotiates against the supported list, and what happens when a translation is missing. Layout resilience accepts that English is the narrow case and specifies components for variable-length text. Verification closes the loop, with pseudo-localization as the harness that makes the other five checkable before a single translator is paid.
The surfaces are coupled, and the coupling is where teams get surprised. A key architecture that hardcodes English's singular and plural as two keys, chosen in application code, blocks correct grammar later. A routing scheme chosen casually constrains static generation, caching, and fallback for the life of the site. Formatting done with string templates instead of locale-aware APIs turns every new locale into a bug hunt across the whole codebase. Early surfaces constrain late ones — which is why the two foundations below are decided first.
One more property of the model matters: the load-bearing parts are standards, not libraries. BCP 47 defines the locale tags everything keys on. Unicode CLDR is the locale data — plural rules, formats, collation — that ECMA-402 recommends JavaScript implementations use for its formatters — dates, numbers, plural rules, lists, and others — and the CLDR project lists Google (including Chrome), Apple, and Mozilla among its users. ICU MessageFormat is the established message-grammar syntax. The Intl API is the standard formatting surface (ECMA-402) that browsers and default Node.js builds expose to JavaScript. Libraries wrap these; they do not replace them. An engineer who knows the standards can evaluate a library quickly. The reverse is not true, and teams that only know their library's API tend to rediscover that during migrations.
The decisions the implementing engineer owns
Owning the i18n layer means working through a chain of decisions, roughly in the order they arrive.
Two foundations come first, because everything else inherits them. Translation key architecture decides what a key names, how catalogs are organized into namespaces, and what context — descriptions, length hints, placeholder explanations — travels with each string to the people translating it. Keys are an API: renaming them casually invalidates paid translation work the way renaming fields breaks API clients. Message grammar strategy decides how plurals, gender, and variants are expressed — in practice, how ICU MessageFormat is used, since grammatical variation belongs inside the message rather than in application code branching on counts.
Then the plumbing decisions. The URL strategy for locales — path prefix, subdomain, or separate domain — is an engineering trade-off in routing, rendering, static-generation fan-out, and cache keying, and it is expensive to reverse after launch. The fallback chain decides what happens when a requested locale, or a single string in it, is not available: which locale substitutes, whether the substitution is visible, and what never falls back (legal and contractual copy). And the execution question — where formatting runs — matters more than it looks: a value formatted on the server in one locale and re-formatted on the client in another is the i18n flavor of hydration mismatch, and the fix is one computation authority per rendered value.
Then the resilience decisions. Layouts get specified for variable-length text rather than English-length text — text translated from English normally runs longer, and on IBM's averages for English into European languages, the shorter the source string, the higher the likely expansion. That is not true for every string, and some translations run shorter. And a pseudo-localization gate goes into CI: a machine-transformed fake locale whose accents, padding, and delimiters expose hardcoded strings, concatenation, and truncation with zero translators involved. It is a cheap quality gate, because it needs no translators, and wiring it early surfaces structural defects before the first real locale launch.
Each of these decisions has a dedicated, deeper treatment on this topic: the key architecture and ICU MessageFormat foundations, the Intl API surface, dates and time zones, locale routing, locale fallback, message catalogs and their pipeline, library selection, text expansion, pseudo-localization, localized content modeling, and the performance budget of the whole layer. This guide holds the model together; the depth lives in the articles.
The boundaries are equally deliberate. Which markets to enter, what services and payment methods each market needs, translation vendors and transcreation quality, hreflang and international SEO architecture, locale-detection signals and language-switcher UX, right-to-left direction systems, and script typography are all real disciplines — and all of them belong to the market-facing localization literature rather than to this topic. The line is simple: this topic starts where the code starts, with a locale already chosen and a string about to render.
The standards, and what is still moving
An honest guide to this layer has to separate what is stable from what is churning, because the two get conflated in exactly the way that burns teams.
The stable core is genuinely stable, and it is most of the layer. BCP 47 tags, CLDR locale data, classic ICU MessageFormat as implemented in established libraries such as FormatJS, and the widely supported members of the Intl API are long-established standards — CLDR since 2003, the Intl API since 2012 — with implementations in browsers and in Node.js. A team can build its entire externalization, grammar, and formatting architecture on them today with no meaningful standards risk. This is also the performance-friendly path: Intl formatting uses locale data that the browser or runtime provides rather than data in your bundle, so that part of the layer is one the client already has.
The moving edge deserves precise dates. Unicode MessageFormat 2.0 — the designed successor to classic ICU MessageFormat — is a stable Unicode specification: it reached stable status in LDML 47 (March 2025), with spec maintenance continuing through subsequent LDML releases. Stable here means a stability policy that covers the syntax and every function not marked Draft; as of Nov 2026, some functions and options, including date and time formatting and unit formatting, are still Draft. The specification being stable does not make it the production default: as of Nov 2026, FormatJS ships classic ICU MessageFormat by default, i18next and vue-i18n ship their own message syntax by default, and i18next offers ICU and MF2 as plugins. Meanwhile Intl.MessageFormat — the proposal to build MF2 formatting natively into JavaScript — is an early-stage (Stage 1) TC39 proposal as of Nov 2026. In April 2024, its champion presented a conclusion to TC39: to standardize the syntax, it would be meaningful or persuasive to see around a dozen organizations of various sizes, including ones not involved in MF2 development, make significant production use of MF2 syntax across their stack (engaging application developers, translators, infrastructure developers, and others); this would likely be required for Stage 2.7, and whether an intermediate, lower amount of experience would be enough for Stage 2 remained to be defined. There is no library-free message layer to wait for. Author in classic ICU, keep messages behind your own seam, and treat MF2 as a migration to evaluate when your library ships stable support.
Temporal — the successor to JavaScript's Date — earns the same honest treatment. It has reached Stage 4, the final stage of TC39's process, and is expected in the ES2027 edition of the language standard (TC39's finished-proposals list gives 2027 as its expected publication year). As of Nov 2026, it ships in Firefox and Chrome but not in stable Safari, so it is not Baseline, and production use still means a polyfill decision. The principles in this topic's date-and-time-zone article are deliberately API-agnostic: store instants in UTC, keep future wall-clock events as local time plus a zone identifier, and never do zone math by offset arithmetic — all of which hold on Date-plus-Intl, on a date library, or on Temporal.
The reading for a team deciding today: build on the stable core without hesitation, wrap the moving edge behind your own message and formatting seams, and put a date on every capability claim in your own internal docs — the way the status claims in this section carry one.
What the i18n layer cannot do
The limits shape where the effort should go, so they belong in this guide rather than in fine print.
The layer cannot choose markets or make translations good. A flawless ICU pipeline renders a grammatically correct version of whatever it is given; whether the product should be in that market, whether the tone lands, and whether the translation reads like a native wrote it are localization work, with human judgment at the center. Engineering readiness and market readiness are different finish lines, and passing the first says nothing about the second.
It cannot be bolted on cheaply after the fact. The retrofit is worth restating with its mechanics visible: string extraction across a living codebase while features keep shipping, key architecture invented under deadline, layouts re-specified component by component, and a long tail of hardcoded text that pseudo-localization and literal-string lint rules are built to find. Teams planning a multilingual future are better served by a thin i18n layer from the start — externalized strings, ICU messages, Intl formatting, one clean routing decision — than by a comprehensive one added later.
It does not eliminate per-locale QA. Pseudo-localization catches structural defects — hardcoded strings, concatenation, truncation, font handling — and catches them early. It verifies nothing about meaning. A locale still needs human review before launch, and the testing article on this topic is explicit about where the automation's authority ends.
And the layer is owned, not installed. Catalogs accumulate dead keys as features change. Libraries evolve, and the MessageFormat 2.0 transition may reach whichever one you chose. Every new feature adds strings, and every string is a small contract with every locale you support. None of this is heavy — a well-built layer runs quietly for years — but it is recurring, and teams that budget for it keep their multilingual capability honest instead of watching it rot into the very translate-the-strings posture the layer was built to replace.
The multilingual sites that work are not the ones with the most languages. They are the ones where somebody built the layer underneath on purpose.