Skip to main content
Participating Frequently
March 11, 2025
Question

How to change language in all paragraph styles all at once?

  • March 11, 2025
  • 4 replies
  • 1097 views

I have a book in English that all paragraph and charachter styles are already set, now I need to make a copy of english styles and change all at once to Spanish, is there any easy way in Indesign to change all at once without clicking on each paragraph style and change to spanish one by one?

Remmeber I don't make style from scratch, only changing previous styles. 
I use Indesign CS6
Has Adobe any script for that?

4 replies

Community Expert
September 13, 2025

Hi @dtp_1544 ,

we recently discussed this topic in a similar thread.

 

Scripting with ExtendScript:

If you are after the string for a specific language and you need the "international" version, the one that should work in all localized versions of InDesign, one can get the important part of the string from selected text with the applied target language like that:

alert( app.selection[0].appliedLanguage.untranslatedName );

 

Simply add "$ID/" in front of the alerted string and you can use it with the script Robert @Robert at ID-Tasker  posted above.

 

All in all like that:

// Get the untranslated language name from selected text.
// Keep it in a form for all localized versions of InDesign:
var languageName = "$ID/" + app.selection[0].appliedLanguage.untranslatedName;

// Apply the found language to all paragraph styles.
// Also ones that are stored in paragraph style groups.

// With:
// var n = 1 the basic paragraph style is also affected.
// NOT SO with:
// var n = 2

for( var n = 1; n < app.activeDocument.allParagraphStyles.length; n++ )
{
	app.activeDocument.allParagraphStyles[n].appliedLanguage = languageName ;
};

 

Regards,
Uwe Laubender
( Adobe Community Expert )

Community Expert
March 12, 2025

Hi @dtp_1544 ,

just a remark on the value that you need for property appliedLanguage in Robert's script:

Best use a representation that will work in every localisation of InDesign, not only in the English one.

With Spanish in mind you can test this string:

"$ID/Spanish"

 

So with Robert's code it would be:

for (var a = app.activeDocument.allParagraphStyles.length - 1; a > 1; a--)
{
   app.activeDocument.allParagraphStyles[a].appliedLanguage = "$ID/Spanish";
}

 Just tested this with my German InDesign 2025.

 

Regards,
Uwe Laubender
( Adobe Community Expert )

 

Community Expert
March 13, 2025

Just another remark on the strings used with appliedLanguage:

"Polish" or "Spanish" for example will not work with my German InDesign.

 

Regards,
Uwe Laubender
( Adobe Community Expert )

Robert at ID-Tasker
Legend
March 11, 2025

@dtp_1544 

 

for (var a = app.activeDocument.paragraphStyles.length - 1; a > 1; a--)
{
   app.activeDocument.paragraphStyles[a].appliedLanguage = "Polish";
}

 

https://creativepro.com/how-to-install-scripts-in-indesign/

 

You could change "a > 1;" to "a > 0;"- but this will also change the definition of "[Basic Paragraph]" Style.

 

The other option would be to export IDML file and edit it directly.

 

Peter Spier
Community Expert
Community Expert
March 11, 2025

@Robert at ID-Tasker 

Changing language for [Basic Paragraph] would probably be appropriate in this case, especially if any other style is based on it.  And as I read the question, the OP wants to change the language to Spanish rather than Polish so that would be another change the should make in your code.

Robert at ID-Tasker
Legend
March 11, 2025

@Peter Spier 

 

Yes, of course, language was just an example - and should be changed 😉 

 

Willi Adelberger
Community Expert
Community Expert
March 11, 2025

If all styles are children of a single parent styl, as it should be, change the language of that style. 

Frans v.d. Geest
Community Expert
Community Expert
March 12, 2025

I respectfully disagree with 'As it should be'. Absolutely not, that would be a nightmare.