The study of Sanskrit in the Western world began in the 17th century. Some of Bhartṛhari's poems were translated into Portuguese in 1651. In 1779 a legal code known as vivādārṇavasetu was translated by Nathaniel Brassey Halhed from a Persian translation, and published as A Code of Gentoo Laws. In 1785 Charles Wilkins published an English translation of the Bhagavad Gita, which was the first time a Sanskrit book had been translated directly into a European language.
In 1786 Sir William Jones, who had founded The Asiatic Society two years earlier, delivered the third annual discourse; in his often-cited "philologer" passage, he noted similarities between Sanskrit, Ancient Greek and Latin—an event which is often cited as the beginning of comparative linguistics, Indo-European studies, and Sanskrit philology.
"The Sanscrit language, whatever be its antiquity, is of a wonderful structure; more perfect than the Greek, more copious than the Latin, and more exquisitely refined than either, yet bearing to both of them a stronger affinity, both in the roots of verbs and the forms of grammar, than could possibly have been produced by accident; so strong indeed, that no philologer could examine them all three, without believing them to have sprung from some common source, which, perhaps, no longer exists; there is a similar reason, though not quite so forcible, for supposing that both the Gothic and the Celtic, though blended with a very different idiom, had the same origin with the Sanscrit; and the old Persian might be added to the same family."
This common source eventually came to be known as Proto-Indo-European, following the work of Franz Bopp and others.
In 1789 Jones published a translation of Kālidāsa's The Recognition of Sakuntala. The translation captured the admiration of many, notably Goethe, who expressed his admiration for the Sanskrit play Shakuntala:
"Wouldst thou the young year's blossoms and the fruits of its decline
And all by which the soul is charmed, enraptured, feasted, fed,
Wouldst thou the earth and heaven itself in one sole name combine?
I name thee, O Sakuntala! and all at once is said."
Goethe went on to borrow a device from the play for his Faust, Part One.
In the introduction to The World as Will and Representation, written in 1818, Arthur Schopenhauer stated that "the access to [the Vedas], opened to us through the Upanishads, is in my eyes the greatest advantage which this still young century enjoys over previous ones, because I believe that the influence of the Sanscrit literature will penetrate not less deeply than did the revival of Greek literature in the fifteenth century".
The Irish poet William Butler Yeats was also inspired by Sanskrit literature. However, the discovery of the world of Sanskrit literature moved beyond German and British scholars and intellectuals — Henry David Thoreau was a sympathetic reader of the Bhagavad Gita — and even beyond the humanities. Ralph Waldo Emerson was also influenced by Sanskrit literature. In the early days of the Periodic Table, scientists referred to as yet undiscovered elements with the use of Sanskrit prefixes (see Mendeleev's predicted elements). J. Robert Oppenheimer In 1933 met the Indologist Arthur W. Ryder at Berkeley and learned Sanskrit. He read the Bhagavad Gita in the original language. Later he cited it as one of the most influential books to shape his philosophy of life.
The nineteenth century was a golden age of Western Sanskrit scholarship, and many of the giants of the field (Whitney, Macdonnell, Monier-Williams, Grassmann) knew each other personally. Perhaps the most commonly known example of Sanskrit in the West was also the last gasp of its vogue. T. S. Eliot, a student of Indian Philosophy and of Sanskrit under Lanman, ended The Waste Land with Sanskrit: "Shantih Shantih Shantih".
Current usage and study
Sanskrit is taught in many South Asia Studies and/or Linguistics departments in Western universities. In addition to this, it is also used during worship in Hindu temples in the West, being the Hindu liturgical language, and Sanskrit revival attempts are underway amongst expatriate Hindu populations. Similarly, Sanskrit study is also popular amongst the many Western practitioners of Yoga, who find the language useful in understanding the Yoga Sutra.