Component: Global Address/Phone Number/SSN

G

Guest

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.

Thank you in advance for your help in my quest.
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.
 
G

Guest

Hi,

There is tons of support for globalization in .NET so you're in luck.
Globalized & Localized currency, datetime, etc. formats are supported and you
can have seperate versions of your user interface forms for each culture; to
adjust GUI controls and add/remove fields per culture as needed. Also, if
SQL Server is your database there's lots of support for storing globalized
data - you need to consider that when you design your database.

I can't think of any good books offhand - though I guarantee there are
several out there - but here are some MSDN online links. Globalization is a
fairly large topic though, so get ready to do some heavy reading...

Intro articles:

http://msdn.microsoft.com/msdnmag/issues/02/06/internat/

http://msdn.microsoft.com/msdnmag/issues/04/03/Bugslayer/default.aspx

Supporting .NET framework classes:

http://msdn.microsoft.com/library/d.../vxoriGlobalizationLocalizationNamespaces.asp

http://msdn.microsoft.com/library/d...en-us/cpref/html/frlrfSystemGlobalization.asp

SQL Server topics {the books online link is for the latest update to SQL
Server 2000}:

http://msdn.microsoft.com/archive/default.asp?url=/archive/en-us/dnarsqlsg/html/msdn_interntl.asp

http://www.microsoft.com/sql/techinfo/productdoc/2000/books.asp

Other useful search keywords:
Globalization
Localization
Default culture
Currency format
DateTime format
Strong name
Culture fallback assembly

--Richard

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.

Thank you in advance for your help in my quest.
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.
 
M

Mihai N.

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.
For some fields you formats available in .NET (dat, time, currency).
For the others, provide a way to make them accessible for localization.
Regular expressions in the resouces can be quite flexible for fields
validation. Some kind of "format descriptors" can be used for display.
And a wasy to specify field order and which fields are mandatory can
be developed for addresses. There is nothing standard in the .Net or
Windows API.
You should also be aware that there are countries that have nothing
like SSN (or personal ID, or whatever)
 
G

Guest

Mihai,

This application is actually a local app (US) that is only operating in the
US. The issue I am running into is storing information regarding investors
abroad. For example if they invest in my fund I have to store information
such as their address, phone number, etc. So when communicating with them I
have the proper format for sending mail, calling them etc. They aren't
actually entering the information themselves but receive reports from our
server and the reports must be mailed out to each investor. Formats for
sending mail locally (US) are different than say Germany or England. So I am
looking to make the application more intuitive when entering data. Like when
they select the US it fills out the states combo box with all of the states,
if they select England it fills the region combo box with each region, etc.
When they want to enter a phone number in the US it gives them a mask that is
widely acceptable for phone numbers e.g. (999) 999-9999. Not many other
contries utilize this format so I want it to automatically create the mask by
determining the country's format. The issue that I run into is not knowing
what each country's framework for these fields is. I was looking more for a
direction on someone who has already dealt with this and where they obtained
their information from.

Thanks again,

Kamaluokeakua
 
J

Julian Nicholls

I have seen a site on the net which detailed loads of the formats, as
regular expressions, IIRC. A Google for address regex might get you
somewhere.

All the Best
Julian N.
 
G

Guest

Thanks Julian, I couldn't find anything on mailing address formats using the
address regex on google. Mostly email and IP address regex only.
 

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

Top