Taking content overseas or running a multilingual site means manually translating every post-grunt work. This n8n workflow watches source-doc updates, auto-translates to target languages via an LLM following a glossary, and drops the result into the right per-language directory. Edit the source, and the localized versions follow automatically.
Workflow Chain
Source-doc update trigger -> extract source + glossary -> LLM translation (glossary + style) -> write to target-language directory -> notify (optional human review).
Download Template
Usage Steps
- Import: n8n -> Workflows -> Import from File, pick auto-translation.json
- Trigger node: wire up your source-doc origin (Git webhook / Feishu Docs webhook / scheduled directory scan)
- Glossary node: configure a glossary file (CSV/JSON, term -> translation) the LLM must obey
- LLM node: fill in API key; pick DeepSeek / Qwen (great value for CN-EN), prompt outputs pure translation
- Write node: write per language into target dirs (e.g. en/posts/, ja/posts/)
- Notify node: send to Feishu / Slack on completion; optional human-review step
- Test run: edit one source doc, see whether the target-language version appears
Companion Prompt (LLM Translation)
You are a professional translator fluent in {{source_language}} and {{target_language}}. Translate the following text:
1. Must follow the glossary-keep terminology consistent
2. Fluent and idiomatic, matching {{target_language}} conventions
3. Preserve the original Markdown structure (headings/code blocks/tables intact)
4. Translate comments inside code blocks too; leave the code itself unchanged
5. Output pure translation
Glossary: {{glossary}}
Text: {{source_text}}Pitfalls
- Inconsistent terminology: without a glossary, the same term gets translated differently per post. Force the LLM to read the glossary and run a terminology-consistency check on output.
- Broken Markdown structure: the LLM can drop code-block markers or tables mid-translation. State "preserve structure" in the prompt and run a Markdown compliance check before writing.
- Machine-translation flavor: pure LLM output has an AI whiff. Add a human-review node for key content (homepage / marketing); long-form content can ship direct.
References
- n8n official: n8n.io
- DeepSeek API docs: platform.deepseek.com