Lesson 8 of 9 · 22m
Pseudolocalization and Internationalization Testing
Expose hard-coded text, expansion, encoding, direction, and formatting defects before real translations arrive.
You do not need to wait for professional translations to discover that buttons clip, concatenated sentences break, accents mojibake, or a hard-coded string never entered the catalog. Pseudolocalization creates a fake locale that amplifies common defects while remaining readable enough for English-speaking engineers. It is the cheapest internationalization test harness you will ever build.
What pseudolocalization should do
A useful pseudo locale expands text, decorates it, preserves placeholders, and sometimes simulates direction:
source: "Save changes" -> pseudo: "[Šàṽé ćħàñğéš~~~ one two three]"
ICU placeholders remain parseable while visible text is expanded and decoratedAdd it as a real locale, not a hack
const pseudoMessages = pseudolocalizeCatalog(enMessages);
registerLocale("en-XA", pseudoMessages);Test what automation can actually prove
Static and unit tests can catch:
- keys present in source but missing from a locale
- malformed ICU syntax
- mismatched placeholders
- unsupported plural categories
- hard-coded user-visible strings in componentsUse real Unicode test data
Do not test with ASCII and call it internationalized. Seed fixtures with realistic names and content:
Renée Girard
张伟 / 山田花子 / 김민준
علي حسن
Jürgen Müller / Αλέξανδρος ΠαπαδόπουλοςCollation and search are locale-sensitive
Alphabetical order is not code-point order. Accents, case, and language-specific rules matter:
new Intl.Collator("sv", { sensitivity: "base" }).compare("å", "z");
new Intl.Collator("de", { sensitivity: "variant" }).compare("ä", "a");Test inputs, not just output
Can users type non-ASCII names into account forms? Does validation reject apostrophes or hyphens in real names? Can IME input compose Chinese, Japanese, or Korean text in search fields? Composition events are easy to break with aggressive controlled-input logic. Copy, paste, export, and CSV encoding deserve the same attention.
Field notes
- Mojibake such as
Françaisusually means bytes were decoded with the wrong charset, not that the translation is bad. - Pseudolocalization cannot verify linguistic quality. It verifies that the system is structurally localizable.
- A missing translation fallback may hide missing keys. In test locales, make missing strings loud.
- Font fallback affects rendering and measurement; a glyph can exist but ruin layout if it comes from a different family.
Was this lesson helpful?