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=en_GB, then my gettext module would > > > search for catalogs by names: > > > ['en_GB.ISO8859-1', 'en_GB', 'en.ISO8859-1', 'en', 'C'] > > > > > > This also allows things like expanding LANG=catalan to: > > > ['ca_ES.ISO-8859-1', 'ca_ES', '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 > 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. -- Marc-Andre Lemburg ______________________________________________________________________ Business: http://www.lemburg.com/ Python Pages: http://www.lemburg.com/python/
RetroSearch is an open source project built by @garambo | Open a GitHub Issue
Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo
HTML:
3.2
| Encoding:
UTF-8
| Version:
0.7.4