i18n and GUI under Windows
"Martin v. Löwis"
martin at v.loewis.de
Tue Sep 7 14:30:54 EDT 2004
Andr? Roberge wrote:
> In short: I'm looking for a *simple* example of how to write a program
> that can have its GUI in at least two languages under Windows ...
> using only Python, of course!
I think the most simple approach is using a dictionary. Make one
Python file per language, and have that file contain only a single
dictionary named "translations". For keys, you have three options:
- use the English messages as keys (e.g. "Please enter your name")
- use short identifiers as keys (e.g. "EnterName")
- use numbers as keys (e.g. 116)
Regards,
Martin
More information about the Python-list
mailing list