<?xml version="1.0" encoding="utf-8"?><feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en-us"><generator uri="https://gohugo.io/" version="0.101.0">Hugo</generator><title type="html">transliteration on A Scripter's Notes</title><subtitle type="html">Emacs, scripting and anything text oriented.</subtitle><link href="https://scripter.co/tags/transliteration/" rel="alternate" type="text/html" title="HTML"/><link href="https://scripter.co/tags/transliteration/index.xml" rel="alternate" type="application/rss+xml" title="RSS"/><link href="https://scripter.co/tags/transliteration/atom.xml" rel="self" type="application/atom+xml" title="Atom"/><link href="https://scripter.co/tags/transliteration/jf2feed.json" rel="alternate" type="application/jf2feed+json" title="jf2feed"/><updated>2026-04-22T08:24:58-04:00</updated><author><name>Kaushal Modi</name><email>kaushal.modi@gmail.com</email></author><id>https://scripter.co/tags/transliteration/</id><entry><title type="html">Gujarati Transliteration</title><link href="https://scripter.co/gujarati-transliteration/?utm_source=atom_feed" rel="alternate" type="text/html"/><link href="https://scripter.co/gujarati-fonts-in-emacs/?utm_source=atom_feed" rel="related" type="text/html" title="Gujarati fonts in Emacs"/><link href="https://scripter.co/cleaning-up-gopath-pkg/?utm_source=atom_feed" rel="related" type="text/html" title="Cleaning up ${GOPATH}/pkg/"/><link href="https://scripter.co/view-github-pull-requests-in-magit/?utm_source=atom_feed" rel="related" type="text/html" title="View GitHub Pull Requests in Magit"/><link href="https://scripter.co/emacs-lisp-advice-combinators/?utm_source=atom_feed" rel="related" type="text/html" title="Emacs Lisp: Advice Combinators"/><link href="https://scripter.co/org-show-only-post-subtree-headings/?utm_source=atom_feed" rel="related" type="text/html" title="Org: Show only Post subtree headings"/><id>https://scripter.co/gujarati-transliteration/</id><author><name>Kaushal Modi</name></author><published>2022-06-27T18:43:00-04:00</published><updated>2022-06-27T18:43:00-04:00</updated><content type="html"><![CDATA[<blockquote>You can phonetically write a non-English language on an English
keyword in Emacs, and that transforms into that non-English
script. This is called <a href="https://en.wikipedia.org/wiki/Transliteration"><em>transliteration</em></a>, and I demonstrate that for
the Gujarati language in this post.</blockquote><div class="ox-hugo-toc toc">
<div class="heading">Table of Contents</div>
<ul>
<li><a href="#enabling-transliteration">Enabling transliteration</a></li>
<li><a href="#toggling-the-input-method">Toggling the input method</a></li>
<li><a href="#caveats-with-gujarati-and-other-indic-language-transliteration">Caveats with Gujarati and other Indic language transliteration</a></li>
<li><a href="#input-method-cheat-sheet">&ldquo;Input method&rdquo; cheat sheet</a></li>
<li><a href="#closing">Closing</a></li>
<li><a href="#gujarati-transliteration-references">References</a></li>
</ul>
</div>
<!--endtoc-->
<p>Emacs provides the transliteration feature using the
<strong>set-input-method</strong> command. I&rsquo;ll introduce that and few related
functions in this post to get to help get started with transliteration
quickly.</p>

<h2 id="enabling-transliteration">Enabling transliteration&nbsp;<a class="headline-hash no-text-decoration" href="#enabling-transliteration">#</a></h2>


