Terry J. Reedy <tjre...@udel.edu> added the comment:

Tkinter wraps the tcl/tk gui framework.  The file dialogs and messageboxes are 
provided by tk.  When possible, the file dialogs utilize the native OS file 
dialogs.  The localization is done the by the OS. If the messageboxes are 
localized, then I presume the same is true of them also.

tkinter.simpledialog is a tkinter add-on module written in Python, using tk 
widgets.  SimpleDialog does not have default buttons; they must be supplied in 
the initialization call.  Dialog does provide default *example* buttons.  The 
docstring says "override if you do not want the standard buttons".  

Tk does not provide localized [Ok] and [Cancel] buttons.  AFAIK, Python does 
not provide access to the OS local translations. You will have to provide 
localization yourself.

A reasonable enhancement request might be to add "ok='OK', cancel='Cancel'" to 
the signature of Dialog.__init__ so that a user could pass in local 
translations. These would then be passed on to buttonbox, to be used instead of 
the current hard-coded strings.

----------
nosy: +terry.reedy
title: tkinter.simpledialog default buttons (not buttonbox) are not localized, 
unlike all messagebox -> Localize tkinter.simpledialog.Default buttons as with 
file dialogs.
type: behavior -> enhancement
versions: +Python 3.7 -Python 3.5

_______________________________________
Python tracker <rep...@bugs.python.org>
<https://bugs.python.org/issue31613>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com

Reply via email to