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 [EMAIL PROTECTED]
mailing list.
_______________________________________________
ActivePerl mailing list
[email protected]
To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs

Reply via email to