Multilingual and server-side rendering: the language is decided by the address
The primary language exclusively owns the bare address, and the language is not handed back to negotiation via headers or Cookies; missing translations honestly fall back and get marked, and templates only consume server-computed values.
Which language a visitor sees is decided only by the address. This is the single rule in the whole multilingual design that does not bend; every other detail is a corollary of it.
The bare address belongs to the current primary language
The primary language exclusively owns the un-prefixed address. When Chinese is the primary language, / is the Chinese home page, /about is the Chinese page, and English lives at /en/about; after switching the primary language to English, / and /about are English, and the former Chinese copy moves to /cn/. Detail pages take the same shape.
Switching the primary language is an address-attribution change, not a display swap. The same address now points at different content, so a redirect cannot fix it — the system does not pretend the old address still points at the old content. The backend demands an explicit confirmation when the swap is real, and after the switch the former primary language remains reachable under its prefixed address.
The language must not be handed back to negotiation through a side door
The same URL never returns content in different languages because of request headers, Cookies or IP region. This rule has a criterion nailed to it, even pinning the 301 target when "redundant prefixes converge to the bare address": if the convergence target varied with the request header, language would effectively be handed back to negotiation through a side door, just with one extra hop.
Only three convergences are done: a redundant primary-language prefix converges to the bare address; a language parameter in the query string converges to path form; a trailing slash converges. A first visit redirects at most once, on the home page, and it must be a temporary redirect — a permanent one gets cached by the browser, and a foreign-language visitor clicking back to Chinese gets bounced to the foreign language again by the home page, unable to get out.
Where translations live and who reads them
Translations are generated by the AI assistant, but the translation lives in the table of the module that owns the data, recording which source version it was generated from. When a visitor requests, the server resolves the language by address, reads that row, and renders it to HTML. Browser scripts do not take part in swapping body text.
The read side computes on the spot the current source version and compares, trusting no "someone confirmed it" ledger. When it does not match, it falls back to the source language and marks it honestly — a sentence of source-language text appearing on a foreign-language page is an honest display, not a bug; passing an old translation off as the target language is.
Themes only consume computed values
Templates do not resolve languages and do not judge visibility. Language, writing direction, address prefix and switcher labels are all computed by the server and handed to the template.
The writing direction follows the language actually on screen: if an /ar/ address has no translation and honestly renders Chinese, then it reads left to right. "A foreign address is right-aligned" is the wrong rule that is easiest to write.
How addresses are generated
In-site links get the language prefix through exactly one rule (navigation, announcements, carousels, pagination, canonical and hreflang all use the same one). Two boundaries: media file addresses never get a prefix — a file is a file, not a page in some language; the site root address is computed by the server and handed over, and templates do not hard-code the root path, otherwise an English page's logo click drops back to the primary-language home page.
An author's hand-written wrong-language address still opens (via the convergence redirect), but it burns one extra hop every time.
Cache and fingerprint
If the same page changes its sanitization rules, its language-resolution result or its image tiers, the cache fingerprint must change. Otherwise the browser keeps hitting the old page with the old ETag — changed but unreadable by the client is worse than not changed. The site timezone also enters the fingerprint: changing the timezone without letting it take effect is the same content answering two different "which day".