[I18n-sig] Re: Translated messages and 'gettext'

M.-A. Lemburg mal@lemburg.com
Mon, 05 Jun 2000 15:53:09 +0200

[gettext and changing languages on the fly]
> Peter's fintl.py, and my modified version of fintl.py, are by themselves
> freestanding modules, they do not require libintl or the gettext
> library, they are Python reimplementations (of just the message
> retrieval API).  Peter's is free for any use and my module inherits that
> license (is also free).
> The .so I made which modifies the C gettext library is, obviously,
> GPL'ed - however, it doesn't seem like it would be too hard to, again,
> make a free implementation which just understands GNU (and, if possible,
> Solaris-style and other platforms if there are) .mo files and implements
> only gettext, dgettext, etc.

Hmm, wouldn't it make sense to come up with one standard
gettext.py module which implements all the needed functionality
in Python and can use the wrapped GNU libintl.a optionally
if available ?

Wish list:

The module should ideally support all major gettext and
similar l10n-formats and allow changing languages. 

Peter's translation object approach seems to fit this best: it
could use mixin classes for the different l10n formats
(gettext .mo files, locale message files, resource files, etc.) and
provide the needed caching and lookup engine as base class.
It would probably be easiest to have one language per instance
and perhaps a tranlation object factory which implements
caching objects for the different languages currently in use.

...just some thoughts (got no time for this :-()
Marc-Andre Lemburg
Business:                                      http://www.lemburg.com/
Python Pages:                           http://www.lemburg.com/python/