Contrafactum

In vocal music, contrafactum (or contrafact, pl. contrafacta) is "the substitution of one text for another without substantial change to the music". The earliest known examples of this procedure (sometimes referred to as adaptation ) date back to the 9th century used in connection with Gregorian chant.

Categories
Translations meant for singing are not usually intentional "substitution". Types of contrafacta that are wholesale substitution of a different text include the following:

Poems set to music
An existing tune already possessing secular or sacred words is given a new poem, which often happens in hymns, and sometimes, more than one new set of words is created over time. Examples include:
 * The words of What Child Is This? were fitted to the tune of the folksong "Greensleeves".
 * The Charles Wesley hymn text Hark! The Herald Angels Sing was fitted by William Hayman Cummings to a tune from Mendelssohn's Gutenberg cantata Festgesang.
 * The hymn tune "Dix" has been given several sets of words, among them As with Gladness Men of Old and For the Beauty of the Earth.
 * Monteverdi's "Quel augellin che canta" (4th madrigal book), was transformed into "Qui laudes tuas cantat", using the sacred poem texts by Aquilino Coppini.
 * In Japan, the Scots song "Auld Lang Syne" (lit. "Long Time Ago", "Old Times") has a new set of words in the song "Hotaru no hikari" (lit. "The Light of the firefly"), and is used at graduation ceremonies. Another Western song, also reworked with different lyrics around the same period (late 19th century) and used at graduation ceremonies, sometimes confused with "Hotaru", is "Aogeba tōtoshi".

Self-reworking
A lyricist might re-cast his/her own song (or someone else's song) with new lyrics. Examples include:
 * Alan Jay Lerner with the number She Wasn't You / He Isn't You from the stage and film versions, respectively, of the musical On a Clear Day You Can See Forever.
 * Tim Rice with the number Oh What a Circus from the 1976 musical Evita. It has the same tune as Don't Cry for Me Argentina from the same show.

Parody
Intentional parodies of lyrics, especially for satirical purposes. Examples include;
 * "Weird Al" Yankovic created satirical lyrics with popular music.
 * The humorist Tom Lehrer used a tune from The Pirates of Penzance for his song "The Elements".
 * Forbidden Broadway used satirical lyrics with musicals.
 * The Capitol Steps created political parody with popular music.
 * Mark Russell also created political parody with popular music.

Writers of contrafacta and parody tried to emulate an earlier song's poetic metre, rhyme scheme, and musical metre. They went further by also establishing a close connection to the model's words and ideas and adapting them to a new purpose, whether humorous or serious.

Other
The Australian music quiz show, Spicks and Specks has a game called Substitute, in which players have to identify a popular-music song from someone singing completely unrelated words, such as from a book about knitting, to the tune of that song.

Examples
Other notable songs with significantly-different lyrics in different languages include the following:
 * The melody of the French song Ah! vous dirai-je, maman (English: Oh! Shall I tell you, Mama) is used in English for "Twinkle, Twinkle, Little Star", the "Alphabet Song", and "Baa, Baa, Black Sheep", while all of the following use the melody: the German Christmas carol "" (Santa Claus is Coming Tomorrow) with words by Hoffmann von Fallersleben, the Hungarian Christmas carol "" (Fluffy white snow is falling), the Dutch "" (Kortjakje is Always Sick), the Spanish "" (Little Town Bell), the Greek "Φεγγαράκι μου λαμπρό (Fengaráki mou lampró)" (My Bright Moon), and the Turkish "Daha Dün Annemizin" (Yesterday Our Mother).
 * "Autumn Leaves" (French "Les Feuilles mortes", literally "The Dead Leaves") – French by Jacques Prévert (1945), English by Johnny Mercer (1947), Music by Joseph Kosma(1945)
 * "Comme d'habitude", music by Claude François and Jacques Revaux, original French lyrics by Claude François and Gilles Thibaut, rewritten as "My Way" with English lyrics by Paul Anka. Before Anka acquired the English-language rights to the song, David Bowie had written a different set of lyrics to the same tune, titled "Even a Fool Learns to Love".
 * "For He's a Jolly Good Fellow" (English mid-1800s), from French "Marlbrough s'en va-t-en guerre" ("Marlborough Has Left for the War", 1700s).
 * The "Wilhelmus" (or "het Wilhelmus"), parts of which form the national anthem of the kingdom of the Netherlands, suffers from the same fate. It is based on "The tune of Chartres", specified by the Beggars Songbook of 1576–77 as that of a French song about the siege of the city of Chartres by the Prince of Condé and the Huguenots in the beginning of 1568. This song, with the title "Autre chanson de la ville de Chartres assiegee par le Prince de Condé, sur un chant nouveau", formed the base of "het Wilhelmus".

Songs which have been re-written by the same writer with different lyrics include:
 * "Getting to Know You" (1951, from the musical The King and I, music originally composed by Richard Rodgers for the song "Suddenly Hungry and Sad," intended for the musical South Pacific (from two years earlier), in both instances with lyrics by Oscar Hammerstein II.
 * "Candle in the Wind" (1973, "Goodbye Norma Jean ...") and "Candle in the Wind 1997" ("Goodbye England's Rose ..."), self-reworking by Elton John, lyrics by Bernie Taupin
 * "How You Remind Me" (2001) and "Someday" (2003), self-reworking by Nickelback
 * "Jealous Guy" (1971) and "Child of Nature" (rehearsed by The Beatles in 1968 and 1969, but never formally recorded), self-reworking by John Lennon.
 * "Surfin' U.S.A." (1963) and "Fun, Fun, Fun" (1963) by The Beach Boys and "Sweet Little Sixteen" and "Johnny B. Goode" by Chuck Berry, the latter of which was itself a re-write of "Ain't That Just Like a Woman (They'll Do It Every Time)" by Louis Jordan.

Contrafactum has been used in writing several national anthems, such as those of the United States, the United Kingdom, Russia, Estonia and the Netherlands.