Skip to main content
Trevor:
Legend
July 13, 2014
Answered

Cancel / OK non-English Buttons

  • July 13, 2014
  • 1 reply
  • 835 views

Hi all,

As well known when a dialog button string is "OK" or "Cancel" a default action occurs (1 is returned for OK and 2 for Cancel)

Is this true for non-English versions of Indesign?

I would presume let's say on the German version of InDesign on the built-in dialogs one see the terms OK and Abbrechen but does Cancel work? And out of curiosity does "Abbrechen" work?

var w = new Window('dialog'),

    b1 = w.add('button', undefined, "OK"),

    b2 = w.add('button', undefined, "Cancel");

alert((w.show() == 1) ? "OK" : "Cancel");

Thanks

Trevor

This topic has been closed for replies.
Correct answer TᴀW

Hi Trevor,

My guess is that the using the string OK or Cancel for the text property

is probably not going to work for non-English localizations. (Can anyone

confirm that? Uwe?)

The way to make sure it does work, though, is to use the Name property

(it's a creation property) as opposed to the Text property.

If you do that, you can use the two special names OK and Cancel, and I

believe that will work in any localization:

b2 = w.add('button', undefined, "Cancel", );

Ariel

1 reply

TᴀW
TᴀWCorrect answer
Legend
July 13, 2014

Hi Trevor,

My guess is that the using the string OK or Cancel for the text property

is probably not going to work for non-English localizations. (Can anyone

confirm that? Uwe?)

The way to make sure it does work, though, is to use the Name property

(it's a creation property) as opposed to the Text property.

If you do that, you can use the two special names OK and Cancel, and I

believe that will work in any localization:

b2 = w.add('button', undefined, "Cancel", );

Ariel

Trevor:
Trevor:Author
Legend
July 13, 2014

Hi Ariel

My guess is that my script will work in the non-English localizations but also waiting to hear from Uwe

I highly doubt b = w.add('button', undefined, "בסדר") will work

The example line you wrote at the bottom came messed up maybe you meant to write b2 = w.add ("button", undefined, "Abbrechen", {name: "cancel"}); ?

Trevor

TᴀW
Legend
July 13, 2014

Yes, the last line is what I wrote.

In short, I suspect that using one of the special Name

creation-properties (OK and Cancel) will work in any localization,

whereas the Text property of the button is probably less robust.

Let's see if anyone can confirm...