Chapter 19·Shipping Translations·~6 min·
Pseudolocalization Testing
Pseudolocalization transforms source catalog strings into accented, length-expanded, bracketed, or right-to-left mirrored text at build time. Running a pseudo-locale in continuous integration exposes localization defects before human translation begins.
Overview
Pseudolocalization transforms source strings into synthetic accented, expanded, or mirrored text during the build process. Any string that remains plain English on screen is hardcoded and cannot be translated. Teams run pseudolocalization in CI before ordering translations.
Core rule
Run pseudolocalization in CI to catch hardcoded strings, string concatenation, broken placeholders, and layout truncation before ordering human translations.
Specification note: A pseudolocalized build lets an engineer who reads only English spot hardcoded strings, truncated labels, and corrupted placeholders on sight.
Failure mode
Hardcoded strings in JSX attributes, validation messages, or server responses bypass the localization catalog and ship in English to international users. Testing only the default English build cannot distinguish externalized strings from hardcoded strings.
A pseudolocalized build transforms every catalog entry with diacritics, synthetic padding, boundary brackets (⟦ ... ⟧), or right-to-left overrides. Any string that remains plain ASCII English on screen is hardcoded. Any string that loses its closing bracket is truncated by a fixed-width container.
Waiting for real translations to arrive before testing UI layouts causes release delays. Pseudolocalization catches layout and encoding bugs instantly.
Business stakes & user risk
Finding out a German button overflows or an Arabic layout is broken days before a launch requires emergency design rework and delayed rollouts.
Rule of thumb
Run pseudolocalization in continuous integration. An engineer who reads only English can spot 90% of localization bugs immediately.
The Novice Trap vs. Production Standard
Contrast the intuitive assumption with the architecture required for global releases.
“You can only test localized interfaces after professional translators deliver translated language files.”
Naive approach: Testing only English builds before launch
const label = "Checkout"; // Tested only in standard en-US mockupDefect:Hardcoded strings, truncated buttons, and broken variable placeholders remain hidden until after translations arrive.
Pseudolocalization transforms English strings into accented, expanded strings with bracket delimiters, exposing defects instantly in English builds.
Production standard: Automated pseudolocalization transform
pseudoloc("Checkout") // Produces: "[!!! Čħēċķōŭť !!!]" with +40% expansionBenefit:Any plain English text on screen is instantly exposed as hardcoded, and button truncations become obvious immediately.
Cross-Functional Review Questions
Questions for product managers, designers, engineers, and testers to ask during sprint reviews.
“Can developers toggle a pseudolocalized build locally with an environment variable or URL parameter?”
“Do automated visual regression tests run against pseudolocalized builds in CI?”
“Are design components stress-tested against 40% expanded text during component library reviews?”
“Are feature release criteria gated on zero hardcoded strings identified during pseudoloc review?”
Mechanism
Synthetic localization testing
Pseudolocalization transforms source strings into synthetic variants that remain readable to engineers while exercising the localization pipeline. Each part of the transformation targets a specific defect class. Replacing ASCII letters with accented lookalikes (Ĥéĺĺø) exposes hardcoded strings that bypassed the localization layer. Appending padding characters simulates 30% to 40% text expansion to reveal fixed-width truncation. Wrapping strings in brackets (⟦…⟧) exposes clipped edges and string concatenation. Wrapping strings in right-to-left override marks (U+202E…U+202C) tests bidirectional layout mirroring without requiring Arabic or Hebrew translations.
A valid pseudolocalizer parses message syntax before transforming characters. It must preserve ICU MessageFormat keywords, {placeholders}, HTML tags, and printf tokens unaltered so the runtime parser does not fail. Running pseudolocalization in continuous integration catches localizability defects during development rather than during post-translation QA.
Interactive demo
Guided exercises
- 1With the default JSON payload and “Accent” mode, read the items_in_cart string in the output. The ICU syntax (`{count, plural, =0 {…} one {…} other {…}}`) keeps its keywords and placeholder names in plain ASCII while the display text is accented.
- 2In the workbench at the top, switch to “Expand (40%)”. Every string receives accented characters plus 40% length padding inside brackets. Any container that truncates this output will fail in German or Russian.
- 3Switch to “RTL flip”. Each string is wrapped in Unicode bidi override marks (`U+202E`…`U+202C`) to force right-to-left rendering for layout inspection.
- 4Paste a strings file from a real project into the source box. Every externalized value transforms while valid placeholders remain untouched. Any placeholder that gets accented uses an unrecognized syntax that would break at runtime.
- 5Scroll to “A real screen under pseudoloc”. With its “Expand (40%)” button active, compare the “Upgrade plan” button in the Source card with its twin in the Pseudo-translated card. The pseudo-localized button clips the closing bracket because the button has a fixed width that cannot absorb 40% expansion.
- 6In the same section, click “RTL flip”, then “Accent”. RTL flip mirrors the card layout and moves the badge and button to the opposite side. Accent mode leaves layout geometry unchanged and verifies string externalization.
Variables ({name}), ICU plural keywords, HTML tags, and URLs pass through unchanged.
A real screen under pseudoloc
Storage
Almost fullYour workspace is using 9.3 GB of its 10 GB quota.
Older file versions are removed first when you run out.
⟦·· Šţøŕàĝé ··⟧
⟦·· Åĺɱøšţ ƒúĺĺ ··⟧⟦·········· Ýøúŕ ŵøŕķšþàçé íš úšíñĝ 9.3 ĜƁ øƒ íţš 10 ĜƁ ǫúøţà. ··········⟧
⟦··········· Øĺðéŕ ƒíĺé ṽéŕšíøñš àŕé ŕéɱøṽéð ƒíŕšţ ŵĥéñ ýøú ŕúñ øúţ. ···········⟧
Expand (40%) clips the fixed-width button's label. RTL flip mirrors the card: badge, text alignment, and button change sides.
One string in each mode
Pseudoloc in CI
1. Generate a pseudo-locale file from the English source at build time, with a transform that parses ICU MessageFormat.
2. Run the screenshot or visual-regression suite against the pseudo-locale on every PR.
3. Fail the build on any untransformed English in the screenshots, or any element that overflows at 40% expansion.
Implementation rules
- Run pseudolocalization in CI on every pull request. Generate a synthetic pseudo-locale build alongside the source build. Standard platform tags include Windows
qps-plocandqps-plocm, and Androiden-XA(accented and expanded) andar-XB(mirrored right-to-left). - Target each transformation mode to a specific defect class. Accented characters expose hardcoded strings and missing font glyphs. Synthetic expansion (+30% to +50%) exposes horizontal overflow. Boundary brackets expose silent clipping. Right-to-left overrides expose physical CSS layout defects.
- Exclude syntax tokens and placeholders from transformation. Parse the message AST before applying character substitutions so ICU keywords (
plural,select), variable names ({count}), and HTML tags remain valid.
Operational context
Roles
Workflow stages
- ·Automated pull-request verification
- ·Pre-translation readiness audits
- ·Testing RTL layout mirroring without Arabic fluency
Use the tool: String audit · the same checks on a strings file →
Production incident
Windows has included built-in pseudo-locales (qps-ploc and qps-plocm) since Windows Vista, and Android includes en-XA and ar-XB in standard developer builds. These synthetic locales let engineering teams verify layout expansion and RTL mirroring before commissioning translations.