2 Replies Latest reply on May 20, 2008 7:29 AM by Peter Kahrel

    [JS] Script Localization to Deal with Other Languages

      First let me say that I still support both CS2 and CS3 with my scripts.

      My issue is that some script calls, such as strokeType = "Dotted" only work in the English version and fail in other languages that call these objects another name. What's the best way to deal with this?

      Is there some auto translation InDesign can do since it's an internal object? I realize it can't translate regular text, but since this is a built in item I thought there may be some hope. :) Has anyone else run into this and how do you deal with it?

      Thanks in advance,
        • 1. Re: [JS] Script Localization to Deal with Other Languages
          Level 1
          Look on page 96 (near the bottom) of the CS3 JavaScript Scripting Guide. I'm not sure if it applies to the specific item you mention, but I would expect so. However, I have no idea what to do in CS2 -- you might need your own translation table.

          • 2. Re: [JS] Script Localization to Deal with Other Languages
            Peter Kahrel Adobe Community Professional & MVP
            This is a bit messy and, I think, buggy. I recently ran into the problem that in some cases, you have to use the English term in localised apps (I checked English Intn'l, French, and German installations), and in other cases you need the localised term. For example, in the French ID you need to specify Black as "Black" (not "Noir", as the interface would suggest). On the other hand, the French version doesn't like "Dashed" as a line style, you need "Tirets". The German version has the same asymmetry.

            One approach is always to use a try/catch statement, trying the localised version and if that fails, doing the English version, but that's not exactly what you want. The trouble is that to find this out systematically, you need to bother people with different installations to try and find out what works and what doesn't.

            Apart from Dave's reference, you can also check "JavaScript Tools Guide CS3" (in ESTK, Help > SDK), from pp. 92 and 206.