8 Replies Latest reply: Jan 30, 2012 3:02 AM by designer1955 RSS

    changing language with one click

    designer1955 Community Member

      We often make coproductions, and it is really a pain to get all stylelables to the Dutch language. It would be nice to have a saveoption to change original (often English) language into other (in my case Dutch) language, without changing all stylelabels one by one.

        • 1. Re: changing language with one click
          Peter Spier ACP/MVPs

          Language is a character-level attribute and I suspect you already know that changing the language changes which dictionary is used for both spelling and hyphenation rules. The big advantage to keeping it at the character level is that you can, in fact, assign language as part of a style in order to mark "foreign" words with the correct dictionary when they appear in other text. If you do this with a character style that only assigns the language you can change the font specifications in the underlying paragraph style and your "foreign words" will also change, and you'll have no need for a local format override.


          That said, I can see where if you get a file that was created with all the text in the wrong language you might want a fast way to fix it. As long as you understand that you will be wiping out potentially useful styles at the same time, I think you could probably script this. You should probably start a thread over in scripting to see if they can help: InDesign Scripting

          • 2. Re: changing language with one click
            designer1955 Community Member

            Thanks Peter. Yes i am aware of the influence on dictionary and hypenation.But in our case we really need to change all text into a new language. Quark has such a option. You can save as multi language (which allows you to have parts of text in different language) or single language. When saving as single language it asks for desired language. But i really dont want to use Quark anymore. So such an option is  Indesign would be great.

            But i will follow your suggestion and see if someone has a script.

            Thanks again for taking the trouble to answer me!

            Peter Verwey

            • 3. Re: changing language with one click
              John Hawkinson Community Member

              Err, so, Peter S. is correct that it is a simple script to change the language associated with all character styles.

              But usually there are easier ways.

              Peter V., do either of these meet your needs?

              1) Base all your character styles on a common character style whose language attribute you can change

              2) Use the formatting options in Find/Change to change the language of all text (search for wildcard)

              • 4. Re: changing language with one click
                Peter Spier ACP/MVPs

                John the request, though, was to change the language in the styles, so I don't see how Find/Change is going to help. Nor I think will the based-on sulution work in cases where you are working with existing files. You'd need to set that up in advance.

                • 5. Re: changing language with one click
                  John Hawkinson Community Member

                  Right, right, I just wanted to point it out in case it worked for him.


                  Also, incidently, in IDML, even character styles that aren't based on any other are actually based on a magic master "CharacterStyle/$ID/[No character style]" character style. So you can export to IDML, unzip, edit the definition of that one style, rezip, and import the IDML, and then all the other styles will fall into line.


                  This is probably more effort than a script though.

                  • 6. Re: changing language with one click
                    designer1955 Community Member

                    Thanx guys. Selva_TRM just wrote me a solution.


                    Hi Peter


                    Please try this code.



                    var a = app.activeDocument.paragraphStyles;

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

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



                    Will try it asap (at the moment new computer being installed.

                    Thanx in advance Selva!!!

                    • 7. Re: changing language with one click
                      Laubender MVP

                      @designer1955 – this code will not work if you store your paragraph styles in subfolders. The scope of "app.activeDocument.paragraphStyles" are  paragraph styles at top level. The solution here is to use "allParagraphStyles" instead of "paragraphStyles".


                      Also it will give you the old rules by using "app.languagesWithVendors.item("Dutch")"


                      In my German version there are two "Dutch" options "Niederländisch: Alte Rechtschreibung" (old one) or "Niederländisch: Rechtschreibreform 2005" (new reformed).


                      See Marc Autret: "List of available Languages (and related secrets)" at:




                      Simply "Dutch" will get you the old rules.

                      "nl_NL_2005" will get you the new reformed rules:


                      var a = app.activeDocument.allParagraphStyles;
                      for (var i=a.length-1; i > 0; i--){
                      a[i].appliedLanguage = app.languagesWithVendors.itemByName("nl_NL_2005");


                      Ok. Now we have set all paragraph styles.

                      Be aware that "appliedLanguage" is on "character" level! So you need to change all character styles as well, if they apply a different language. And oh!, there could be local formatting, too. Now changing the paragraph style does not change the local formatting. You see, it's getting complicated here…



                      • 8. Re: changing language with one click
                        designer1955 Community Member

                        Thanks Uwe. You gave it some thought. The problems you mention make it more urgent to incorporate it in Indesign itself. If Quark can do so, Indesign should be able to do better! And for us its a real pain to have 400+doc for one book (co production from english prublishers, with 80+ paragraphstyles), which all have to be changed, to ensure correct hyphenation. The script Selva wrote seems to work, but i will check your remarks.

                        Thanks for your time and effort!

                        kind regards