How to type romanized Pali and Sanskrit in Ubuntu

Step-by-step instructions how to prepare your computer to type romanized Pali/Sanskrit and how to use your keyboard to do so.

Step 1: 
Enable IBus

Open the "System Settings" and select "Language Support". Under "Keyboard input method system", choose ibus.

Step 2: 
Create an input method file for transliteration

Start the terminal (select the program launcher, type terminal and select “Terminal”).

Type the following command:

sudo gedit /usr/share/m17n/sa-translit.mim

Paste the following code into the created file and save it before closing. It is basically a list of key combinations and letters.

Example: ("aa" "ā") means, when you press a + a the resulting input will be ā.

Later you can modify the key combinations according to your taste.


  • sa-translit.mim
    ;;; Input method for Sanskrit transliteration using the ITRANS scheme.
    (input-method t sa-translit)
    (title "sa-translit")
    ("aa" "ā")
    ("AA" "Ā")
    ("ii" "ī")
    ("II" "Ī")
    ("uu" "ū")
    ("UU" "Ū")
    (".r" "ṛ")
    (".R" "Ṛ")
    (".rr" "ṝ")
    (".RR" "Ṝ")
    (".l" "ḷ")
    (".L" "Ḷ")
    (".ll" "ḹ")
    (".LL" "Ḹ")
    (".M" "ṁ")
    (".m" "ṃ")
    (".h" "ḥ")
    (".H" "Ḥ")
    (";n" "ṅ")
    (";N" "Ṅ")
    ("~n" "ñ")
    ("~N" "Ñ")
    (".t" "ṭ")
    (".T" "Ṭ")
    (".d" "ḍ")
    (".D" "Ḍ")
    (".n" "ṇ")
    (".N" "Ṇ")
    (";s" "ś")
    (";S" "Ś")
    (".s" "ṣ")
    (".S" "Ṣ")

Step 3: 
Add "sa-translit" to IBus

Select the program launcher, type ibus and select "Keyboard Input Methods". Select tab "Input Method". Select Other and choose "sa-translit". Press "Add" and "Close".

Step 4: 
Typing romanized Pali/Sanskrit

If you want to type romanized Pali/Sanskrit switch to "sa-translit". Press the keyboard sign (usually on the top right) and select "sa-translit". For typing you can use the following key combinations (ITRANS Method):

aa = ā
AA = Ā
ii = ī
II = Ī
uu = ū
UU = Ū
.r = ṛ
.R = Ṛ
.rr = ṝ
.RR = Ṝ
.l = ḷ
.L = Ḷ
.ll = ḹ
.LL = Ḹ
.M = ṁ
.m = ṃ
.h = ḥ
.H = Ḥ
;n = ṅ
;N = Ṅ
~n = ñ
~N = Ñ
.t = ṭ
.T = Ṭ
.d = ḍ
.D = Ḍ
.n = ṇ
.N = Ṇ
;s = ś
;S = Ś
.s = ṣ
.S = Ṣ