Skip to main content
Participating Frequently
Mar 11, 2025 2:24 PM UTC
Question

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

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?

12 replies

Community Expert
Sep 13, 2025 12:37 PM UTC

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 )

Translate
Community Expert
Mar 12, 2025 6:38 PM UTC

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 )

 

Translate
Community Expert
Mar 13, 2025 10:26 AM UTC

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 )

Translate
Robert at ID-Tasker
Legend
Mar 11, 2025 5:20 PM UTC

@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.

 

Translate
Peter Spier
Community Expert
Community Expert
Mar 11, 2025 7:54 PM UTC

@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.

Translate
Robert at ID-Tasker
Legend
Mar 11, 2025 8:00 PM UTC

@Peter Spier 

 

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

 

Translate
Willi Adelberger
Community Expert
Community Expert
Mar 11, 2025 2:31 PM UTC

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

Translate
Frans v.d. Geest
Community Expert
Community Expert
Mar 12, 2025 7:04 PM UTC

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

Translate