Original translation code was developed by Language Technology Research Laboratory - University of Colombo School of Computing. (2011)
Source: https://ucsc.cmb.ac.lk//ltrl/services/feconverter/
Repository: https://www.npmjs.com/package/sinhala-unicode-coverter
Using npm:
npm i --save sinhala-unicode-coverter
Using yarn:
yarn add sinhala-unicode-coverter
There are 12 methods exported from the package. Each of them takes an string as a input and returns the converted string.
Method | Description |
---|---|
dlManelToUnicode |
DL-Manel to Unicode |
baminiToUnicode |
Bamini to Unicode |
kaputaToUnicode |
Kaputa to Unicode |
fmAbayaToUnicode |
FM-Abaya to Unicode |
amaleeToUnicode |
Amalee to Unicode |
thibusToUnicode |
Thibus to Unicode |
Method | Description |
---|---|
unicodeToDlManel |
Unicode to DL-Manel |
unicodeToBamini |
Unicode to Bamini |
unicodeToKaputa |
Unicode to Kaputa |
Unfortunately we don't have unicode to legacy functionality for FM-Abaya, Amalee, Thibus.
Method | Description |
---|---|
singlishToUnicode |
Singlish (Sinhala) to Unicode |
singlishPhoneticToUnicode |
Singlish Phonetic (Sinhala) to Unicode |
Method | Description |
---|---|
tanglishToUnicode |
Tanglish (Tamil) to Unicode |
// Legacy to unicode
import { dlManelToUnicode, singlishToUnicode, unicodeToDlManel } from "sinhala-unicode-coverter"
const a = dlManelToUnicode("Y%S ,xld")
console.log(a) // ශ්රී ලංකා
// Unicode to DL-Manel
const b = unicodeToDlManel("ශ්රී ලංකා")
console.log(b) // Y%S ,xld
// Singlish to Unicode
const c = singlishToUnicode("shrii la\\nkaa")
console.log(c) // ශ්රී ලංකා