|
From: Kevin A. <al...@se...> - 2002-01-19 00:10:24
|
Part of the point of resource files is that someone other than the coder should be able to translate the various menus, fields, buttons, labels, strings used in dialogs, etc. to another language increasing the target audience for a program. As part of the PythonCard framework and documentation we can provide guidelines for writing programs that are easier to internationalize by providing conventions to follow. I would like to have at least one sample that deals with internationalization issues. I don't expect to completely solve this issue in one pass, especially since we don't have complete Unicode support for use everywhere. The relevant module in Python is locale: http://www.python.org/doc/current/lib/module-locale.html I do not know whether wxPython has additional internationalization features we should be aware of. I plan to add support for strings and other country/language dependent elements in the resource file. It would be relatively simple for the framework to check the users locale when it starts up and use the appropriate resource file. The user code would of course have to use the right string, date, and number formatting to work transparently. The user code would not have to maintain a separate set of handlers or names referencing resource objects since the names such as 'menuFileExit' are ids never seen by the user, only by the user code. For example, if we used country codes, we might have: minimal.rsrc.py minimal.fr.rsrc.py Showing that a "French" version of the resource is available and should be used if the users locale default was French. Of course, the users preferred language is not the same as their country, so using a language identifier might be a better choice. In fact, we probably need to deal with language and country independently. If someone could volunteer to help chase down relevant internationalization issues, help with doing an international PythonCard sample, that would be a great help. This is not an area of expertise for me, but I know it is something we have address at some point and I would like to get it on the radar now rather than later. Other suggestions, places to look for help, etc.? ka |