Localization
Extract user-facing strings from a codebase, translate them into target languages, and verify the translations render correctly in context.
Workflow​
runPipeline(
pipe(
extractStrings,
forEach(
pipe(
all(...targetLanguages.map(lang => translateTo(lang))),
forEach(verifyInContext),
)
),
flattenResults,
writeLocaleFiles,
),
);
Stages​
- Extract strings — scan the codebase for user-facing text. Output: array of
{ key, text, context }. - For each string (concurrently):
- Translate —
allruns translations into every target language concurrently. - Verify — check each translation in context (e.g., does it fit the UI, is it culturally appropriate).
- Translate —
- Write locale files — aggregate all translations and write them to the appropriate locale files.
Key points​
- Translation into different languages is embarrassingly parallel —
allruns them concurrently. - The verification agent sees the translation, the original text, and the UI context — but not other translations.
- The extraction step is deterministic (AST parsing or regex), not an LLM.
forEachprocesses all strings concurrently, so the workflow scales with the number of strings.