[Python-Dev] Re: gettext in the standard library (original) (raw)
M.-A. Lemburg mal@lemburg.com
Sun, 20 Aug 2000 19:57:32 +0200
- Previous message: [Python-Dev] Re: gettext in the standard library
- Next message: [Python-Dev] Re: gettext in the standard library
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
James Henstridge wrote:
On Sat, 19 Aug 2000, M.-A. Lemburg wrote: > > As I said above, most of that turned out not to be very useful. Did you > > include any of the language selection code in the last version of my > > gettext module? It gave behaviour very close to C gettext in this > > respect. It expands the locale name given by the user using the > > locale.alias files found on the systems, then decomposes that into the > > simpler forms. For instance, if LANG=enGB, then my gettext module would > > search for catalogs by names: > > ['enGB.ISO8859-1', 'enGB', 'en.ISO8859-1', 'en', 'C'] > > > > This also allows things like expanding LANG=catalan to: > > ['caES.ISO-8859-1', 'caES', 'ca.ISO-8859-1', 'ca', 'C'] > > (provided the appropriate locale.alias files are found) > > > > If you missed that that version I sent you I can send it again. It > > stripped out a lot of the experimental code giving a much simpler module. > > Uhm, can't you make some use of the new APIs in locale.py > for this ? > > locale.py has a whole new set of encoding aware support for > LANG variables. It supports Unix and Windows (thanks to /F). 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 llCC.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.
-- Marc-Andre Lemburg
Business: http://www.lemburg.com/ Python Pages: http://www.lemburg.com/python/
- Previous message: [Python-Dev] Re: gettext in the standard library
- Next message: [Python-Dev] Re: gettext in the standard library
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]