home / skills / proffesor-for-testing / agentic-qe / localization-testing

localization-testing skill

/v3/assets/skills/localization-testing

This skill helps validate multilingual translations, locale formatting, RTL layouts, and cultural appropriateness across products.

npx playbooks add skill proffesor-for-testing/agentic-qe --skill localization-testing

Review the files below or copy the command above to add this skill to your agents.

Files (1)
SKILL.md
6.2 KB
---
name: localization-testing
description: "Internationalization (i18n) and localization (l10n) testing for global products including translations, locale formats, RTL languages, and cultural appropriateness. Use when launching in new markets or building multi-language products."
category: specialized-testing
priority: medium
tokenEstimate: 800
agents: [qe-test-generator, qe-test-executor, qe-visual-tester]
implementation_status: optimized
optimization_version: 1.0
last_optimized: 2025-12-02
dependencies: []
quick_reference_card: true
tags: [localization, i18n, l10n, translation, rtl, unicode, locale]
---

# Localization & Internationalization Testing

<default_to_action>
When testing multi-language/region support:
1. VERIFY translation coverage (all strings translated)
2. TEST locale-specific formats (date, time, currency, numbers)
3. VALIDATE RTL layout (Arabic, Hebrew)
4. CHECK character encoding (UTF-8, unicode)
5. CONFIRM cultural appropriateness (icons, colors, content)

**Quick i18n Checklist:**
- All user-facing strings externalized
- No hardcoded text in code
- Date/time/currency formatted per locale
- RTL languages flip layout correctly
- Unicode characters display properly

**Critical Success Factors:**
- Don't hardcode strings - externalize everything
- Test with real speakers, not just translation files
- RTL requires mirrored UI layout
</default_to_action>

## Quick Reference Card

### When to Use
- Launching in new markets
- Adding language support
- Before international releases
- After UI changes

### i18n vs l10n
| Term | Full Name | Focus |
|------|-----------|-------|
| **i18n** | Internationalization | Building for localization |
| **l10n** | Localization | Adapting for specific locale |

### Common Locale Formats
| Type | US (en-US) | UK (en-GB) | Japan (ja-JP) |
|------|------------|------------|---------------|
| **Date** | 10/24/2025 | 24/10/2025 | 2025/10/24 |
| **Currency** | $1,234.56 | £1,234.56 | ¥1,235 |
| **Number** | 1,234.56 | 1,234.56 | 1,234.56 |

---

## Translation Coverage Testing

```javascript
test('all strings are translated', () => {
  const enKeys = Object.keys(translations.en);
  const frKeys = Object.keys(translations.fr);
  const esKeys = Object.keys(translations.es);

  // All locales have same keys
  expect(frKeys).toEqual(enKeys);
  expect(esKeys).toEqual(enKeys);
});

test('no missing translation placeholders', async ({ page }) => {
  await page.goto('/?lang=fr');
  const text = await page.textContent('body');

  // Should not see placeholder keys
  expect(text).not.toContain('translation.missing');
  expect(text).not.toMatch(/\{\{.*\}\}/); // {{key}} format
});
```

---

## Date/Time/Currency Formats

```javascript
test('date formats by locale', () => {
  const date = new Date('2025-10-24');

  expect(formatDate(date, 'en-US')).toBe('10/24/2025');
  expect(formatDate(date, 'en-GB')).toBe('24/10/2025');
  expect(formatDate(date, 'ja-JP')).toBe('2025/10/24');
});

test('currency formats by locale', () => {
  const amount = 1234.56;

  expect(formatCurrency(amount, 'en-US', 'USD')).toBe('$1,234.56');
  expect(formatCurrency(amount, 'de-DE', 'EUR')).toBe('1.234,56 €');
  expect(formatCurrency(amount, 'ja-JP', 'JPY')).toBe('¥1,235');
});
```

---

## RTL (Right-to-Left) Testing

```javascript
test('layout flips for RTL languages', async ({ page }) => {
  await page.goto('/?lang=ar'); // Arabic

  const dir = await page.locator('html').getAttribute('dir');
  expect(dir).toBe('rtl');

  // Navigation should be on right
  const nav = await page.locator('nav');
  const styles = await nav.evaluate(el =>
    window.getComputedStyle(el)
  );
  expect(styles.direction).toBe('rtl');
});

test('icons/images appropriate for RTL', async ({ page }) => {
  await page.goto('/?lang=he'); // Hebrew

  // Back arrow should point right in RTL
  const backIcon = await page.locator('.back-icon');
  expect(await backIcon.getAttribute('class')).toContain('rtl-flipped');
});
```

