Skip to main content
Participant
March 7, 2025
Question

Script to change language in some words

  • March 7, 2025
  • 2 replies
  • 227 views

Hello!

Is there a script that can mark all texts that are not in my default language and insert a character style? I have a file in Portuguese, but I need to mark all the words in English with a character style.

2 replies

Robert at ID-Tasker
Legend
March 8, 2025

@vanessa_2826 

 

Any chance you have a list of those English words?

 

If not, then here is a scripting solution to what @Joel Cherney suggested - by @Peter Kahrel:

 

https://community.adobe.com/t5/indesign-discussions/script-to-extract-a-list-of-all-spelling-errors-in-a-document/m-p/13928385#M533243

 

Joel Cherney
Community Expert
Community Expert
March 8, 2025

I've never heard of anything along those lines for InDesign. I can think of many possibilities that might work, but much depends on how your original document is set up.

 

What language(s) already appear in the Language dropdown? If the whole document is e.g. marked as Portuguese, including all English terms, then no matter what method you use, there would be some manual language assignment work to do. However, I can easily imagine subjecting your book to a Portuguese spell check, and seeing it up so that you could choose to mark any work that fails the check as English.