A free InDesign script to generate a list of all languages in use in a document

In InDesign, text has a language attribute. This means that all text in InDesign is defined as being a certain language – one of a list of several dozen that InDesign supports.

The only way to see what language is applied to particular text is by selecting the text and looking at InDesign’s Control panel (or Character panel if you have that open). The language applied to the text will be selected in the Language dropdown.

So, just by glancing at a page of text there is no way of knowing what languages are applied to that text.

But the applied language can cause some serious changes to the way text is displayed.

The most obvious difference is hyphenation. InDesign uses the language setting to determine how to hyphenate a given word. And if “No Language” is applied to the text, it will not be hyphenated at all.

But the language applied to text can have other unexpected consequences. For instance, some OpenType fonts will display digits differently depending on the language applied to text. And other OpenType features may or may not be available, or may simply not work, depending on the language setting.

It is possible to use InDesign’s Find/Change dialog to search for text with any language applied to it and change the language to any other, as needed.

But to do this, you must first know what languages are are being used throughout the document. You can’t search for English:UK and replace it with English:USA if you don’t know that it’s there! Or, to be precise, you can, but since InDesign supports so many languages, it would be impractical to search for each one on the off-chance that it’s being used somewhere!

As far as I can tell, there is no simple way of knowing what languages are in use in a given InDesign document. InDesign’s Preflight feature would be the logical place for this information to be displayed, but there is no such option.

The Script

Luckily, it is not too difficult to generate a document language list using InDesign’s powerful scripting capabilities.

To use the script, make sure that you have a document open in InDesign and run the script. (It should be downloaded and placed in your Script Panel folder.)

After a few moments (depending on the length and complexity of the InDesign file), a text document should open in your default text editor listing all languages used in the document. The list doesn’t include any information about where those languages are used – it just alerts you to the fact that they are used somewhere in the document. Now that you know what languages are in use, it’s easy to find the text with InDesign’s built-in Find/Change.

The script should find all languages in all text, including tables, footnotes and endnotes.

To download the script, please fill in your name and email below and it will be sent to you automatically. By doing so you also agree to receive occasional emails from Id-Extras.com with interesting InDesign tips and tricks, news, and free scripts.