/building · 2024

Translation of the Bhagavad Gita

sanskrit · word-by-word · audio

A translation of the Bhagavad Gita on gita.pub with every Sanskrit word individually glossed, recitations from five narrators, and the whole dataset in a public git repository.

A verse page on gita.pub, with an illustration above the translation and footnote links on each phrase

I wanted to create a translation that inspires people to form their own understanding of the text. On gita.pub, the original Sanskrit words are individually translated, and the full translation is written as a cohesive narrative.

A verse page on gita.pub, with an illustration above the translation and a footnote marker on each phrase
Every superscript on the translation opens the Sanskrit behind that phrase, word by word.

Transliterating Devanagari#

Devanagari is an abugida, where every consonant carries an implicit short a unless a vowel sign replaces it or a virama mark cancels it.

क is ka, कि is ki, क् is bare k.

This makes character-for-character transliteration a bit complicated. To transliterate Devanagari to its ISO 15919 romanization, the transliterator on the site handles this with a placeholder pass. Every consonant is first emitted carrying a capital A (क becomes kA), vowel signs become their roman vowels, and the virama becomes a zero-width space. A second pass decides what happens to each placeholder: deleted when the zero-width space follows, absorbed into a full vowel that follows, and lowercased into the inherent a otherwise. What this actually looks like is a massive chained regex replacement, and the same trick emits both IAST and ISO 15919 romanization.

cd /building