Another possibility (apart from all the other ideas here) would
be to use the
Date::Manip module, which can handle
(both parse and produce) dates in several different languages
(search in the documentation for "Language" to see the supported
ones). For example:
use strict;
use Date::Manip;
my $d=ParseDate("today");
foreach my $l (qw(English French Swedish German Spanish Italian)) {
Date_Init("Language=$l");
print "$l: ".UnixDate($d, "%F\n");
}
Which produces:
English: Wednesday, September 27, 2000
French: mercredi, septembre 27, 2000
Swedish: Onsdag, September 27, 2000
German: Mittwoch, September 27, 2000
Spanish: Miercoles, Septiembre 27, 2000
Italian: Mercoledi, Settembre 27, 2000
Note a few points:
- I did the ParseDate before changing the language
from English (the default), because otherwise I would have had
to change "today" to each language in turn.
- I couldn't find a way for it to change the format according
to each language's conventions, as mentioned by ar0n.
- If all you need are month names, Date::Manip may be overkill,
because it is a very big module. But if you need dates in general,
it might be worth a try.
--ZZamboni