Script to change language to all Paragraph Styles?

Is there a script out there that will change the language of all styles in a document? I frequently need to take US English files with multiple folders of styles and convert them for Canada English and French. Find/replace language does well enough for one-off use but I would like to clean up file as I go for future use without going through each style one and a time.
-Thanks!

If you are using OSX this AppleScript will change all the style definitions and text for the active document to French. Just edit the first line for the desired language so Canadian English would be:  set lang to "English: Canadian"
set lang to "French"
tell application "Adobe InDesign CS6"
    set pstyles to all paragraph styles of active document
    repeat with i from 1 to number of items in pstyles
        try
            set applied language of item i of pstyles to lang
        end try
    end repeat
    set cstyles to all character styles of active document
    repeat with i from 1 to number of items in cstyles
        try
            set applied language of item i of cstyles to lang
        end try
    end repeat
    try
        set applied language of every paragraph of every story of active document to lang
    end try
end tell

Similar Messages

  • [JS, CS3] a script to change language in all paragraph styles

    Hi,
    I made a script to change the language in all paragraph styles to "French", but when I run it I get the error: "Invalid request on root style". Could you please tell me what am I missing?
    myDoc = app.activeDocument;
    myStyles = myDoc.paragraphStyles;
    for (i = 0; i < myStyles.length; i++)
    myStyle = myStyles[i];
    myStyle.appliedLanguage = "French";

    Thanks a lot!
    The problem is solved
    Ola

  • Script to change language for all  style lables in one click

    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

    Hi Selva,
    I have been trying for a long time to change the paragraph composer of all paragraph styles in a document, say from Adobe Paragraph composer to Adobe single-line composer. Nothing goes. Do you know how I can do that? I work with the french version and the composers are named: Compositeur de paragraphe Adobe and Compositeur ligne simple Adobe. The following works for a paragraph style if i refer explicitely to its name. But then, I don't gain much. So I want to find a way to change ALL paragraph styles at once. Your help would be great.
    var myDoc = app.activeDocument;
    var myPstyle = myDoc.paragraphStyles.item("Indents");
    myPstyle.composer = "Compositeur ligne simple Adobe";
    Thanks in advance.
    Diane

  • How to get all paragraphs style and their fonts of a  indesign file and write all info with para info into txt file with scripting

    how to get all how to get all paragraphs style and their fonts of a  indesign file and write all info with para info into txt file with scriptingstyle and their fonts of a  indesign file and write all info with para info into txt file with scripting

    I write the script this one works
              var par=doc.stories.everyItem().paragraphs.everyItem().getElements();
      for(var i=par.length-1;i>=0;i--)
           var font=par[i].appliedParagraphStyle.name;
            var font1=par[i].appliedFont.name;
             var size=par[i].pointSize;
            WriteToFile (par[i].contents  +   "\r" +  "Style  : " + font  + "\r" +  "FONT1  : " + font1  + "\r" +  "Size  : " + size  + "\r", reportFilePath);
                            function WriteToFile(text, reportFilePath) { 
        file = new File(reportFilePath); 
        file.encoding = "UTF-8"; 
        if (file.exists) { 
            file.open("e"); 
            file.seek(0, 2); 
        else { 
            file.open("w"); 
          file.writeln(text);  
        file.close(); 
    Thanks for all your support

  • I want to change the name of paragraphs styles. Is this possible by script.

    I want to change the name of paragraphs styles. Is this possible by script.
    Thank you

    Hi Hasvi,
    May the below coding helps for your question:
    var myDocument = app.activeDocument
    var myPStyles = myDocument.paragraphStyles.everyItem().getElements()
    for(i=2; i<myPStyles.length; i++)
    myPStyles[i].name = "A_".concat(myPStyles[i].name);   //Please change as per your requirement
    //myPStyles[i].name = "BBBBBB_".concat(myPStyles[i].name);
    Please use the below URL for more details.
    http://forums.adobe.com/message/4909340#4909340
    If my answers helps you, please provide "Helpful" or "Correct Answer" for me.
    Thanks
    Siraj

  • Script to change language

    I need to find all cyrillic characters in a file and set their language to Russian. CS3 cannot find them with grep, so I reckon on doing them one at a time, can anyone help me with an Applescript line which would find X and set its language to Russian? The cyrillic characters in the font in question (Baskerville 10 by Storm) are unicode 0401 through 0491, I'm not sure if the script line needs to be of text or glyph type...
    Thanks!
    Andrew Brown
    (PS. I use the sample find-replace script a lot, but don't know how to adapt it to this purpose.)

    That works perfectly, thanks Peter ! -- AB
    On 17 Feb 2008, at 18:16, Peter Kahrel wrote:
    > A new message was posted by Peter Kahrel in
    >
    > InDesign Scripting --
    > Script to change language
    >
    > CS3 cannot find them with grep
    >
    > Try this: search for [\x{0401}-\x{0491}] and set Rusian in the
    > Change Format pane. That should doe what you want.

  • [AS, CS3] Change Values in [No Paragraph Style]

    Is it possible to change the value of [No Paragraph Style]? I tried this (it's a german version; composer is singe line composer, language is english: GB):
    tell application "Adobe InDesign CS3"
    tell active document
    set myInfo to {object reference, name} of paragraph style 1
    set myPara to item 1 of myInfo
    set ligatures of myPara to false
    set composer of myPara to "Adobe Ein-Zeilen-Setzer"
    set hyphen weight of myPara to 0
    set applied language of myPara to language "Englisch: Großbritannien"
    end tell
    end tell
    Thanks
    Tobias

    This is an "at your own risk" solution: export a .inx version of a document and edit the definition of No Paragraph Style in it. That will change it for that document and any derivative documents you make from it, but you can't change the application default.
    Dave

  • Can I clear all paragraph style overrides at once?

    Sometimes when I change a paragraph style, the places where I've applied it don't conform. Why is this?
    I end up having to go through the whole document and hitting "clear overrides." Is there an easier way?
    Thank you!

    Local formatting always trumps a style.
    Try using Find/Change, though, searching for the style and replacing with the same style. That might do it.

  • How to change language in all Skype email communic...

    Hi Skype,
    I live in Hong Kong because my job brought me here. I don't speak Chinese. I don't read Chinese. I don't even understand Chinese. When I log on to your desktop client, everything appears in English. When I log on to skype.com, everything appears in English. So please tell me why do you have to send me offers, news, surveys, and everything else in Chinese. I don't even know if you are sending the stuff to me in traditional or simplified Chinese and I don't want to copy and paste your email into GOOGLE Translate to understand what you are promoting. I went through account settings various times but I can't find any setting to change default language for all email communications. 
    I represent not only myself but a lot of friends I have made here in Hong Kong who literally go through the same pain. I have intentionally subscribed to Skype news and communications. But I am about receiving 1 or 2 more emails in an alient language away before I permanently block all Skype communications.  And permanently blocking would be a lose-lose scenario for both of us because I really like Skype. 
    Anyways, the main point from this message is how do I change the language of all your email communications?

    to request to change the language you are receiving to the one you prefer, you need to contact customer service.
    https://support.skype.com/en/faq/FA1170/how-can-i-contact-skype-customer-service
    IF YOU FOUND OUR POST USEFUL THEN PLEASE GIVE "KUDOS". IF IT HELPED TO FIX YOUR ISSUE PLEASE MARK IT AS A "SOLUTION" TO HELP OTHERS. THANKS!
    ALTERNATIVE SKYPE DOWNLOAD LINKS | HOW TO RECORD SKYPE VIDEO CALLS | HOW TO HANDLE SUSPICIOS CALLS AND MESSAGES

  • Pages 5. change languages for different paragraphs?

    In Pages '09 I could change the spell check language for different paragraphs by going to the Inspector, then "text" then "more." That appears to be gone now. Does anyone know how to do it?

    Thanks Rene! That got me thinking that I didn't test spell check with a new document (where I hadn't set the languages before). It looks like Pages 5 detects the language automatically and changes the spell-checker. Check this out:
    I pasted the first three paragraphs from wikipedia articles and then mispelled one word in each paragraph. Pages found the misspelled words but did not underline the rest.
    Then in the last two paragraphs (which I typed), you can see that "gli" was NOT underlined in the Italian sentence but WAS underlined in the English one. I guess this explains why there's no setting for it. It is automatic now.

  • Change language to all users except admin

    Hello
    I hope this is the right forum.
    I was wondering if there is a way to change the interface & keyboard languages to all regular users except the admin?
    1. What I am trying to do is basically to change an English interface into a Russian. How do I do it. Is it have to do with adding/changing anything in GPO?
    2. What files if any do I need to make a change like that? 
    The machine runs Windows Server 2008 R2
    What I need is that not only the Windows interface will change, but possibly other software that run on the server will show Russian/Cyrillic
    Thank you

    you wont change the OS language im quite sure of that. that need to be selected at point of install
    as for keyboards ive used this guide and it worked for me http://social.technet.microsoft.com/wiki/contents/articles/6281.how-to-set-the-keyboard-layout-through-group-policy-gpo.aspx

  • Specified font need to be changed in all paragraph styles

    Hi All,
    Is there any option to change a font which is used in many paragarph styles to some other font.
    Thanks in advance,

    ok.. this should work for most cases:
    function main(){
              var doc=app.activeDocument;
              var myDialog= new Window("dialog","Font replacer");
              var grp1=myDialog.add("group");
              var panel1=grp1.add("panel",undefined,"Find font:");
              var panel2=grp1.add("panel",undefined,"Change font:");
              var findFonts=doc.fonts.everyItem().name.join("\r").replace(/\t/g,":").split("\r");
              var chFonts=app.fonts.everyItem().name.join("\r").replace(/\t/g,":").split("\r");
              var myFindDrop=panel1.add("dropdownlist",undefined,findFonts);
              var myChDrop=panel2.add("dropdownlist",undefined,chFonts);
              myDialog.add("button",undefined,"Ok",{name:"ok"});
              myDialog.add("button",undefined,"Cancel",{name:"cancel"});
              myFindDrop.selection=myFindDrop.items[0];
              myChDrop.selection=myChDrop.items[0];
              if (myDialog.show()) {
                        var pstyles = doc.allParagraphStyles;
                        var cstyles = doc.allCharacterStyles;
                        var ffont = myFindDrop.selection.text.replace(/:/g,"\t");
                        var tfont = myChDrop.selection.text.replace(/:/g,"\t");
                        for (var a = 1; a < pstyles.length; a++) {
                                  if (pstyles[a].appliedFont.name==ffont) {
                                            pstyles[a].appliedFont = tfont;
                        for (var i = 1; i < cstyles.length; i++) {
                                  if ((cstyles[i].appliedFont+'\t'+cstyles[i].fontStyle==ffont)||(cstyles[i].appliedFont.name==ffont)) {
                                            cstyles[i].appliedFont = tfont;
    }app.doScript("main()",undefined,undefined,UndoModes.fastEntireScript,'Global Change Font');
    When i'll have the time i'll probably do a more advanced version, to change font families or just font variants etc.
    However, for your example, it won't change the character style "three". I'm curious about how did you defined that style because while in the interface it shows that the applied font is "Minion Pro" and the font style is "Regular", when i get the font Style property from the script it reports as "Roman". Very very wierd.

  • Need a script to change attribute of all images from not printable to printable

    Hi everyone,
    I have a couple of books with contain numerous images. These images are al set to not printable. Now the publisher wants to print books himself so images should be printable. Anyone have a script to automate this?
    thanx in advance

    Hi,
    Use this JS codes.  It will change the all non printable images into printable.
    var allGRs = app.activeDocument.allGraphics;
    var a = allGRs.length;
    while (a--) {
        if (allGRs[a].itemLayer.printable == false) {
                allGRs[a].itemLayer.printable = true;
    I hope this helps to you.

  • I need help writing a script that finds the first instance of a paragraph style and then changes it

    I need help writing a script that finds the first instance of a paragraph style and then changes it to another paragraph style.  I don't necessarily need someone to write the whole thing, by biggest problem is figuring how to find just the first instance of the paragraph style.  Any help would be greatly appreciated, thanks!

    Hi,
    Do you mean first instance of the paragraph style
    - in a chosen story;
    - on some chosen page in every text frames, looking from its top to the bottom;
    - in a entire document, looking from its beginning to the end, including hidden layers, master pages, footnotes etc...?
    If story...
    You could set app.findTextPreferences.appliedParagraphStyle to your "Style".
    Story.findText() gives an array of matches. 1st array's element is a 1st occurence.
    so:
    Story.findText()[0].appliedParagraphStyle = Style_1;
    //==> this will change a paraStyle of 1st occurence of story to "Style_1".
    If other cases...
    You would need to be more accurate.
    rgds

  • FIND/CHANGE - Applying Paragraph Style

    Hello,
    I used FIND/CHANGE to apply my paragraph style and when I apply the paragraph style... it applies the style to the entire line.
    For example,
    A. #70712       resulted to         A. #70712
    I only wanted the "#70712" to be changed to my style. I used the GREP search and entered #.+ and then I choose the paragraph style I want and clicked change all. The problem is that it changed all the text on that line and applied the paragraph style.
    Please help. Thank you very much.

    graphicsoc wrote:
    Hello,
    I used FIND/CHANGE to apply my paragraph style and when I apply the paragraph style... it applies the style to the entire line.
    For example,
    A. #70712       resulted to         A. #70712
    I only wanted the "#70712" to be changed to my style. I used the GREP search and entered #.+ and then I choose the paragraph style I want and clicked change all. The problem is that it changed all the text on that line and applied the paragraph style.
    Please help. Thank you very much.
    If I understand your request correctly:
    If your paragraph style uses a numbered list to create the "A." and the remainder of the paragraph consists of only "# 70712" that you type in manually (or place from an existing file), I believe that you you don't need GREP. You can format the auto-numbered list differently from the remainder of its paragraph, by specifying a character style for the number portion.
    To extract only the non-numbered portion of an auto-numbered paragraph, for a TOC, in the Table of Contents dialog box, open the bottom part by clicking More Options if necessary, and in the Numbered Paragraphs pull-down menu, select Exclude Numbers.
    Read more about Table of Contents in Help, and/or with a Google search for terms like "InDesign table of contents numbered list exclude numbers" without quotes.
    If you need additional special formatting "tricks" in the source paragraphs, or in the TOC entry paragraphs, look into Nested Styles and GREP
    Styles in Help or Google searches.
    HTH
    Regards,
    Peter
    Peter Gold
    KnowHow ProServices

Maybe you are looking for

  • PARAMETER_CONVERSION_ERROR in case of RFC

    Hi, I am calling rfc function module FM1 with tables parameter where i have two tables, in the interface i have added two tables by referring structures. FM1 interface table1 like struct1 ( structure with enahncement category can be enhanced characte

  • Flash drives and sleep issues

    I'm not sure if this is a Tiger problem or a G4 issue, but I'll start here. I plug 1Gb flash drives into an Adaptec FW+USB2 card in my Quicksilver running 10.4.11 and the computer will go to sleep fine. Read on. With a SanDisk drive when I wake up th

  • HT1473 I have Windows, and opening a folder is no longer an option in iTunes.  What do I do?

    For some reason, iTunes isn't finding my music anymore, so I am trying to get iTunes to realize where my backup music is.  I've also tried physically moving all of the songs into the iTunes media folder and telling iTunes to organize it.  Because iTu

  • Download link for Adobe Creative Suite 4

    I have previously purchased Adobe Creative Suite 4 Web Premium which came nicely in a box with CD-Rom (for windows and mac) for installation. Recently, I have changed my pc into an iMac and I did not purchase the cd-drive. Now, I realised I couldnt i

  • Expedite existing orders in MRP

    Customer would like to expedite or defer existing purchase or production orders in MRP prior to considering new recommended orders.  We can not find support for this within the MRP wizard.  Is there something that we have overlooked or is there a kno