ASPN ActiveState Programmer Network
ActiveState
/ Home / Perl / PHP / Python / Tcl / XSLT /
/ Safari / My ASPN /
Cookbooks | Documentation | Mailing Lists | Modules | News Feeds | Products | User Groups


Recent Messages
List Archives
About the List
List Leaders
Subscription Options

View Subscriptions
Help

View by Topic
ActiveState
.NET Framework
Open Source
Perl
PHP
Python
Tcl
Web Services
XML & XSLT

View by Category
Database
General
SOAP
System Administration
Tools
User Interfaces
Web Programming
XML Programming


MyASPN >> Mail Archive >> activeperl
activeperl
I18N::Langinfo supplement/override (was RE: 5.10 and I18N::Langinfo)
by Eric Roode other posts by this author
May 23 2008 7:05AM messages near this date
RE: 5.10 and I18N::Langinfo | PPM's weird list
Brian Raven wrote, on Thursday, May 22, 2008 11:49 AM: 
>  Roode, Eric <> wrote:
[...]

>  >     I can't find I18N::Langinfo on CPAN or in any of several PPM
>  > repositories.
> 
>  This is reminiscent of another question I saw recently. According to
>  the doco, it is "just a wrapper for the C nl_langinfo() interface",
>  so unless the build platform has appropriate support, I18N::Langinfo
>  may not get installed. But I agree it would be useful to know that.

I have some modules (Time::Format, Regexp::Common::time,
Time::Normalize) that need to know the month and weekday names, and
their abbreviations, in the user's current locale.  Those modules
currently get this information from I18N::Langinfo (and fall back on
English names/abbreviations).

Since I18N::Langinfo is not reliably available, I would like to
provide a way for the user to explicitly specify the month/weekday
names/abbreviations that they would like to use.  My first thought was
to provide a set of functions in each module: set_month_names(),
set_weekday_names(), etc.  But... why should the user have to set the
names once for each module?  They should be able to do it once and be
done.

So I am considering having a new central module whose only purpose in
life is to wrap I18N::Langinfo and allow the user to specify month and
weekday names and abbreviations (or override them if the module exists
and works but the caller wants a different set of names for some
reason).  And it should probably allow the user to specify the other
strings that I18N::Langinfo provides.

I'm posting this here to stimulate discussion about the merits of this
idea.  Is it good?  Is it awful?  Does this sort of thing exist
already?

Should it be incorporated into I18N::Langinfo?  I suspect that is a
bad idea.  If it should be a new module, should it be under I18N?
Maybe I18N::Langinfo::Fake?  I18N::Langinfo::Override?  Should it be
under Locale:: or even Lingua::?

Thanks in advance,
Eric Roode

PS: I am also posting this to use.perl.org, and the modules@[...].org
mailing list.
_______________________________________________
ActivePerl mailing list
ActivePerl@[...].com
To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs
Thread:
Eric Roode
Brian Raven
Eric Roode

Privacy Policy | Email Opt-out | Feedback | Syndication
© ActiveState Software Inc. All rights reserved