Skip to main content

Pseudo-Localization: Test i18n Readiness Without Real Translations

Real translations take time and money. Pseudo-localization transforms your source strings into readable-but-obviously-fake text that reveals i18n bugs instantly — hardcoded strings, text overflow, RTL issues, and concatenation problems.

1

What Is Pseudo-Localization?

Pseudo-localization replaces characters in your source strings with visually similar accented or extended characters, adds text expansion padding, and wraps strings in brackets. The result is still readable to developers but looks obviously different from real text — making it trivial to spot strings that were not wrapped with translation functions.

Pseudo-localization examples
// Pseudo-localization transforms your source strings
// to simulate translation without real translators

// Original:
"Welcome to our application"

// Accented (simulates diacritics):
"[Ẁëľčöṁë ţö öüŕ àṗṗľïčàţïöñ]"

// Expanded (simulates text expansion ~30%):
"[Weeelcooomee tooo ouuur aaappliiicaaatiiioon]"

// Mirrored (simulates RTL layout):
"[noitacilppa ruo ot emocleW]"

// Brackets make untranslated strings immediately visible
Pseudo-localization is the fastest way to find i18n bugs. It takes seconds to generate, costs nothing, and catches issues that are invisible until you test with a real language. Every i18n-ready project should use it before commissioning real translations.
2

Usage in Your Project

Install i18n-pseudo and run it against your locale files. The tool auto-detects the file format and generates a pseudo-localized version that you can load as a test locale in your app.

Issues caught by pseudo-localization
// 1. Hardcoded strings (not wrapped in t())
// Pseudo strings have brackets/accents, so untranslated
// strings are immediately obvious in the UI

// 2. Text truncation
// Expanded text reveals buttons and labels that break
// when translations are longer than English

// 3. Layout issues
// Accented characters reveal font rendering problems
// RTL mode reveals directional layout bugs

// 4. Concatenation bugs
// "Hello " + name vs t('greeting', { name })
// Pseudo-localization breaks concatenated strings

// 5. Missing i18n wrappers
// Any string not going through the i18n system
// appears as plain English among pseudo text
Add a 'pseudo' locale to your app's language switcher during development. When developers switch to it, untranslated strings are immediately visible. Remove the pseudo locale before shipping to production.
3

7 Transformation Strategies

i18n-pseudo provides 7 transformation strategies that each test a different aspect of your i18n implementation. Use them individually for targeted testing or combine them with presets for comprehensive coverage.

Pseudo-localization strategies
// Strategy 1: Accented characters
// Replace ASCII with similar-looking Unicode
// a -> à, e -> ë, o -> ö, etc.
// Preserves readability while testing rendering

// Strategy 2: Text expansion
// Pad strings to simulate longer translations
// German is ~30% longer, Finnish ~40% longer
// Helps catch UI overflow early

// Strategy 3: Brackets/wrappers
// Wrap strings in [brackets] or «guillemets»
// Makes untranslated strings visually obvious

// Strategy 4: Bidi/RTL
// Mirror text for right-to-left testing
// Catches layout issues before Arabic/Hebrew testing

// Strategy 5: Combined
// Apply all strategies simultaneously
// Maximum coverage in one pass
4

5 Built-In Presets

Presets combine multiple strategies into commonly needed configurations. Use a preset for quick testing, or create custom combinations for your specific needs.

CLI & Configuration
// Using i18n-pseudo CLI
npx i18n-pseudo generate \
  --source locales/en.json \
  --output locales/pseudo.json \
  --preset accented

# Available presets:
# accented  - Ḣëľľö Ẁöŕľð (default)
# expanded  - Heeellooo Wooorld
# mirrored  - dlroW olleH
# brackets  - [Hello World]
# maximum   - [Ḣëëëľľľöööö Ẁöööŕŕŕľľľðððð]

// i18n-pseudo.config.json
{
  "source": "locales/en.json",
  "output": "locales/pseudo.json",
  "preset": "maximum",
  "expansion": 1.4,
  "wrapper": ["[", "]"],
  "exclude": [
    "*.url",
    "*.email",
    "branding.*"
  ]
}
5

CI/CD Integration

Run pseudo-localization in CI to automatically detect i18n regressions. Generate pseudo-localized files, render key screens, and compare against baseline screenshots. Any un-transformed text in the screenshots is a regression — a new hardcoded string that bypassed the translation function.

.github/workflows/pseudo-check.yml
# .github/workflows/pseudo-check.yml
name: Pseudo-Localization Check

on:
  pull_request:
    paths:
      - 'src/**'

jobs:
  pseudo-test:
    runs-on: ubuntu-latest
    steps:
      - uses: actions/checkout@v4

      - name: Setup Node.js
        uses: actions/setup-node@v4
        with:
          node-version: 20

      - name: Install dependencies
        run: npm ci

      - name: Generate pseudo locale
        run: npx i18n-pseudo generate \
          --source locales/en.json \
          --output locales/pseudo.json \
          --preset maximum

      - name: Build with pseudo locale
        run: npm run build
        env:
          NEXT_PUBLIC_LOCALE: pseudo

      - name: Run visual regression tests
        run: npx playwright test --project=pseudo
        env:
          LOCALE: pseudo

Try i18n Agent Now

Drop your translation file here

JSON, YAML, PO, XML, CSV, Markdown, Properties

or click to browse

Target languages

No signup requiredInstant estimate

Pseudo-Localization FAQ