Spent last week shipping document translation for Fenly. Word, Excel, PowerPoint, PDF, plus Markdown, plain text, subtitle files. 8 formats live.
The actual translation logic took about 4 hours. The other 6 days went into not destroying the file in the process.
Here's why.
First attempt: the obvious one.
Pick up an existing library (Mammoth, docx-templater, whatever). Open the Word file. Replace text nodes with translations. Save it back.
Tested on a real bank receipt. The translation came back perfect. The document came back broken. Half the fonts were swapped out and the company logo had disappeared entirely.
Why it breaks:
Most document translators rebuild the file from scratch using whatever their parser understood. If the parser missed a font setting or an image reference, that piece disappears from the output.
You get the right words back. You don't get your document back.
What worked:
Instead of rebuilding the document, I open it up, find only the text inside, and swap each piece for the translation. Everything else (images, fonts, layouts, headers, comments) stays exactly where it was.
The file looks identical. Only the words have changed.
Honest leftovers:
For most "translation/conversion/processing" features founders ship, the actual processing is usually 10-20% of the effort. The rest is keeping the surrounding structure intact. I underestimated that ratio every time before this build.
If you want to try: https://fenly.me/translate-document
What's the last feature you shipped where the easy-looking part turned out to be 80% of the work?