<p>Emacs uses the &ldquo;input method&rdquo; feature to do character conversion from
ASCII to the target language or script. The &ldquo;input method&rdquo;, stored in
<code>current-input-method</code>, is <em>nil</em> by default. In this state, you see
the exact ASCII in Emacs buffer, that you typed on the
keyboard<sup id="fnref:1"><a href="#fn:1" class="footnote-ref" role="doc-noteref">1</a></sup>.</p>
<p>In this post, my target non-English language is <a href="https://en.wikipedia.org/wiki/Gujarati_language">Gujarati</a>. So I want to
type on my English keyboard and have Gujarati script letters show up
in the buffer.</p>
<p>Emacs provides the <code>set-input-method</code> command to change the <em>current
input method</em>. This command is bound to <kbd>C-x</kbd> <kbd>RET</kbd>
<kbd>C-\</kbd> by default. Pick the new input method after calling
that command.</p>
<div class="note">
<p>To see the available input methods, do <code>M-x list-input-methods</code>.</p>
</div>
<p>As I want to do Gujarati transliteration, I pick the <code>gujarati-itrans</code>
method.</p>
<p>If you don&rsquo;t know Gujarati, don&rsquo;t fret! The commands shown here will
work when transliterating to other languages too &mdash; only the
Gujarati-specific <em>input method</em> <code>gujarati-itrans</code> will change to the
input method of your choice.</p>

<h2 id="toggling-the-input-method">Toggling the input method&nbsp;<a class="headline-hash no-text-decoration" href="#toggling-the-input-method">#</a></h2>


<p>I often need to switch between the Gujarati and English languages in
the same document. You can see me doing that in this post next section
onwards. The <code>toggle-input-method</code> command bound by default to
<kbd>C-\</kbd> is helpful here.</p>
<p>So if I am already in the &ldquo;Gujarati transliteration mode&rdquo; calling this
command will set <code>current-input-method</code> back to <em>nil</em>. Repeating that
same call will again set <code>current-input-method</code> to <code>gujarati-itrans</code>,
and I will once again be in the &ldquo;Gujarati transliteration mode&rdquo;.</p>

<h2 id="caveats-with-gujarati-and-other-indic-language-transliteration">Caveats with Gujarati and other Indic language transliteration&nbsp;<a class="headline-hash no-text-decoration" href="#caveats-with-gujarati-and-other-indic-language-transliteration">#</a></h2>


<p>Apologies, but this section is meaningful only if you know how to read
Gujarati. So you can safely skip to the next section.</p>
<p>Below table is a quick glimpse of some nuances in Gujarati
transliteration. I will save my explanation and instead show some of
the mistakes I made in transliteration using examples.</p>
<table>
<thead>
<tr>
<th>ASCII input</th>
<th>Gujarati Transliteration</th>
<th>Rough Translation</th>
</tr>
</thead>
<tbody>
<tr>
<td><em>ram</em></td>
<td>રમ્</td>
<td>(incorrect spelling, no meaning)</td>
</tr>
<tr>
<td><em>rama</em></td>
<td>રમ</td>
<td>play</td>
</tr>
<tr>
<td><em>raama</em></td>
<td>રામ</td>
<td>a popular name Raama (as in Lord Raama)</td>
</tr>
<tr>
<td><em>angreji</em></td>
<td>અન્ગ્રેજિ</td>
<td>(incorrect spelling)</td>
</tr>
<tr>
<td><em>hu.n</em></td>
<td>હું</td>
<td>I</td>
</tr>
<tr>
<td><em>chhu.n</em></td>
<td>છું</td>
<td>am</td>
</tr>
<tr>
<td><em>a.ngrejii</em></td>
<td>અંગ્રેજી<sup id="fnref:2"><a href="#fn:2" class="footnote-ref" role="doc-noteref">2</a></sup></td>
<td>English (language)</td>
</tr>
<tr>
<td><em>Ime.cksa</em></td>
<td>ઈમૅક્સ</td>
<td>this literally reads &ldquo;Emacs&rdquo;</td>
</tr>
</tbody>
</table>

<h2 id="input-method-cheat-sheet">&ldquo;Input method&rdquo; cheat sheet&nbsp;<a class="headline-hash no-text-decoration" href="#input-method-cheat-sheet">#</a></h2>


