Percerno Skillsbeta
← everything it can do · documents

Translate Document DOCX

Translates a Word, PowerPoint or Excel file into another language with the layout and formatting kept, the assistant doing the translating.

4 uses this weeksource Percernolicence MIT
Tested 2026-10-24: delivered the file in 2 of 2 requests through a real assistant · security scan clean.

Try asking

Say it in your own words; the assistant finds this recipe by itself. Examples:

“Translate the uploaded contract to English but keep the exact layout, numbering and tables.”
“Make a Danish version of this 20-slide deck; the design must stay the same.”
“Oversæt word-contract.docx til engelsk og behold opsætningen.”
“The column headers and sheet names of this Excel file in German, the numbers untouched.”
Without Percerno: Word's own translator reflows the document and loses tracked formatting; pasting text through a translator and rebuilding the layout by hand takes an afternoon per document, and uploading a contract to a free translation site is what IT forbids.
Try this skill from Claude, ChatGPT or a chat on your own page. Free plan, no credit card.Get started free

Details

When it is the right choice

Translate a Word, PowerPoint or Excel file into another language while keeping its layout, formatting, tables, headers and slide design: two commands around the assistant's own translation. `extract` pulls every piece of text out of the file into a numbered JSON; you (the assistant) translate the JSON values; `apply` writes them back in place, formatting intact, and renders a PDF to check. Use for: translate this contract to English but keep the layout, Danish version of this deck, Excel sheet with the labels in German, oversæt dokumentet men behold opsætningen. Triggers: translate, translation, oversæt, oversættelse, in English, på dansk, auf Deutsch, keep the formatting, same layout.

The full recipe the assistant reads

Translate a document (two commands around your translation)

python3 /skills/translate-document/scripts/translate.py <verb> …. Inputs in /work/in, results in /work/out. Each verb prints one OK … line or one ERROR … line. The file never leaves the sandbox; only the text segments pass through you.

Step Command
1. Pull the text out translate.py extract /work/in/contract.docx /work/segments.json → a JSON list of {"id": 1, "text": "…"} (one per run of text; the OK line gives the count and word total)
2. Translate read /work/segments.json, translate every text (keep numbers, names, placeholders and line breaks as they are; same tone and register), write /work/translated.json as a list of {"id": 1, "text": "…"} with the same ids
3. Write it back translate.py apply /work/in/contract.docx /work/out/contract-en.docx --translations /work/translated.json [--pdf /work/out/contract-en.pdf]

Works for .docx (body, tables, headers, footers, footnotes), .pptx (slides, tables, notes) and .xlsx (text cells and sheet names; numbers and formulas are left alone). Segments longer than --max-chars 1500 are split at sentence ends so each piece fits comfortably. For a long document translate in batches of ~60 segments and merge the lists before apply. If apply reports ids missing, those segments keep the original text. Always render the --pdf and give the person both links.

Files in this skill (4)
  • SKILL.md
  • gate.json
  • scripts/__pycache__/translate.cpython-313.pyc
  • scripts/translate.py
Where it comes from

Written by Percerno, MIT licence.