Monday, March 26, 2012

Multi Language

Can anyone give insight on the proper way to store names in a multi
language database? For instance in English we store First, Middle,
Last. In Spanish there could be multiple last names. In Chinese the
whole name is only one name, (fits in one field). Any experience with
something like this?
Peter Cwik
It really depends on the requirements of the application, and whether you
are attempting to separate family name from given name, or preserve name
order for presentation. (In different cultures, the first name is the
family name, whereas in English, the first name is the given name.)
You may have different rules for different localizations, in defining what
is FirstName and LastName, but also have a common FullName field that is
populated in a language-specific or culture-specific manner.
Again, your business requirements will have much to do with the solution.
Cheers,
'(' Jeff A. Stucker
\
Senior Consultant
www.rapidigm.com
"Peter Cwik" <cwik4@.cox.net> wrote in message
news:1135790334.343599.101660@.z14g2000cwz.googlegr oups.com...
> Can anyone give insight on the proper way to store names in a multi
> language database? For instance in English we store First, Middle,
> Last. In Spanish there could be multiple last names. In Chinese the
> whole name is only one name, (fits in one field). Any experience with
> something like this?
> Peter Cwik
>
|||In general, "Family Name" and "Given Name" are less confusing than
"First", "Last", "Christian", "Sur", etc on multi-language forms. A
simple way to organize the columns might be something like this:
NameID(pk), FamilyName, GivenName, Name2, Name3,Name4, NameType --
where FamilyName is the only required name field and NameType is a
foreign key describing the naming convention of that particular person.
So long as the order preference is spelled out in the NameType, I don't
see a reason to distinguish between a middle name, second given name,
or second family name. You can use CASE to distinguish between them in
your select statements:
SELECT CASE NameType
WHEN '3a' THEN GivenName +' '+ Name4 +' '+ FamilyName
WHEN '4b' THEN Name2 +' '+ GivenName +' '+ FamilyName
WHEN '5c' THEN FamilyName +' '+ GivenName
ELSE GivenName+' '+FamilyName END AS FullName
>From Table1
(If you want, you could nest the CASEs so that they check fields for
null values before plugging them in so as to allow people to predict
naming conventions that might apply after marriage, confirmation, etc.)
--L

No comments:

Post a Comment