list of day/month names in all locales

Discussion in 'Perl Misc' started by myicq, Mar 9, 2008.

  1. myicq

    myicq Guest

    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 ?
    myicq, Mar 9, 2008
    #1
    1. Advertising

  2. myicq

    Ben Morrow Guest

    Quoth myicq <4>:
    > 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
    Ben Morrow, Mar 9, 2008
    #2
    1. Advertising

  3. myicq

    myicq Guest

    Ben Morrow <> wrote in news:ibmca5-mb92.ln1
    @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.
    myicq, Mar 9, 2008
    #3
  4. 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
    John W. Krahn, Mar 10, 2008
    #4
  5. myicq

    myicq Guest

    "John W. Krahn" <> wrote in news:%TaBj.75307$w57.69474
    @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.
    myicq, Mar 11, 2008
    #5
    1. Advertising

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

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Replies:
    1
    Views:
    444
    Steve W. Jackson
    Dec 22, 2006
  2. Andy
    Replies:
    1
    Views:
    700
  3. sonum
    Replies:
    3
    Views:
    4,257
    Andrew Morton
    Apr 15, 2009
  4. Rob Redmon

    Convert day of year to month, day

    Rob Redmon, Apr 4, 2008, in forum: Ruby
    Replies:
    7
    Views:
    295
    Alex Wayne
    Apr 4, 2008
  5. Diego
    Replies:
    2
    Views:
    146
    Stefan Rusterholz
    Aug 16, 2008
Loading...

Share This Page