Dhee Indic Transcriber

By dheeyantra

0+ active installationsVersion 1.2.1

Readers pick the script they read, and the Indic text on every page is rewritten in it: Devanagari, Malayalam, Tamil, Bengali, Roman and more.

Description

A Malayali who never learnt Devanagari can read a Sanskrit stotram in Malayalam letters. A Tamil reader can follow a Hindi post in Tamil script. A Bengali can read a Telugu page in Bengali.

Dhee Indic Transcriber puts a slim bar at the top of every page that has Indic text, with two controls:

  • Read in — a dropdown of scripts. The reader picks one, and every piece of Indic text on the page is rewritten in it, whatever script it was written in. Text in English is never touched.
  • Sanskrit mode — checked by default. Every letter keeps its own vowel, as Sanskrit is read: राम becomes Rama, कमल becomes കമല. Uncheck it to read Hindi, Marathi, Bengali, Gujarati, Odia and Punjabi the way they are spoken today: Ram, കമൽ.

The bar stays on screen at every size, from phones to wide desktops. The reader’s choice is remembered in their browser and applies to every page they open, so they choose once.

A page with nothing to convert, such as an English-only page, gets no bar. Indic text inside code or in the parts you ask the plugin to leave alone does not count. If Indic text arrives later (comments, infinite scroll), the bar appears then.

This is transliteration, not translation: the words stay the same, only the letters change.

How it works

The conversion runs in the reader’s browser, using a JavaScript port of DheeYantra’s SreeVidya engine. Each word is broken into its sounds and the sounds are written out in the chosen script, so any supported script converts to any other.

  • Your posts are never changed. Turn the plugin off and nothing is left behind.
  • Nothing is sent to a server, and every visitor gets the same HTML, so page caching keeps working.
  • Text added after the page loads — comments, infinite scroll, anything a script adds — is converted as it appears.
  • Code, form fields and anything marked notranslate are left alone, and you can name other parts of the page to leave alone.

Accuracy

The engine was checked against the original Java SreeVidya over 1,609 lines of real text and 3,989 lines of random characters, in every script and both modes. It gives the same output everywhere except where it deliberately does better: it keeps the chandrabindu (ँ) in scripts that have one, writes Gurmukhi text without stray Devanagari letters, reads Bengali, Odia, Assamese and Gurmukhi vowels and nukta letters correctly, writes Malayalam as Malayalam is written (അമ്മ, ദില്ലി, കല്യാണം, ശങ്കര, പഞ്ച — not അംമ, ദിൽലി, കൽയാണം, ശംകര, പംച), and never loses a sentence to an error.

Some limits come from the scripts themselves. Tamil has one letter for k, kh, g and gh, so text converted into Tamil cannot be converted back exactly; the plugin always converts from the original, so a reader moving between scripts loses nothing. Roman output follows ISO 15919, the international standard for writing Indic scripts in Latin letters: every vowel and consonant has its own letter (rāma, kr̥ṣṇa, saṁskr̥tam, tamiḻ), short and long e and o are kept apart (eḷu, ēḷu), and a colon separates letters that would otherwise read as one (ka:i is कइ, kai is कै).

