factflow-translator
LLM-based content translation pipeline adapter. One adapter, one config class — translates content between languages while preserving markdown formatting.
Tier and role
Section titled “Tier and role”- Tier: workflow
- Import name:
factflow_translator - Source:
backend/packages/workflows/factflow-translator/
Simplest workflow package in the tree. Used as an optional intermediate stage in pipelines that need to translate scraped web content (typically Norwegian ↔ English) before further processing.
Context
Section titled “Context”Translation happens against LLMClientProtocol via factflow-llm. Config determines source/target language, model, and whether to preserve markdown structure. Output is a new message with translated content on the same lineage chain.
Public API
Section titled “Public API”from factflow_translator import ( LLMTranslatorAdapter, # type: llm_translator LLMTranslatorConfig,)Two exports. The config class defines source_language, target_language, provider, model, plus prompt-template overrides.
Dependencies
Section titled “Dependencies”- Workspace:
factflow-protocols,factflow-foundation,factflow-engine,factflow-llm - External services: an LLM provider configured in
factflow-llm
Testing
Section titled “Testing”Tests at backend/packages/workflows/factflow-translator/tests/. Uses mocked LLM clients; see .claude/skills/backend/llm-unit-testing/.
Related
Section titled “Related”factflow-llm— the chat client behind the adapterfactflow-markdown— typical upstream; translator preserves markdown structure