LANG, locale, unicode, setup.py and Debian packaging

Donn donn.ingle at gmail.com
Mon Jan 14 17:55:07 EST 2008


> You get the full locale name with locale.setlocale(category) (i.e.
> without the second argument)
Ah. Can one call it after the full call has been done:
locale.setlocale(locale.LC_ALL,'')
locale.setlocale(locale.LC_ALL)
Without any issues?

> > I need that two-letter code that's hidden in a
> > typical locale like en_ZA.utf8 -- I want that 'en' part.
Okay, I need it because I have a tree of dirs: en, it, fr and so on for the 
help files -- it's to help build a path to the right html file for the 
language being supported.

> Not sure why you want that. Notice that the locale name is fairly system
> specific, in particular on non-POSIX systems. It may be
> "English_SouthAfrica" on some systems.
Wow, another thing I had no idea about. So far all I've seen are the 
xx_yy.utf8 shaped ones.

I will have some trouble then, with the help system.

Thanks,
\d


-- 
"There may be fairies at the bottom of the garden. There is no evidence for 
it, but you can't prove that there aren't any, so shouldn't we be agnostic 
with respect to fairies?"
-- Richard Dawkins

Fonty Python and other dev news at:
http://otherwiseingle.blogspot.com/



More information about the Python-list mailing list