Credits

  • The plugin, and the transliteration engine in it (a JavaScript port of SreeVidya), are Copyright (C) 2016-2026 DheeYantra Research Labs Private Limited, licensed under the GNU General Public License version 2 only (LICENSE.txt).
  • Gayathri font: Copyright 2023 The Gayathri Project Authors (https://gitlab.com/smc/fonts/gayathri), SIL Open Font License 1.1.

Installation

  1. Upload the dhee-indic-transcriber folder to /wp-content/plugins/, or install the zip from Plugins > Add New > Upload Plugin.
  2. Activate it.
  3. Optionally, visit Settings > Dhee Indic Transcriber to choose which scripts readers are offered, the default script, whether Sanskrit mode starts checked, and whether the bar sits at the top or the bottom.

FAQ

Why does Malayalam look different from the rest of my site?

Malayalam has two ways of drawing the same letters: traditional, with conjuncts stacked into one shape (സ്കൃ in സംസ്കൃതം), and reformed, with a visible chandrakkala between them. Which one a reader sees depends only on the font, and most phones and computers draw the reformed one. The plugin draws Malayalam in Gayathri, a traditional-orthography font by Swathanthra Malayalam Computing (SIL Open Font License, included in assets/fonts/gayathri), for readers who choose Malayalam. Only Malayalam letters change font. If you prefer your readers’ own fonts, untick “Draw Malayalam with its traditional conjuncts” in the settings.

The other scripts need nothing extra: the fonts readers already have stack Devanagari, Bengali, Gujarati, Odia, Telugu and Kannada conjuncts properly, and Tamil and Gurmukhi show the virama by convention.

My theme’s fixed header covers the bar, or the bar covers it

Set the bar position to Bottom of the screen in Settings > Dhee Indic Transcriber.

How do I keep part of a page in its original script?

Add the class notranslate or itx-skip to it, or list CSS selectors for it under “Leave these alone” in the settings.

Does it affect search engines?

No, unless you set a default script other than “As written”. Search engines see your text as you wrote it.

Can I link to a page in a particular script?

Yes: add ?itx_script=tamil to the address (and &itx_sanskrit=0 for spoken mode). The page opens in that script without changing the reader’s saved choice. The script names are devanagari, bengali, gurmukhi, gujarati, odia, tamil, telugu, kannada, malayalam and roman.

Can I change the bar’s colours?

Yes, with CSS custom properties in your theme or under Appearance > Customize > Additional CSS:

#indic-transcriber-bar { --itx-bg: #7c2d12; --itx-fg: #fff7ed; --itx-accent: #fde68a; }

The height is --itx-height on :root (44px by default).

Can a script choose for the reader, or build its own switcher?

IndicTranscriber.choose(‘malayalam’) switches the page (pass '' for the text as written, and a second argument false for spoken mode). IndicTranscriber.current() returns the choice, IndicTranscriber.hasIndic() says whether the page has Indic text, and IndicTranscriber.refresh() reconverts the page and looks for Indic text again: a site that swaps its content without loading a new page calls it after each change of page, and the bar then shows or hides to match. The engine itself is SreeVidya.transliterate(text, 'malayalam', { sanskrit: true }).

Why is there no bar on some pages?

The bar shows only on pages with Indic text to convert: Devanagari, Bengali, Gurmukhi, Gujarati, Odia, Tamil, Telugu, Kannada or Malayalam letters. The server makes a first guess from the page’s posts, title and site name, so the bar does not pop in or out, and the reader’s browser then checks the whole page. The indic_transcriber_page_has_indic filter overrides the first guess.

Can I switch it off on some pages?

Yes, with a filter:

add_filter( 'indic_transcriber_enabled', function ( $on ) { return $on && ! is_page( 'checkout' ); } );

Does it work with page caching and JavaScript optimisation plugins?

Page caching, yes. If a plugin delays JavaScript until the visitor interacts, either exclude indic-transcriber from that or turn off “Hide the page until it has been converted”, or readers who have chosen a script will see a blank page for 1.5 seconds.

Screenshots

Changelog

1.2.1

  • Going back from Malayalam leaves every inline style exactly as the page wrote it. The style of an element given the Malayalam font used to come back rewritten in the browser’s own form (color: #333 as color: rgb(51, 51, 51);).

1.2.0

  • Roman is written in ISO 15919: ā ī ū r̥ ē ō ṁ ḥ ṅ ñ ṭ ḍ ṇ ś ṣ ḷ ḻ ṟ, in lower case, with a colon where two letters would read as one. It was an informal English-style spelling (Namasthe, Paroa).

1.1.0

  • The bar shows only on pages that have Indic text to convert, and appears if Indic text is added later.
  • IndicTranscriber.hasIndic(), and IndicTranscriber.refresh() now checks the page for Indic text again.

1.0.0

  • First release.