---

## Unicode Character Support

```javascript
test('supports unicode characters', async ({ page }) => {
  // Japanese
  await page.fill('#name', '山田太郎');
  await page.click('#submit');

  const saved = await db.users.findOne({ /* ... */ });
  expect(saved.name).toBe('山田太郎');

  // Arabic
  await page.fill('#name', 'محمد');
  // Emoji
  await page.fill('#bio', '👋🌍');

  expect(saved.bio).toBe('👋🌍');
});
```

---

## Agent-Driven Localization Testing

```typescript
// Comprehensive localization validation
await Task("Localization Testing", {
  url: 'https://example.com',
  locales: ['en-US', 'fr-FR', 'de-DE', 'ja-JP', 'ar-SA'],
  checks: ['translations', 'formats', 'rtl', 'unicode'],
  detectHardcodedStrings: true
}, "qe-test-generator");

// Returns:
// {
//   locales: 5,
//   missingTranslations: 3,
//   formatIssues: 1,
//   rtlIssues: 0,
//   hardcodedStrings: ['button.submit', 'header.title']
// }
```

---

## Agent Coordination Hints

### Memory Namespace
```
aqe/localization-testing/
├── translations/*       - Translation coverage
├── formats/*            - Locale-specific formats
├── rtl-validation/*     - RTL layout checks
└── unicode/*            - Character encoding tests
```

### Fleet Coordination
```typescript
const l10nFleet = await FleetManager.coordinate({
  strategy: 'localization-testing',
  agents: [
    'qe-test-generator',   // Generate l10n tests
    'qe-test-executor',    // Execute across locales
    'qe-visual-tester'     // RTL visual validation
  ],
  topology: 'parallel'
});
```

---

## Related Skills
- [accessibility-testing](../accessibility-testing/) - Language accessibility
- [compatibility-testing](../compatibility-testing/) - Cross-platform i18n
- [visual-testing-advanced](../visual-testing-advanced/) - RTL visual regression

---

## Remember

**Don't hardcode. Externalize all user-facing strings.** Every string visible to users must come from translation files, not code.

**Test with native speakers, not just translation files.** Machine translations and translation files can have context issues that only native speakers catch.

**With Agents:** Agents validate translation coverage, detect hardcoded strings, test locale-specific formatting, and verify RTL layouts automatically across all supported languages.

Overview

This skill provides automated internationalization (i18n) and localization (l10n) testing for global products, covering translations, locale formats, RTL languages, and cultural checks. It helps teams validate that UI strings, dates, numbers, and currencies behave correctly across locales and that right-to-left layouts and unicode characters render properly. Use it to reduce localization regressions and speed up market launches.

How this skill works

The skill inspects translation files for key coverage and detects missing or placeholder entries. It runs locale-specific format checks for dates, times, numbers, and currencies, verifies RTL layouts and mirrored UI behavior, and validates character encoding and unicode support. Agents can also detect hardcoded strings, execute tests across multiple locales in parallel, and report a compact summary of issues (missing translations, format issues, RTL problems, hardcoded keys).

When to use it

  • Preparing for a launch in a new market or region
  • Adding new language support to an existing product
  • Before international releases or milestone freezes
  • After UI changes that may affect layout or strings
  • During CI to catch localization regressions early

Best practices

  • Externalize all user-facing strings; avoid hardcoded text in code
  • Test translations with native speakers, not only translation files
  • Verify date/time/number/currency formatting per target locale
  • Perform visual RTL validation to ensure layout mirroring and icon flipping
  • Include unicode input/output tests (multibyte characters and emoji)

Example use cases

  • Run a coverage test to ensure all locales share the same translation keys
  • Validate currency and date formatting for en-US, de-DE, ja-JP before release
  • Execute RTL checks for Arabic and Hebrew builds, including icon direction
  • Scan the codebase to find hardcoded strings that block localization
  • Automate unicode entry tests to confirm DB and UI persist multibyte names

FAQ

How do agents detect hardcoded strings?

Agents scan source and templates for literal user-facing text patterns and compare them against translation keys to flag entries that are not externalized.

Can this run in CI for many locales without long delays?

Yes. Tests are designed to run in parallel across locales and return concise reports showing counts of locales tested and categories of issues for fast triage.