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 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. This common source of the Indo-European languages 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: Goethe went on to borrow a device from the play for his . In the introduction to The World as Will and Representation, written in 1818, Arthur Schopenhauer stated that "the access to , 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 poetWilliam 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 numerical prefixes. 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, and his quotation from the Bhagavad Gita "Now, I am become Death, the destroyer of worlds." in reference to the Trinity test is well known. The nineteenth century was a golden age of Western Sanskrit scholarship, and many of the giants of the field 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 Hinduliturgical 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.