Dev Anand has worked on quite a few films that had scripts adapted from novels and plays. The most famous instance is Guide, based on a novel by R.K.Narayan. Lesser known is Afsar, based on The Inspector General, a satirical play by the Russian and Ukrainian dramatist and novelist Nikolai Gogol. The Inspector General was also adapted in Marathi by P.L.Deshpande (popularly known as Pu.La) as Ammaldar.
P.L.Deshpande also famously adapted George Bernard Shaw's Pygmalion in Marathi, as Ti Fulrani. This Marathi adaptation was the source for another Dev Anand film, Man Pasand, in 1980, directed by Basu Chatterjee. The source of all these versions are the same – George Bernard Shaw's Pygmalion, even though most film versions sought a more direct inspiration from the novel's famous 1956 Broadway production and the 1964 Hollywood musical, My Fair Lady.
In Greek mythology, Pygmalion was the king of Cyprus who found faults with women and hence decided to live unmarried. When he sculpts a statue of a beautiful woman (that he named Galatea), he came to regard his creation as so perfect that he fell in love with her. Bernard Shaw adapted this myth to modern-day England and used his play about a phonetics professor's efforts to refine the speech and manner of a flower girl.
In the Hindi film remake (freemake), Dev Anand plays the professor, Girish Karnad his friend, and Tina Munim, the girl who sells datun (instead of flowers).
Man Pasand had music by Rajesh Roshan. Considering the film is inspired by My Fair Lady, it is interesting to note that Rajesh Roshan helps himself with 2 songs from the play/film, that too, for the same situations! Even the lyrics, by Amit Khanna (the film's producer), are directly inspired by the original's lyrics.
The play (and the film) had lyrics by Alan Jay Lerner and music by Frederick Loewe.
The first song that Rajesh adapts (to put it charitably) is "Wouldn't It Be Loverly". The song has the girl expressing her wish for a house and lots of chocolates. The Hindi version, "Rehne Ko Ek Ghar Hoga" (sung by T Meena) is a desi replica that has Tina Munim wanting a house, and halwa to eat! The tune by Rajesh Roshan is the same as the original, with an extension into the antara that is absent in the original but is unique to Indian film music's template.
Listen to "Wouldn't It Be Loverly"
Listen to "Rehne Ko Ek Ghar Hoga"
The same original tune was also used in a TV advertisement that was popular during Doordarshan's heyday. The biscuits brand Bakeman's had a TV advertisement that used the core idea from My Fair Lady featuring a stiff upper lip English Professor, and instead of a flower seller girl, a young child. The child starts by not pronouncing 'Marie' correctly, but eventually, in a jingle inspired by the tune of "Wouldn't It Be Loverly", gets the pronunciation right!
Listen to the Bakeman's jingle
Given how integral Doordarshan was in my growing up days, my memories of the My Fair Lady song always ends with, 'Crispy, crunchy… Ooooh', from the Bakeman's jingle!
(Digression: Bakeman's has run into financial difficulties because of massive advertising splurges in the late 90s, following the footsteps of Britannia. During its best days, Bakeman's gave industry leaders Britannia and Parle Products sleepless nights with its aggressively-priced offerings in the Marie and Glucose segments.)
The other song from My Fair Lady that gets a Hindi treatment is "Hothon Pe Geet Jage" (sung by Lata Mangeshkar). The tune, the video, the characters in the video… everything has been used as-is from My Fair Lady, in Hindi!! The original song is, "I Could Have Danced All Night".
Listen to "I Could Have Danced All Night"
Listen to "Hothon Pe Geet Jage"