First name?

First name?

by Thomas Robb -
Number of replies: 5
I'm having a bit of a problem with the current nomenclature on the "Profile" page for names. As most of you are aware, there are certain countries where the "First name" when talking about the actual order of names, is the surname, while the "Last name" is the given name. Cultures that use this order include Chinese, Japanese, Korean and Hungarian.

If all of the students being taught are from the same culture, perhaps this isn't much of a problem, but for me, I've got students from all over the world. Those from a "surname first" culture thus need to figure out whether they should REALLY put down their first name, or whether what is meant is for them to put down their given name.

Could we go for some more culturally neutral terminology here - "Surnam"e (or "family name") and "Given name"? I doubt that it would be worthwhile placing fields in the course profile or site profile saying "Your word for 'surname'" etc., would it?
Average of ratings: -
In reply to Thomas Robb

Re: First name?

by Martin Dougiamas -
Picture of Core developers Picture of Documentation writers Picture of Moodle HQ Picture of Particularly helpful Moodlers Picture of Plugin developers Picture of Testers
Actually, the reason it says first name and last name is because I was trying to be culturally neutral (not assuming one name was a family name etc).  smile

However, now we have the fullname() function which will rearrange the names depending on site settings and language settings, it might make more sense, I guess, to call them Surname and Given name, but I'd really like to hear from others about this ...

Then there's the Spanish and Arabic names, which seem to regularly use at least three public names ...
In reply to Martin Dougiamas

Re: First name?

by Thomas Robb -
Yes, I thought you might have been trying, but your translators weren't! I just looked at the Chinese (Taiwan & Mainland) and Japanese versions and found this:

The Chinese have used the word for "Surname", "xing", where Moodle stores the "firstname" field and the word for "Given name", "ming", where Moodle stores the "lastname" field. The Japanese, however, has it the other was round.

To make matters worse, if a Chinese logs on with the default settings, which are English, they generally enter their name according to Western expectations, with their "First name" being their given name, and their "Last name" being their family name. If they, however, switch over to the Chinese settings, they will then discover that they have entered the pieces of their name in the "wrong places."

I thus have both combinations, most likely depending on which language they were using for their language setting.
In reply to Thomas Robb

first names and last names, given names and surnames

by Martin Dougiamas -
Picture of Core developers Picture of Documentation writers Picture of Moodle HQ Picture of Particularly helpful Moodlers Picture of Plugin developers Picture of Testers
To prevent these mixups happening in future I'm going to alter the tranlations in English to read:
  $string['lastname'] = 'Surname';
$string['firstname'] = 'Given name(s)';
and recommend to all translators that they translate these literally. There will then be a new string that specifies the best order to use:
  $string['fullnamedisplay'] = '$a->firstname $a->lastname';

...and all displayed names will be printed using the new fullname function for full control.

If anyone has any objections, speak now, because I'm fixing this today!

(I can't think of a clean way to fix existing name mixups other than just asking all the users to visit their profile and fix their own entry.)

In reply to Martin Dougiamas

Re: first names and last names, given names and surnames

by Thomas Robb -
Thanks, Martin! Since there may be teachers whose entire student database has the names reversed, I wonder if there might be a simple way to fix it. For example, when upgrading, admin could be asked which way the names currently in the DB should be renamed. It would seem to be a simple matter, for example, to swap the names of the fields in the User table rather than swapping the data itself, if everything needs to be changed around.

For example, when upgrading, the admin could be presented with a sampling of say, 10 sets fo "lastname" & "firstname", and then respond by clicking a button to determine if they are appearing in surname-given or given-surname order, after which the program could adjust the table accordingly.

Of course, in instances where the names are in mixed order, as you say, the students will just have to be asked to fix it manually.

-- or perhaps a small separate "swapname.php" script could be provided for this one-time only task.
In reply to Martin Dougiamas

Re: first names and last names, given names and surnames

by Martin Dougiamas -
Picture of Core developers Picture of Documentation writers Picture of Moodle HQ Picture of Particularly helpful Moodlers Picture of Plugin developers Picture of Testers
This is now all done in CVS.  There is a new setting on the Variables page called fullnamedisplay to control the site and a string in moodle.php called fullnamedisplay to control each languauge.

I've also fixed Hungarian, but can someone check Japanese, Chinese etc and make sure everything is in order?