Localization Manager
Overview
Automate the full i18n workflow—from detecting missing translation keys and generating AI-assisted translations to syncing locale files across codebases and validating translation quality.
When to Use
- •Detecting untranslated strings after new feature development
- •Generating initial AI translations for a new language
- •Syncing translation files between frontend repo and CMS
- •Auditing translation completeness before a product launch
- •Managing translation contributor workflows with review queues
Instructions
- •Accept inputs: source language, target languages, locale files directory, translation provider (AI/human/both), sync targets (CMS, S3, etc.).
- •Scan codebase for all i18n keys (t(), $t(), useTranslation patterns).
- •Compare extracted keys against existing locale files to find: missing keys, unused keys, inconsistent pluralization.
- •For missing keys: generate AI translations using configured LLM or translation API (DeepL, Google Translate).
- •Flag translations that may need human review (long text, legal terms, marketing copy).
- •Validate translations: check for placeholder mismatches (%s, {name}), HTML tag consistency, character limit violations.
- •Write updated locale files and create a PR with changes.
- •Return audit report: coverage percentage per language, new keys translated, keys needing review.
Environment
code
SOURCE_LANGUAGE=en TARGET_LANGUAGES=es,fr,de,ja,zh LOCALE_DIR=./src/locales TRANSLATION_API=deepl DEEPL_API_KEY=your_deepl_api_key AUTO_CREATE_PR=true
Examples
Input:
code
source: en targets: [es, fr, de] scan_dir: ./src auto_translate: true review_threshold: marketing_copy
Output:
code
Localization Audit Complete Total keys: 1,247 Missing translations: Spanish: 23 keys French: 41 keys German: 18 keys AI translations generated: 82 Flagged for human review: 12 (marketing CTAs) Coverage: ES 98.2%, FR 96.7%, DE 98.6% PR created: #156 - Update locale files