Re: Perl and locales

Do you have a question? Post it now! No Registration Necessary.  Now with pictures!

Quoted text here. Click to load it


Quoted text here. Click to load it

<snipped for brevity>

Quoted text here. Click to load it

You know, I had never used Date::Format, but I just noticed:

Date::Format is capable of formating into several languages,
these are English, French, German and Italian. Changing the
language is done via a static method call, for example


will change the language in which all subsequent dates are formatted.

This is only a first pass, I am considering changing this to be

        $lang = Date::Language->new('German');
        $lang->time2str("%a %b %e %T %Y\n", time);

I am open to suggestions on this.
</blockquote> lists additional languages.
'Spanish' is not among them.

In any case, thanks to your post, I learned that one needs to use

setlocale(LC_TIME, 'spanish') or die "LOCALE TROUBLE!";

to get this program to work on Windows.

(remove .invalid and reverse each component for email address)

comp.lang.perl.misc guidelines on the WWW: /

Site Timeline