[Python-Dev] Fwd: i18n (original) (raw)
Anders J. Munch ajm at flonidan.dk
Thu Aug 26 10:42:00 CEST 2010
- Previous message: [Python-Dev] Fwd: i18n
- Next message: [Python-Dev] Fwd: i18n
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Terry Reedy wrote:
Localized messages should be in addition to rather than a replacement for the English version. I thought we had this discussion somewhere -- here? ideas? maybe a tracker issue?
This could be done as a free-standing library, there's no reason to involve core CPython. Just do message translation at a later stage, e.g. in a custom sys.excepthook.
I did a quick demo: | Python 3.2a1 (r32a1:83346, Jul 31 2010, 18:36:39) [MSC v.1500 32 bit (Intel)] on | win32 | Type "help", "copyright", "credits" or "license" for more information. | >>> import localiseexceptions | >>> localiseexceptions.installexcepthook('DK') | >>> None.nosuchattr | Traceback (most recent call last): || File "", line 1, in || AttributeError: 'NoneType' objektet har ingen attribut 'nosuchattr'
localise_exceptions.py is at http://pastebin.com/QJCn8gmd
regards, Anders
- Previous message: [Python-Dev] Fwd: i18n
- Next message: [Python-Dev] Fwd: i18n
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]