Scaling Multilingual DTP by Automating Trados-Ready IDML Export from InDesign Books

 Why IDML is required before translation

If you work with Trados, you already know this:
InDesign .indd files cannot be processed directly. They must be converted to .idml first.

For a single document, that’s trivial.

Press Ctrl+E, choose IDML, and you’re done.

The problem starts when you receive an InDesign Book (.indb) instead of a single file.


Why InDesign Books turn this into a bottleneck

A Book file is just a container for multiple .indd files.

If a book contains 20 documents, you now have to repeat the same export process 20 times.



What used to take seconds becomes minutes — and in large multilingual projects, that happens for every language.

This is where a simple file format requirement quietly turns into a production bottleneck.


Why manual export does not scale

Once the number of files increases, a more dangerous problem appears: human error.

  • One file forgotten

  • One export skipped

  • One outdated IDML sent to translation

If you catch it early, you lose time.
If you notice it at delivery, you have a real problem.

This isn’t a matter of being careful.
It’s a structural issue: repetitive manual work breaks at scale.


The automation approach

The fix is straightforward:
Let InDesign do the repetitive work for you.

By using a script, you can export all open .indd files to .idml in one operation — consistently, repeatably, and without missing anything.



A simple example script

Here is a minimal version of the script I use in production.
It exports all open InDesign documents as IDML files into the same folders as the originals.

The full script file is attached to this post.
License: MIT. Use at your own risk.

function exportIDML() { // Check if any documents are open if (app.documents.length == 0){ alert("No documents to process"); return; } // Confirmation dialog var result = confirm("Export all open documents as IDML files?\n\nIDML files will be saved in the same location as the original documents."); if (result == false) { alert("Process cancelled."); return; } var docObj = app.documents; var successCount = 0; var failCount = 0; // Process each document for(var z=0; z<docObj.length; z++) { // Skip unsaved documents if (docObj[z].saved == false) { alert(docObj[z].name + "\n\nThis document has not been saved.\nPlease save the file before processing."); failCount++; continue; } try { // Set object style default to "None" docObj[z].pageItemDefaults.appliedTextObjectStyle = docObj[z].objectStyles[0]; // Get file path (save as .idml in the same location as original file) var originalPath = docObj[z].fullName.toString(); var idmlPath = originalPath.replace(/\.indd$/i, ".idml"); // Export as IDML file var exportFile = new File(idmlPath); docObj[z].exportFile(ExportFormat.indesignMarkup, exportFile, false); successCount++; } catch(e) { // Display error details alert(docObj[z].name + "\n\nExport failed.\n\nError details:\n" + e.message + "\nLine: " + e.line); failCount++; } } // Display process summary var summary = "Process completed.\n\n"; summary += "Successful: " + successCount + " file(s)\n"; if (failCount > 0) { summary += "Failed: " + failCount + " file(s)"; } alert(summary); } // Run script exportIDML();

This is intentionally simple.
It shows the core idea: remove humans from repetitive format-conversion tasks.


What this looks like in real production

In actual multilingual workflows, IDML export is only one step.

In practice, I run this as part of a larger automation package that also handles things like:

  • Updating linked artwork

  • Reloading paragraph and character styles

  • Reloading master pages

  • Normalizing document settings before translation

Those pieces belong in separate posts, but the principle is the same:
If a task must be done for every file and every language, it should not be done by hand.

Full script: 
https://drive.google.com/file/d/19j-GUKS9j_v3joQCkkg4taJSmTKuo7Bb/view?usp=sharing

If you haven’t seen it yet, check out our previous post on automating InDesign text overset:
Scaling Multilingual DTP by Eliminating Manual InDesign Text Overset Fixes


Popular Posts