NAME
Locale::Country::Multilingual - ISO codes for country identification with multi-language (ISO 3166)
SYNOPSIS
use Locale::Country::Multilingual;
my $lcm = Locale::Country::Multilingual->new();
$country = $lcm->code2country('jp'); # $country gets 'Japan'
$country = $lcm->code2country('chn'); # $country gets 'China'
$country = $lcm->code2country('250'); # $country gets 'France'
$code = $lcm->country2code('Norway'); # $code gets 'no'
$lcm->set_lang('cn'); # set default language to Chinese
$country = $lcm->code2country('cn'); # $country gets 'ä¸å›½'
$code = $lcm->country2code('日本'); # $code gets 'jp'
@codes = $lcm->all_country_codes();
@names = $lcm->all_country_names();
# more heavy call
my $lang = 'en';
$country = $lcm->code2country('cn', $lang); # $country gets 'China'
$lang = 'cn';
$country = $lcm->code2country('cn', $lang); # $country gets 'ä¸å›½'
my $CODE = 'LOCALE_CODE_ALPHA_2'; # by default
$code = $lcm->country2code('Norway', $CODE); # $code gets 'no'
$CODE = 'LOCALE_CODE_ALPHA_3';
$code = $lcm->country2code('Norway', $CODE); # $code gets 'nor'
$CODE = 'LOCALE_CODE_NUMERIC';
$code = $lcm->country2code('Norway', $CODE); # $code gets '578'
$code = $lcm->country2code('挪�', $CODE, 'cn'); # with lang=cn
$CODE = 'LOCALE_CODE_ALPHA_3';
$lang = 'cn';
@codes = $lcm->all_country_codes($CODE); # return codes with 3alpha
@names = $lcm->all_country_names($lang); # get all Chinese Countries Names
AVAILABLE LANGAUGES
- en - English
- cn - Chinese Simp.
- tw - Chinese Trad.
- it - Italian
- es - Spanish
- pt - Portuguese
- de - German
- fr - French
- ja - Japanese
other languages are welcome to send by email.
SEE ALSO
ACKNOWLEDGEMENTS
Thanks to michele ongaro for Italian/Spanish/Portuguese/German/French/Japanese dat files.
AUTHOR
Fayland Lam, <fayland at gmail.com>
COPYRIGHT & LICENSE
Copyright 2007-2008 Fayland Lam, all rights reserved.
This program is free software; you can redistribute it and/or modify it under the same terms as Perl itself.
1 POD Error
The following errors were encountered while parsing the POD:
- Around line 123:
Non-ASCII character seen before =encoding in ''ä¸å›½''. Assuming CP1252