I recently stared to build a small social network, and im a bit lost and confused about storing the names.
So the point is that, this network will be opend for 4 different countries, Hungary, Russia, French, and America.
The bad part is, if i would like to store the names as first name, last name in the database, that would not be a good idea, because, for example, In Hungary the names are switched, for example, if an Amirecian Citizen signs up as Scott Summers, Scott is the first nameand Summers is the last but for example in Hungarian its totally different, The first name is the last name, and last name is the first, So if Scott where Hungarian, his name would be like this: Summers Scott.
My experience in my country (Hungary) people where really upset when they had their name switched when they signed up for example on facebook, so i would like to avoid that.
I was thinking to give a full name field in the table, but thats not a good idea either (in my opinion).
so i would like to ask a more experienced developers opinion if possible, thank you
If every area you work in has a convention that everyone has a family name, one or more given names, and prefers those names to be formatted in a particular format, and you need to process individual parts of the name, then store those facts:
Family Name,Given Name,Other NamesandPreferred Name Format. I’d also recommend you let them input aPreferred Name.Where you’ll usually use
Preferred Nameto address them, and you’ll usePreferred Name Formatto control assemblingFamily Name,Given NameandOther Namesinto a format that is acceptable to them in their culture.Designing the UI to allow them to input these without error is left as an exercise for the reader 🙂