The second argument to GetLocaleInfo() is a constant (so you don't quote it) that you will either need to import (don't really know from where but using Win32::OLE::Const) or just have a look at this:

use Win32::OLE::NLS; $LCID = GetSystemDefaultLCID(); for my $const ( 0..88 ) { print "Const val $const\t", GetLocaleInfo($LCID, $const ), "\n"; } __DATA__ Const val 0 Const val 1 0409 Const val 2 English (United States) Const val 3 ENU Const val 4 English Const val 5 1 Const val 6 United States Const val 7 USA Const val 8 United States Const val 9 0409 [snip] Const val 20 $ Const val 21 USD [snip] Const val 31 M/d/yyyy [yada yada]

It continues on with currency, date, etc, etc. The data ends at a const value of 88 FWIW, that why it only goes to 88.

cheers

tachyon

s&&rsenoyhcatreve&&&s&n.+t&"$'$`$\"$\&"&ee&&y&srve&&d&&print


In reply to Re: Getting English name of locale language by tachyon
in thread Getting English name of locale language by Anonymous Monk

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post, it's "PerlMonks-approved HTML":



  • Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
  • Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
  • Read Where should I post X? if you're not absolutely sure you're posting in the right place.
  • Please read these before you post! —
  • Posts may use any of the Perl Monks Approved HTML tags:
    a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
  • You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
            For:     Use:
    & &amp;
    < &lt;
    > &gt;
    [ &#91;
    ] &#93;
  • Link using PerlMonks shortcuts! What shortcuts can I use for linking?
  • See Writeup Formatting Tips and other pages linked from there for more info.