On Mon, 27 Aug 2012, David E. Wheeler wrote:

That locale will not make DateTime::Locale happy either.

Seems okay with it:

perl -MDateTime -MPOSIX -E 'my $dt = DateTime->now; $dt->set(locale => 
POSIX::setlocale( POSIX::LC_TIME() ) ); say $dt->locale'
DateTime::Locale::en_US=HASH(0x7fc90a297dd8)

Heh, go figure. I think I wrote that code, but forgot about it. It strips off any trailing character set in the locale code.

With Windows, someone might want to maintain a master translation list of Windows names to CLDR names, much like we currently translate timezone names.

I found Win32::Locale, which seems to do what I need it to.

Ah, cool. Looking at it I suspect it's probably out of date and missing some codes that might be used in Windows since 2004, but it's better than nothing.

I should add a mention of this to the DateTime::Locale docs.


-dave

/*============================================================
http://VegGuide.org               http://blog.urth.org
Your guide to all that's veg      House Absolute(ly Pointless)
============================================================*/

Reply via email to