HI AI MEETING · Dev notes
Ten Languages Later, the First Screen Still Rendered in the Wrong Language
We added eight language packs on 2026-10-16 and reached ten UI languages. The harder work over the following ten days was not translation: it was deciding which language each request should use for its first render. This post follows the actual defects and the rules for selection, fallback, and pre-deploy checks.
On 2026-10-16, we added eight language packs to Hi AI Meeting. Adding the files took one day.
The following ten days were different. The two hardest language defects were not translation-quality issues. They were both about consistently answering one question for every request: “Which language should this screen render in?”
On 10-17, Korean and English requests arriving at the same time could render in each other’s language. On 10-25, a Korean request could receive English text in its first HTML.
Today, the UI supports Korean, English, Japanese, Chinese (Simplified and Traditional), Spanish, Indonesian, Portuguese, French, and German. Running ten languages led us to centralize three rules: how to choose a language, what to show for a missing translation, and what to check before deployment.
From a Korean source of truth to ten languages
The service was built in Korean first. On 2026-09-21, we separated UI text into language-specific catalogs. Korean (ko.ts) became the source of truth for meaning, while English (en.ts) became the reference for structure and terminology.
On 2026-10-16, we added Japanese, then Simplified and Traditional Chinese, Spanish, Indonesian, Portuguese, French, and German. At that point, every pack contained 3,564 strings.
One type defines the supported languages.
export type UiLocale = 'ko' | 'en' | 'zh-Hans' | 'zh-Hant' | 'ja' | 'es' | 'id' | 'pt' | 'fr' | 'de';
The language picker, server validation, and the language value saved on an account all follow this list. When Japanese was first added, we expanded both the server-supported list and the database constraint to all ten languages at once.
If one connection is missing, a language is only partly supported.
| Missed place | Result |
|---|---|
Catalog table (CATALOGS) registration | Choosing the language shows everything in English (the fallback rule) |
UI choices (UI_LOCALE_CHOICES) | The pack exists, but there is no way to choose it |
| Server supported list and DB constraint | It can be chosen, but it is not saved to the account |
The eight new language packs were translated from the Korean source and the English reference. They have not yet been reviewed by native speakers, and each language file says so in its header comment. If you find awkward wording, please let us know through contact.
One key, one file per language
We kept the structure simple. Strings live in key→value objects, and every language has one file with the same set of keys. The central step for adding a language is one more entry in the catalog table.
const CATALOGS: Partial<Record<UiLocale, Readonly<Record<string, string>>>> = {
ko: KO_MESSAGES,
en: EN_MESSAGES,
de: DE_MESSAGES,
// ... remaining languages
};
(abridged from apps/web/lib/messages.ts, with type casts shortened)
Adding Japanese generalized the structure for language expansion. That let us add the other seven languages on the same day with one catalog file and a few registration lines. Registration includes a catalog-table import and entry, plus one UI-choice line.
The commit that added Simplified Chinese changed only those three files. As of 2026-10-25, each of the ten packs contains 3,759 strings. For keys that could be interpreted in more than one way, we keep a separate translator-facing meaning-notes file (notes.ts).
There is one exception: operator admin screens use a Korean-only pack of about 1,000 strings regardless of the UI language. We judged that maintaining ten languages for screens seen only by operators would cost more than it returns.
check_i18n — finding differences that are easy to miss before deployment
With ten languages, it is difficult to compare every file by eye. We added apps/web/scripts/check_i18n.mjs, which runs through npm run check:i18n. It uses only Node built-in modules and does not use the network.
The checker looks at two things.
- Language-pack comparison — whether every pack has the same key set as the Korean source, whether there are empty values, whether Hangul appears in non-Korean packs, and whether placeholder names such as
{count}match. For English, it also finds strings that simply copy the Korean value. - Hard-coded UI text — Hangul written directly in the code portions of user-facing UI code (
app,components,lib) is a violation. The language-pack folder, operator admin screens, and test files are excluded. Comment lines andconsole.*log lines are skipped.
There is only one way to exempt an individual code line: add // i18n-exempt: <reason> at the end of it. The language picker is an example, because it shows languages in their own names, such as “한국어” and “日本語.”
We did not create a separate exemption-list file. Once an exemption is detached from the code, it can remain on the list even after the code is gone.
Here is the result from 2026-10-25.
$ node apps/web/scripts/check_i18n.mjs
i18n 검사 통과 — 위반 0건 (언어팩 키 짝 · 화면 하드코딩 한국어)
On a violation, the checker prints a file:line — content list and a count, then returns exit code 1. The pre-deploy check bundle uses that exit code to determine whether the check passes.
The checker also has clear limits. It does not verify that a key used in msg('key') actually exists in the catalog. Matching keys, non-empty values, and matching placeholders only mean that nothing is missing. They do not detect mistranslations, awkward honorifics, or translations that do not fit their context. That is why native-speaker review is still pending.
How the first screen chooses its language
The server’s language-selection order for the first render lives in one function. The UI language, the <html lang> value, and the URL language all follow the same order.
- URL — a language prefix such as
/en/...selects that language. - The person’s choice — the value selected in the language picker, stored in a cookie.
- Previous-URL marker — the language from the preceding screen carries over when moving to a screen without a prefix.
- Browser declaration — the best match from
Accept-Language. A browser that declares Korean first receives Korean. - Default — English, when none of the above applies.
For example, if you arrive at a URL without a prefix, previously chose Japanese in the language picker, and your browser declares English, rule 2 applies first. The page renders in Japanese. If that same person follows an /en/... link, rule 1 takes priority and the page is English.
The URL comes first to preserve the meaning of links. If someone who received an /en link sees a Korean screen, the English URL no longer communicates what it promised.
A person’s explicit choice also takes precedence over the browser hint. MDN’s Accept-Language documentation describes the header as a hint and says it “should never override an explicit user language choice.”
The previous-URL marker is needed for screens without a language prefix. Without it, someone moving from an /en screen to a prefix-less screen would get their language from the browser’s preference again. In a Korean browser, the screen could switch to Korean. We therefore retain the previous screen’s URL language and carry it forward.
On 2026-10-16, we changed the default from Korean to English. Korean URLs remain the canonical prefix-less URLs, and Korean browsers still receive Korean.
The language list puts the currently selected language first. The rest are shown alphabetically by their two-letter abbreviations. For example, with Korean selected, the remaining entries are DE, EN, ES, FR, ID, JA, PT, ZH Simplified, and ZH Traditional.

