list of day/month names in all locales

M

myicq

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 ?
 
B

Ben Morrow

Quoth myicq said:
Do anyone have an idea about how to output day / month names
in all known locales (for current system).
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
 
M

myicq

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.
 
J

John W. Krahn

myicq said:
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
 
M

myicq

@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.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,994
Messages
2,570,223
Members
46,810
Latest member
Kassie0918

Latest Threads

Top