Click here to get back home

list of day/month names in all locales

 HomeNewsGroups | Search | About
 comp.lang.perl.misc    Post an article   get this group's latest topics as an RSS feed add this group's latest topics to your My MSN content add this group's latest topics to your My Yahoo content
Subject Author Date
list of day/month names in all locales myicq 03-09-2008
Posted by myicq on March 9, 2008, 3:27 am
Please log in for more thread options
Do anyone have an idea about how to output day / month names
in all known locales (for current system).

This can be in array-form, or a simple list, such as

Locale: Danish (DA_DK)
        man, tir, ons...
        jan, feb, mar

Locale: Deutsch (DE)
        mon, die, mit

Etc


I can't find any information about how to list all available
locales on the system, and query month / day names for that locale.
Basically to iterate over all known locales.


Can anyone help ?


Posted by Ben Morrow on March 9, 2008, 5:13 am
Please log in for more thread options

> Do anyone have an idea about how to output day / month names
> in all known locales (for current system).
>
<snip>
>
> I can't find any information about how to list all available
> locales on the system, and query month / day names for that locale.
> Basically to iterate over all known locales.

Something like

my @locales = qx/locale -a/;

is probably your best bet.

Ben


Posted by myicq on March 9, 2008, 9:25 am
Please log in for more thread options
@osiris.mauzo.dyndns.org:

> Something like
>
> my @locales = qx/locale -a/;
>
> is probably your best bet.

Except, of course.. that I am using Windows. So that command
is not available.

I also need (a bit) of help on how to extract the month /day names
from each locale.

Sorry for this newbie question.

FYI:

c:\> perl -V:d_setlocale
d_setlocale='define';

Version 5.8.8 (Activestate)


Thanks.

Posted by John W. Krahn on March 10, 2008, 9:41 am
Please log in for more thread options
myicq wrote:
> Do anyone have an idea about how to output day / month names
> in all known locales (for current system).
>
> This can be in array-form, or a simple list, such as
>
> Locale: Danish (DA_DK)
>         man, tir, ons...
>         jan, feb, mar
>
> Locale: Deutsch (DE)
>         mon, die, mit
>
> Etc
>
> I can't find any information about how to list all available
> locales on the system, and query month / day names for that locale.
> Basically to iterate over all known locales.
>
> Can anyone help ?

perldoc perllocale

perldoc I18N::Langinfo



John
--
Perl isn't a toolbox, but a small machine shop where you
can special-order certain sorts of tools at low cost and
in short order. -- Larry Wall

Posted by myicq on March 11, 2008, 8:00 am
Please log in for more thread options
@edtnps90:


> perldoc perllocale
> perldoc I18N::Langinfo

Thanks for the information. But my request is for a Windows-based system.

Basically I need to find
        - a list of available locales on my windows box
        - a function that will list availbale day/month names for a given locale

Then I can iterate over all useful locales.


Similar ThreadsPosted
Dynamic hash names September 5, 2004, 6:48 pm
Array of file names September 10, 2004, 4:44 pm
Need help with constants and package names. December 12, 2004, 9:01 pm
matching all perldoc names but no more November 6, 2004, 9:40 am
Clean out accents in French names May 17, 2005, 11:44 pm
Perl Script to change IPs to DNS Names November 16, 2006, 10:56 am
finding invalid method names April 27, 2007, 6:41 pm
Rename files using directory names November 15, 2007, 8:33 am
Win32::OLE ADO Table Field names December 23, 2007, 1:15 pm
Making variable field names January 17, 2008, 11:09 pm

Our other projects:

Art Dolls, Fairies and Mermaids - Sunnyfaces.net

Roy's Linux, Programming and Search Engines messages

1-Script XML SitemapXML Sitemap