V
vturner
Perl has a nice module that converts state province codes for various
countries between a three-char code and the fully expanded name. For
example, Australia (country code "AU") is composed of several states or
provinces, kind of like states in the US. Two of the provinces are "QLD"
for "Queensland" and "NSW" for "New South Wales". I need something that
can take an input of "Queensland" and return "QLD" and vice-versa.
I'm working on a java interface to USPS's online shipping tool and they
expect a country code of "AU" and a State code of "QLD". However, the
person entering the information on the web site may choose to put in
"Australia" and "Queensland" for the country and state/province code,
respectively. I can probably use java.util.locale to go back and forth
between "AU" and "Australia", but I can't find an equivalent way to go back
and forth between "Queenslands" and "QLD".
Does any one know of a Java class/package like this?
some documentation on the perl module is described here:
http://www.cpan.org/modules/by-module/Locale/Locale-SubCountry-1.34.readme
countries between a three-char code and the fully expanded name. For
example, Australia (country code "AU") is composed of several states or
provinces, kind of like states in the US. Two of the provinces are "QLD"
for "Queensland" and "NSW" for "New South Wales". I need something that
can take an input of "Queensland" and return "QLD" and vice-versa.
I'm working on a java interface to USPS's online shipping tool and they
expect a country code of "AU" and a State code of "QLD". However, the
person entering the information on the web site may choose to put in
"Australia" and "Queensland" for the country and state/province code,
respectively. I can probably use java.util.locale to go back and forth
between "AU" and "Australia", but I can't find an equivalent way to go back
and forth between "Queenslands" and "QLD".
Does any one know of a Java class/package like this?
some documentation on the perl module is described here:
http://www.cpan.org/modules/by-module/Locale/Locale-SubCountry-1.34.readme