[Python-Dev] Re: gettext in the standard library
James Henstridge
james@daa.com.au
Mon, 21 Aug 2000 22:02:21 +0800 (WST)
On Sun, 20 Aug 2000, M.-A. Lemburg wrote:
> James Henstridge wrote:
> > Well, it can do a little more than that. It will also handle the case of
> > a number of locales listed in the LANG environment variable. It also
> > doesn't look like it handles decomposition of a locale like
> > ll_CC.encoding@modifier into other matching encodings in the correct
> > precedence order.
> >
> > Maybe something to do this sort of decomposition would fit better in
> > locale.py though.
> >
> > This sort of thing is very useful for people who know more than one
> > language, and doesn't seem to be handled by plain setlocale()
>
> I'm not sure I can follow you here: are you saying that your
> support in gettext.py does more or less than what's present
> in locale.py ?
>
> If it's more, I think it would be a good idea to add those
> parts to locale.py.
It does a little more than the current locale.py.
I just checked the current locale module, and it gives a ValueError
exception when LANG is set to something like en_AU:fr_FR. This sort of
thing should be handled by the python interface to gettext, as it is by
the C implementation (and I am sure that most programmers would not expect
such an error from the locale module).
The code in my gettext module handles that case.
James.
--
Email: james@daa.com.au
WWW: http://www.daa.com.au/~james/