Global Address/Phone/SSN[Country ID]

K

Kamaluokeakua

I have to write an application that deals with clients in multiple countries.
The addresses, phone numbers, country id[social security number] and
currency information has to be stored into a database that allows for the
format of any country. I would like to be able to automatically display the
information in the format of their country based on the information gathered
from the Country field in the database.

Is there any white paper, or book or site that has information on designing
a component that will change it's format automatically so I can customize the
format on the fly instead of having so many different controls based on a
country. Or should I make several different controls and call them based on
the data retrieved from the database? I basically want to display the
address, phone number and SSN/Country ID in the format that is the standard
of the country that it comes from. For example I don't want to force users
to enter a phone number with a mask of (999) 999-9999 if they are in a
country that doesn't have that format. Or force the entry of a SSN when the
country utilizes a different format than 999-99-9999.

The following are the countries:
England, France, Germany, Switzerland, Holland, Spain, Portugal, Taiwan,
China [mainland and Hong Kong], Australia, Brazil, Mexico, Canada, France,
Italy, and Japan.

Thank you for any help.
 
J

John Saunders

Kamaluokeakua said:
I have to write an application that deals with clients in multiple
countries.
The addresses, phone numbers, country id[social security number] and
currency information has to be stored into a database that allows for the
format of any country. I would like to be able to automatically display
the
information in the format of their country based on the information
gathered
from the Country field in the database.

Is there any white paper, or book or site that has information on
designing
a component that will change it's format automatically so I can customize
the
format on the fly instead of having so many different controls based on a
country. Or should I make several different controls and call them based
on
the data retrieved from the database? I basically want to display the
address, phone number and SSN/Country ID in the format that is the
standard
of the country that it comes from. For example I don't want to force
users
to enter a phone number with a mask of (999) 999-9999 if they are in a
country that doesn't have that format. Or force the entry of a SSN when
the
country utilizes a different format than 999-99-9999.

The following are the countries:
England, France, Germany, Switzerland, Holland, Spain, Portugal, Taiwan,
China [mainland and Hong Kong], Australia, Brazil, Mexico, Canada, France,
Italy, and Japan.

I would recommend that you simply accept these values as text strings. In
particular, unless your application needs to know what the area code of a
phone number is, you shouldn't care what they typed in. Also, keep in mind
that they may be entering a phone number which is valid in a country other
than the country they're presently "in" or "from". Someone might live in
Switzerland but work in Germany, for instance, so might need to enter a
Swiss phone number even though they are in your database as being from
Germany (or vice versa).

Also consider that your program probably doesn't want to go learn all of the
formats for all of the countries you might deal with, and you don't want to
have to update those formats when they change in a particular country.
 
K

Kamaluokeakua

Thanks John. I did consider this but the company wants me to enforce
formatting standards as some of the individuals will type in (999) 999-9999
and some will type in 999-999-9999 and some just 999 999.9999. This wreaks
havok on their searches. I wanted to kill all of the excess data ()- etc and
just store the numbers then format them based on their country's format...
Same thing with the SSN/Country ID... Plus there are formats required by each
of the postal services for getting mail to their correct address and I wanted
to adhere to those standards when printing envelopes/labels/letters/etc.

John Saunders said:
Kamaluokeakua said:
I have to write an application that deals with clients in multiple
countries.
The addresses, phone numbers, country id[social security number] and
currency information has to be stored into a database that allows for the
format of any country. I would like to be able to automatically display
the
information in the format of their country based on the information
gathered
from the Country field in the database.

Is there any white paper, or book or site that has information on
designing
a component that will change it's format automatically so I can customize
the
format on the fly instead of having so many different controls based on a
country. Or should I make several different controls and call them based
on
the data retrieved from the database? I basically want to display the
address, phone number and SSN/Country ID in the format that is the
standard
of the country that it comes from. For example I don't want to force
users
to enter a phone number with a mask of (999) 999-9999 if they are in a
country that doesn't have that format. Or force the entry of a SSN when
the
country utilizes a different format than 999-99-9999.

The following are the countries:
England, France, Germany, Switzerland, Holland, Spain, Portugal, Taiwan,
China [mainland and Hong Kong], Australia, Brazil, Mexico, Canada, France,
Italy, and Japan.

I would recommend that you simply accept these values as text strings. In
particular, unless your application needs to know what the area code of a
phone number is, you shouldn't care what they typed in. Also, keep in mind
that they may be entering a phone number which is valid in a country other
than the country they're presently "in" or "from". Someone might live in
Switzerland but work in Germany, for instance, so might need to enter a
Swiss phone number even though they are in your database as being from
Germany (or vice versa).

Also consider that your program probably doesn't want to go learn all of the
formats for all of the countries you might deal with, and you don't want to
have to update those formats when they change in a particular country.
 
J

John Saunders

Kamaluokeakua said:
Thanks John. I did consider this but the company wants me to enforce
formatting standards as some of the individuals will type in (999)
999-9999
and some will type in 999-999-9999 and some just 999 999.9999. This
wreaks
havok on their searches. I wanted to kill all of the excess data ()- etc
and
just store the numbers then format them based on their country's format...
Same thing with the SSN/Country ID... Plus there are formats required by
each
of the postal services for getting mail to their correct address and I
wanted
to adhere to those standards when printing envelopes/labels/letters/etc.

Your largest problem will be to simply figure out what the formats are - and
to update them when they change. Of course, you'll have to somehow know when
the formats change...

Good luck! If you get this done, you may want to sell it.
 
K

Kamaluokeakua

Indeed, that is my main focus right now... Finding the formats for all of the
countries :)

Thanks for the information,

Kamaluokeakua
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,767
Messages
2,569,572
Members
45,045
Latest member
DRCM

Latest Threads

Top