This Help forum is for issues relates to the latest release (1.1.x). For issues related to beta or svn version please use their own Help forum.
When requesting help please provide as much information as possible. Explain what version of webtrees, PHP and MYSQL you are using. If possible provide a URL to your site so we can see the problem first-hand.
Tip: Think about putting these details in your signature, so it appears in the footer of ALL your messages
  • Page:
  • 1

TOPIC: A question regarding surname, given name order

A question regarding surname, given name order 9 years 6 days ago #1

  • balage
  • balage's Avatar Topic Author
  • Visitor
  • Visitor
Hello,

Is there a way to change the order of surname / given names in v.1.1.2?
There are quite a few country (for example Hungary) where people use their surname first then their given name.
For example not David Hasselhoff but Hasselhoff David.

This was working in PGV (I don't remember how I did it) but not in webtrees. I couldn't find any option to adjust this behaviour.

Any suggestion is appreciated,

Balazs

Please Log in or Create an account to join the conversation.

Re: A question regarding surname, given name order 9 years 6 days ago #2

  • bonbonthejon
  • bonbonthejon's Avatar
  • Visitor
  • Visitor
You can change the name order. Under the Administration configuration, under the "Family Trees" section, click on the name of your tree. Then under the "Edit Options" tab, you will find "Surname tradition" which has a couple of options.

Please Log in or Create an account to join the conversation.

Re: A question regarding surname, given name order 9 years 6 days ago #3

  • fisharebest
  • fisharebest's Avatar
  • Offline
  • Administrator
  • Administrator
  • Posts: 12924
This is language-dependent setting.

When you add a new person, you type in the given name (GIVN) and the surname (SURN).

When hungarian is selected, the name is created as "/SURN/ GIVN"
When chinese is selected, the name is created as "/SURN/GIVN" (no space)
When other languages are selected, the name is created as "GIVN /SURN/"

Names are displayed the same way that they are stored. If you want a (hungarian) name to be displayed surname first, you must store it surname first.

This name will be displayed as "Greg Roach"

1 NAME Greg /Roach/
2 GIVN Greg
2 SURN Roach

This name will always be displayed as "Ban Ki-moon"

1 NAME /Ban/ Ki-moon
2 GIVN Ki-moon
2 SURN Ban
Greg Roach - This email address is being protected from spambots. You need JavaScript enabled to view it. - fisharebest.webtrees.net

Please Log in or Create an account to join the conversation.

Re: A question regarding surname, given name order 9 years 6 days ago #4

  • balage
  • balage's Avatar Topic Author
  • Visitor
  • Visitor

bonbonthejon wrote: You can change the name order. Under the Administration configuration, under the "Family Trees" section, click on the name of your tree. Then under the "Edit Options" tab, you will find "Surname tradition" which has a couple of options.


It doesn't matter what I choose there. The order doesn't change.

Please Log in or Create an account to join the conversation.

Re: A question regarding surname, given name order 9 years 6 days ago #5

  • balage
  • balage's Avatar Topic Author
  • Visitor
  • Visitor

fisharebest wrote: This is language-dependent setting.

When you add a new person, you type in the given name (GIVN) and the surname (SURN).

When hungarian is selected, the name is created as "/SURN/ GIVN"
When chinese is selected, the name is created as "/SURN/GIVN" (no space)
When other languages are selected, the name is created as "GIVN /SURN/"

Names are displayed the same way that they are stored. If you want a (hungarian) name to be displayed surname first, you must store it surname first.

This name will be displayed as "Greg Roach"

1 NAME Greg /Roach/
2 GIVN Greg
2 SURN Roach

This name will always be displayed as "Ban Ki-moon"

1 NAME /Ban/ Ki-moon
2 GIVN Ki-moon
2 SURN Ban


Indeed. When I changed the "1 NAME" gedcom record to "/SURN/ GIVN" it displayed the name in the right order. Although I have checked the old PGV database where the names were stored like 1 NAME GIVN "/SURN/" and the names were displayed in the right order. Strange.

Anyway. Is there an easy way to change all records in the database? Should I only need to change the "1 NAME" records?

Thanks,

Please Log in or Create an account to join the conversation.

Re: A question regarding surname, given name order 9 years 6 days ago #6

  • fisharebest
  • fisharebest's Avatar
  • Offline
  • Administrator
  • Administrator
  • Posts: 12924
<<I have checked the old PGV database where the names were stored like 1 NAME GIVN "/SURN/" and the names were displayed in the right order.>>

PGV is a different program :-)

That technique cannot work when you have a mixture of GIVN/SURN and SURN/GIVN names in your database. Instead, webtrees follows the GEDCOM standards, which say that the NAME field must contain the persons name, as they would write it.

<<Anyway. Is there an easy way to change all records in the database?>>

Use an advanced text editor? Using vi / vim / gvim, the following command should do it.

:g~^1 NAME~s~^1 NAME\( .*\)\( /.*/\)~1 NAME\2\1~

<<Should I only need to change the "1 NAME" records?>>

Yes
Greg Roach - This email address is being protected from spambots. You need JavaScript enabled to view it. - fisharebest.webtrees.net

Please Log in or Create an account to join the conversation.

Re: A question regarding surname, given name order 9 years 3 days ago #7

  • balage
  • balage's Avatar Topic Author
  • Visitor
  • Visitor

fisharebest wrote: ...
<<Anyway. Is there an easy way to change all records in the database?>>

Use an advanced text editor? Using vi / vim / gvim, the following command should do it.

:g~^1 NAME~s~^1 NAME\( .*\)\( /.*/\)~1 NAME\2\1~


That did the trick.
Thanks a lot!

Balázs

Please Log in or Create an account to join the conversation.

  • Page:
  • 1
Powered by Kunena Forum