Beefy Boxes and Bandwidth Generously Provided by pair Networks
No such thing as a small change
 
PerlMonks  

Locale Country not working

by mendeepak (Scribe)
on Aug 22, 2014 at 10:08 UTC ( [id://1098299]=perlquestion: print w/replies, xml ) Need Help??

mendeepak has asked for the wisdom of the Perl Monks concerning the following question:

Locale::Country is not retriving country code for Netherlands Antilles

#!/usr/bin/perl use strict; use Locale::Country; my $country = code2country('an', 'alpha-2'); my $code = country2code('Netherlands Antilles', 'alpha-2'); print "$country\n"; print "$code\n";

Deepak

Replies are listed 'Best First'.
Re: Locale Country not working
by hippo (Bishop) on Aug 22, 2014 at 10:42 UTC

      That is correct. The code was retired a number of versions ago.

      If you really need to use codes that have been retired, the following will work (and is documented in the Locale::Codes::API document):

         code2country('an', 'alpha-2', 'retired');
         => 'Netherlands Antilles'
      
Re: Locale Country not working
by mendeepak (Scribe) on Aug 25, 2014 at 03:25 UTC

    Locale::Country had some issue in my system, re-installed and got it working. Thanks Guys..

    Deepak

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: perlquestion [id://1098299]
Approved by marto
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others meditating upon the Monastery: (8)
As of 2024-04-23 08:05 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found