Locale::SubCountry 1.37
Sponsored Links
Locale::SubCountry 1.37 Ranking & Summary
File size:
0.062 MB
Platform:
Any Platform
License:
Perl Artistic License
Price:
Downloads:
1164
Date added:
2006-08-16
Publisher:
Kim Ryan
Locale::SubCountry 1.37 description
Locale::SubCountry is a Perl module that can convert state, province, county etc. names to/from code.
SYNOPSIS
my $country_code = GB;
my $UK = new Locale::SubCountry($country_code);
if ( not $UK )
{
die "Invalid code $country_coden";
}
elsif ( $UK->has_sub_countries )
{
print($UK->full_name(DGY),"n"); # Dumfries and Galloway
print($UK->regional_division(DGY),"n"); # CT (Scotland)
}
my $australia = new Locale::SubCountry(AUSTRALIA);
print($australia->country,"n"); # AUSTRALIA
print($australia->country_code,"n"); # AU
if ( $australia->has_sub_countries )
{
print($australia->code(New South Wales ),"n"); # NSW
print($australia->full_name(S.A.),"n"); # South Australia
my $upper_case = 1;
print($australia->full_name(Qld,$upper_case),"n"); # QUEENSLAND
print($australia->category(NSW),"n"); # state
print($australia->FIPS10_4_code(ACT),"n"); # 01
print($australia->ISO3166_2_code(02),"n"); # NSW
my @aus_state_names = $australia->all_full_names;
my @aus_code_names = $australia->all_codes;
my %aus_states_keyed_by_code = $australia->code_full_name_hash;
my %aus_states_keyed_by_name = $australia->full_name_code_hash;
foreach my $code ( sort keys %aus_states_keyed_by_code )
{
printf("%-3s : %sn",$code,$aus_states_keyed_by_code{$code});
}
}
# Methods for country codes and names
my $world = new Locale::SubCountry::World;
my @all_countries = $world->all_full_names;
my @all_country_codes = $world->all_codes;
my %all_countries_keyed_by_name = $world->full_name_code_hash;
my %all_country_keyed_by_code = $world->code_full_name_hash;
This module allows you to convert the full name for a countries administrative region to the code commonly used for postal addressing. The reverse lookup can also be done. Sub country codes are defined in "ISO 3166-2:1998, Codes for the representation of names of countries and their subdivisions".
Sub countries are termed as states in the US and Australia, provinces in Canada and counties in the UK and Ireland.
Names and ISO 3166-2 codes for all sub countries in a country can be returned as either a hash or an array.
Names and ISO 3166-1 codes for all countries in the world can be returned as either a hash or an array.
ISO 3166-2 codes can be converted to FIPS 10-4 codes. The reverse lookup can also be done.
SYNOPSIS
my $country_code = GB;
my $UK = new Locale::SubCountry($country_code);
if ( not $UK )
{
die "Invalid code $country_coden";
}
elsif ( $UK->has_sub_countries )
{
print($UK->full_name(DGY),"n"); # Dumfries and Galloway
print($UK->regional_division(DGY),"n"); # CT (Scotland)
}
my $australia = new Locale::SubCountry(AUSTRALIA);
print($australia->country,"n"); # AUSTRALIA
print($australia->country_code,"n"); # AU
if ( $australia->has_sub_countries )
{
print($australia->code(New South Wales ),"n"); # NSW
print($australia->full_name(S.A.),"n"); # South Australia
my $upper_case = 1;
print($australia->full_name(Qld,$upper_case),"n"); # QUEENSLAND
print($australia->category(NSW),"n"); # state
print($australia->FIPS10_4_code(ACT),"n"); # 01
print($australia->ISO3166_2_code(02),"n"); # NSW
my @aus_state_names = $australia->all_full_names;
my @aus_code_names = $australia->all_codes;
my %aus_states_keyed_by_code = $australia->code_full_name_hash;
my %aus_states_keyed_by_name = $australia->full_name_code_hash;
foreach my $code ( sort keys %aus_states_keyed_by_code )
{
printf("%-3s : %sn",$code,$aus_states_keyed_by_code{$code});
}
}
# Methods for country codes and names
my $world = new Locale::SubCountry::World;
my @all_countries = $world->all_full_names;
my @all_country_codes = $world->all_codes;
my %all_countries_keyed_by_name = $world->full_name_code_hash;
my %all_country_keyed_by_code = $world->code_full_name_hash;
This module allows you to convert the full name for a countries administrative region to the code commonly used for postal addressing. The reverse lookup can also be done. Sub country codes are defined in "ISO 3166-2:1998, Codes for the representation of names of countries and their subdivisions".
Sub countries are termed as states in the US and Australia, provinces in Canada and counties in the UK and Ireland.
Names and ISO 3166-2 codes for all sub countries in a country can be returned as either a hash or an array.
Names and ISO 3166-1 codes for all countries in the world can be returned as either a hash or an array.
ISO 3166-2 codes can be converted to FIPS 10-4 codes. The reverse lookup can also be done.
Locale::SubCountry 1.37 Screenshot
Locale::SubCountry 1.37 Keywords
SubCountry
UK
ISO
SubCountry 1.37
ISO 3166
NSW
Perl module
Can Convert
code
names
print
country
n
codes
Locale::SubCountry
LocaleSubCountry
Bookmark Locale::SubCountry 1.37
Locale::SubCountry 1.37 Copyright
WareSeeker periodically updates pricing and software information of Locale::SubCountry 1.37 full version from the publisher, so some information may be slightly out-of-date. You should confirm all information before relying on it. Software piracy is theft, Using crack, password, serial numbers, registration codes, key generators is illegal and prevent future development of Locale::SubCountry 1.37 Edition. Download links are directly from our publisher sites, torrent files or links from rapidshare.com, yousendit.com or megaupload.com are not allowed
Featured Software
Want to place your software product here?
Please contact us for consideration.
Contact WareSeeker.com
Related Information
Related Software
IP::Country is a tool for fast lookup of country codes from IP addresses. Free Download
Locale::KeyedText is a Perl module that refer to user messages in programs by keys. Free Download
Locale::Memories is a Perl module for L10N Message Retrieval. Free Download
Locale::Messages is a Perl module with Gettext Like Message Retrieval. Free Download
Locale::Object::Currency::Converter is a Perl module that can convert between currencies. Free Download
Games::Sudoku::General is a Perl module that can solve sudoku-like puzzles. Free Download
PerlIO::locale is a PerlIO layer to use the encoding of the current locale. Free Download
Geography::Countries is a Perl module with 2-letter, 3-letter, and numerical codes for countries. Free Download
Latest Software
Popular Software
Favourite Software