[Tkinter]: tkMessageBox Internazionalization?

Matthew Dixon Cowles matt at mondoinfo.com
Tue Jun 12 20:24:51 CEST 2001


On Tue, 12 Jun 2001 17:25:17 GMT, Nicola S. <stain at prigioniero.it>
wrote:

>Is there a comfortable way to change the text of the buttons in the
>dialog window shown, for example, by tkMessageBox.askokcancel?

>I'd like to use another language for the text 'OK' 'Cancel'; but
>maybe this concerns tcl/tk internals.

It seems that the text for those buttons is, as you suspect, buried in
the sources. You might find it almost as easy to use the SimpleDialog
module, which seems to be more flexible:

>>> s=SimpleDialog.SimpleDialog(root,text="Continue?",
... buttons=("Yes","No"),default=0,cancel=1,title="test")
>>> s.go()
1

Regards,
Matt



More information about the Python-list mailing list