Missing translations fall back to English
The rule for missing or empty translations also lives in one place.
export function msgFor(locale: UiLocale, key: string, bindings?: Bindings): string {
const table = CATALOGS[locale];
const english = EN_MESSAGES[key];
let result = firstNonEmpty(table === undefined ? undefined : table[key], english) ?? key;
// ... {placeholder} substitution
return result;
}
The display order is that language → English → the key. A translation containing only whitespace also counts as missing and falls through to the next candidate. We judged that English appearing on a German screen is less jarring than a Korean sentence suddenly appearing there.
The key itself appears only when English does not have that key either. Missing and empty values between language packs are found by the checker before deployment. A key name mistyped in code is not caught by that checker, so it must be confirmed on screen.
What happens when server render and hydration disagree
The part that took the longest was not the language files. It was deciding who holds the language state. At first, the server rendered by switching a module-global “active language,” just as the browser did.
A server process handles multiple requests together. Under that structure, Korean and English requests arriving at the same time could render in each other’s language. On 2026-10-17, we moved the language state to a per-request React context.
The remaining hole in client components’ msg() and its fix are covered in The Day the Conversation Vanished from the Meeting Page's First HTML.
The current order is: the server renders the first HTML in its selected language, then the browser performs its first hydration in that same language. Stored and account values are applied afterwards.
LocaleGate is the browser-side component that preserves this order.
- It passes the server-selected language through context so the first hydration produces the same text as the server render. Before rendering its children, it also sets the browser’s active language to that value.
- After mount, it applies the choice stored in that browser. If the value matches the first render, it does not rebuild the screen.
- For signed-in users, the language saved on the account wins. This lets other devices start in the same language.
- But when the URL has a language prefix, the URL takes precedence over the account value. Otherwise, an English URL could flip back to Korean.
UI language and meeting-content language are separate
The language of UI text and the language of meeting content are not the same value. When a meeting is created, the server reads Accept-Language and stores the meeting’s source language in source_locale.
On 2026-10-16, we fixed a defect where the create, rerun, continue, and preset-combination paths did not pass this value. Before that fix, the source language was stored as Korean no matter which language was used to create the meeting.
Someone viewing an English UI can still open a meeting in Korean, so these values will continue to be handled separately. Translating public meeting content into another language is also a feature separate from the UI language.

An eleventh language can be added with one file and a few registration lines. The check that took longer was opening both the language-specific URL and an unprefixed screen and checking the language of the first HTML response.