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
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:
source: en
targets: [es, fr, de]
scan_dir: ./src
auto_translate: true
review_threshold: marketing_copy
Output:
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
1---2name: localization-manager3description: Manage i18n translation files, detect missing translation keys, generate AI-assisted translations for new strings, and sync locale files across frontend codebases and CMS platforms.4license: MIT5---67# Localization Manager89## Overview1011Automate the full i18n workflow—from detecting missing translation keys and generating AI-assisted translations to syncing locale files across codebases and validating translation quality.1213---1415## When to Use1617- Detecting untranslated strings after new feature development18- Generating initial AI translations for a new language19- Syncing translation files between frontend repo and CMS20- Auditing translation completeness before a product launch21- Managing translation contributor workflows with review queues2223---2425## Instructions26271. Accept inputs: source language, target languages, locale files directory, translation provider (AI/human/both), sync targets (CMS, S3, etc.).282. Scan codebase for all i18n keys (t(), $t(), useTranslation patterns).293. Compare extracted keys against existing locale files to find: missing keys, unused keys, inconsistent pluralization.304. For missing keys: generate AI translations using configured LLM or translation API (DeepL, Google Translate).315. Flag translations that may need human review (long text, legal terms, marketing copy).326. Validate translations: check for placeholder mismatches (%s, {name}), HTML tag consistency, character limit violations.337. Write updated locale files and create a PR with changes.348. Return audit report: coverage percentage per language, new keys translated, keys needing review.3536---3738## Environment3940```41SOURCE_LANGUAGE=en42TARGET_LANGUAGES=es,fr,de,ja,zh43LOCALE_DIR=./src/locales44TRANSLATION_API=deepl45DEEPL_API_KEY=your_deepl_api_key46AUTO_CREATE_PR=true47```4849---5051## Examples5253**Input:**54```55source: en56targets: [es, fr, de]57scan_dir: ./src58auto_translate: true59review_threshold: marketing_copy60```6162**Output:**63```64Localization Audit Complete65Total keys: 1,24766Missing translations:67 Spanish: 23 keys68 French: 41 keys69 German: 18 keys70AI translations generated: 8271Flagged for human review: 12 (marketing CTAs)72Coverage: ES 98.2%, FR 96.7%, DE 98.6%73PR created: #156 - Update locale files74```