Difference between revisions of "Template:LastNameFirst"

From ChoralWiki
Jump to navigation Jump to search
(added Josquin des Prez as an exception)
(Adding George de La Hèle)
 
(One intermediate revision by one other user not shown)
Line 1: Line 1:
 
<includeonly>{{#switch: {{{1|{{PAGENAME}}}}}</includeonly>
 
<includeonly>{{#switch: {{{1|{{PAGENAME}}}}}</includeonly>
 
<!-- ADD HERE EXCEPTIONS TO THE RULE, IN ALPHABETICAL ORDER --><noinclude>'''Exceptions list:'''<poem></noinclude>
 
<!-- ADD HERE EXCEPTIONS TO THE RULE, IN ALPHABETICAL ORDER --><noinclude>'''Exceptions list:'''<poem></noinclude>
 +
|Josquin des Prés
 +
|Josquin des Prez
 +
|Josquin Des Prez = Josquin Des Prez
 +
|George de La Hèle
 +
|George de La Hele
 +
|George de la Hèle
 +
|George de la Hele = La Hèle, George de
 +
|Pierre de la Rue
 +
|Pierre de La Rue = La Rue, Pierre de
 
|Jose Mauricio Nunes Garcia
 
|Jose Mauricio Nunes Garcia
 
|José Maurício Nunes Garcia = Nunes Garcia, José Maurício
 
|José Maurício Nunes Garcia = Nunes Garcia, José Maurício
|Pierre de la Rue
 
|Pierre de La Rue = La Rue, Pierre de
 
|Josquin des Prés
 
|Josquin des Prez
 
|Josquin Des Prez = Des Prez, Josquin
 
 
<!-- END OF EXCEPTIONS LIST --><noinclude></poem></noinclude><includeonly>
 
<!-- END OF EXCEPTIONS LIST --><noinclude></poem></noinclude><includeonly>
 
|#default = {{#switch: {{#explode:{{{1|{{PAGENAME}}}}}||-1}}
 
|#default = {{#switch: {{#explode:{{{1|{{PAGENAME}}}}}||-1}}

Latest revision as of 02:25, 30 October 2021

Exceptions list:


|Josquin des Prés
|Josquin des Prez
|Josquin Des Prez = Josquin Des Prez
|George de La Hèle
|George de La Hele
|George de la Hèle
|George de la Hele = La Hèle, George de
|Pierre de la Rue
|Pierre de La Rue = La Rue, Pierre de
|Jose Mauricio Nunes Garcia
|José Maurício Nunes Garcia = Nunes Garcia, José Maurício

Documentation

Converts a text in the form "Name(s) Surname" to the form "Surname, Name(s)".

Syntax:

{{LastNameFirst}}

returns the contents of {{PAGENAME}} after processing it.

Syntax with an optional parameter:

{{LastNameFirst|Antonín Dvořák}}

returns "Dvořák, Antonín" (note that diacritics are not removed)

{{LastNameFirst|Gregorian chant}}

returns "Gregorian chant" (chant names are not inverted)

{{LastNameFirst|José Maurício Nunes Garcia}}

returns "Nunes Garcia, José Maurício" (it is one of the names on the Exceptions list)

Usage by other templates

LastNameFirst is used inside template NameSorter, which generates sort keys. NameSorter does remove diacritics:

{{NameSorter|José Maurício Nunes Garcia}}

returns "Nunes Garcia, Jose Mauricio "