<p>Thankfully Emacs provides full help through the
<code>describe-input-method</code> command bound to <kbd>C-h</kbd>
<kbd>C-\</kbd>
<span class="sidenote-number"><small class="sidenote">
If you haven&rsquo;t already noticed the consistency in these bindings, the
default bindings with <kbd>C-\</kbd> in them are related to &ldquo;input
method&rdquo; commands.
</small></span>
by default.</p>
<p>For example, <code>M-x describe-input-method gujarati-itrans</code> gives this:</p>
<p><a id="figure--gujarati-itrans-help"></a></p>



<figure>
    <a href="gujarati-itrans-help.png">
        <img src="https://scripter.co/gujarati-transliteration/gujarati-itrans-help.png" alt="Figure 1: Partial screen capture of Gujarati transliteration cheat sheet C-h C- gujarati-itrans"/> </a><figcaption>
                <p>
                    <span class="figure-number">Figure 1: </span>Partial screen capture of Gujarati transliteration cheat sheet <code>C-h C- gujarati-itrans</code>
                    
                        
                        </p>
                
            </figcaption></figure>

<p>The ∗Help∗ that shows up looks formidable at the first glance. Though,
I found comfort in the fact that roughly half of the key sequences
were obvious and roughly half resulted in Gujarati characters that I
have never found the need of! 😃</p>

<h2 id="closing">Closing&nbsp;<a class="headline-hash no-text-decoration" href="#closing">#</a></h2>


<p>Typing this in the &ldquo;transliteration mode&rdquo;:</p>
<blockquote>
<p>maaru naama kaushala chhe. mane e jaaNii ne aana.nda thaaya chhe ke
hu.n aa sahelaaI thI lakhI shaku chhu.n. (joDanI-bhula maapha.)</p>
</blockquote>
<p>will result in:</p>
<p>મારુ નામ કૌશલ છે. મને એ જાણી ને આનંદ થાય છે કે હું આ સહેલાઈ થી લખી શકુ
છું. (જોડણી-ભુલ માફ.)</p>
<p><em>Translation: My name is Kaushal. I am happy knowing that I can write
this easily.</em></p>

<h2 id="gujarati-transliteration-references">References&nbsp;<a class="headline-hash no-text-decoration" href="#gujarati-transliteration-references">#</a></h2>


<ul>
<li><a href="https://www.gnu.org/software/emacs/manual/html_node/emacs/Input-Methods.html" title="Emacs Lisp: (info &quot;(emacs) Input Methods&quot;)">Emacs Info: Input Methods</a>
<ul>
<li><a href="https://www.gnu.org/software/emacs/manual/html_node/emacs/Select-Input-Method.html" title="Emacs Lisp: (info &quot;(emacs) Select Input Method&quot;)">Emacs Info: Select Input Method</a></li>
</ul>
</li>
<li><code>M-x describe-input-method gujarati-itrans</code></li>
</ul>
<div class="footnotes" role="doc-endnotes">
<hr>
<ol>
<li id="fn:1">
<p>I am assuming an English keyboard here.&#160;<a href="#fnref:1" class="footnote-backref" role="doc-backlink">&#x21a9;&#xfe0e;</a></p>
</li>
<li id="fn:2">
<p>This spelling might still render incorrectly on your browser
depending on the unicode character set available for Gujarati on your
system.&#160;<a href="#fnref:2" class="footnote-backref" role="doc-backlink">&#x21a9;&#xfe0e;</a></p>
</li>
</ol>
</div>
]]></content><category scheme="https://scripter.co/categories/emacs" term="emacs" label="emacs"/><category scheme="https://scripter.co/series/gujarati-in-emacs" term="gujarati-in-emacs" label="Gujarati in Emacs"/><category scheme="https://scripter.co/tags/gujarati" term="gujarati" label="gujarati"/><category scheme="https://scripter.co/tags/transliteration" term="transliteration" label="transliteration"/><category scheme="https://scripter.co/tags/100daystooffload" term="100daystooffload" label="100DaysToOffload"/></entry></feed>