Skip to main content
Inspiring
January 24, 2012
Question

script to change language for all style lables in one click

  • January 24, 2012
  • 2 replies
  • 1550 views

Hello,

We are a dutch pre press company and often we get (English or French or German) books that are translated into Dutch. And often the copublisher has created documents with 80+ stylelables. It is quite a pain to change all stylelables one by one into Dutch (for dictionary and correct hypenation). Quark has an option to save a document as multi language or singe language. With the last option the programme asks for the desired language and all stylelables are immediately changed to (in my case) Dutch. That works great. Maybe someone out there has a script to achive the same in Indesign (5 or 5.5?) Thanks in advance!

kind regards

Peter

This topic has been closed for replies.

2 replies

January 25, 2012

Peter,

Selva gave you a very simple and elegant solution. If you ever needed a script that would change all styles and all text of all open documents with a dialogue allowing you to choose the language, I suggest you write to Hans Halser (http://www.fachhefte.ch/magazine.php?t=Equipe+des+auteurs&read_group=44) at his email address: hsa@ringier.ch. He wrote a script that a copyright. But he is retired. Maybe he would give to you and you can adapt it.

Diane.

Inspiring
January 25, 2012

Thanx Diana,

I will try and get it

Kind regards

Peter

Selva_TRM
Inspiring
January 24, 2012

Hi Peter

Please try this code.

var a = app.activeDocument.paragraphStyles;

for (var i=a.length-1; i > 0; i--){

a.appliedLanguage = app.languagesWithVendors.item("Dutch");

}

Thanks

Selva

Inspiring
January 24, 2012

Hi Selva

Thanx a lot for your input!

Kind regards

Peter

January 25, 2012

Hi again Selva,

I just tried what you suggesed to Peter and IT WORKS. Allelluiah!!!

var a = app.activeDocument.paragraphStyles;

for (var i=a.length-1; i > 0; i--){

a.composer = "Compositeur ligne simple Adobe";

}

So thanks.

Diane