Skip to content

About

LankaScript - A trilingual word processor with Google-style phonetic transliteration. Switch languages from the top bar and type in English letters.

Topics

Resources

Code of conduct

Contributing

Security policy

Stars

1 star

Watchers

0 watching

Forks

Latest commit

 

History

1 Commit

Folders and files

Repository files navigation

LankaScript Editor

A trilingual word processor — English · සිංහල · தமிழ் — with Google-style phonetic transliteration, a full formatting toolbar, multi-document storage, and full offline support. It installs as a desktop/mobile app (PWA) and runs entirely on your machine. No account, no server, no internet required after the first load.


Run it locally

You need Python 3 (already on macOS/Linux; on Windows install from python.org or the Microsoft Store). Then:

macOS / Linux

./start.sh

Windows Double-click start.bat (or run python serve.py in this folder).

Any platform (manual)

python3 serve.py        # or:  python -m http.server 8000

This opens http://localhost:8000/index.html. A local server is used (rather than opening the file directly) because the offline cache and "Install" feature require http://localhost, which browsers treat as a secure origin.

Opening index.html directly with file:// also works for normal editing, but the service worker (offline install) will stay disabled in that mode.

Install as an app

Once it's open at http://localhost:8000:

  • Chrome / Edge: click the ⬇ Install app button in the top bar, or the install icon in the address bar.
  • Safari (macOS): File → Add to Dock. iOS: Share → Add to Home Screen.

After installing, it launches in its own window and works offline.


Typing in Sinhala / Tamil

  1. Pick සිං (Sinhala) or த (Tamil) in the top bar (or press Ctrl+2 / Ctrl+3).
  2. Type in English letters. A suggestion list appears as you type.
  3. Press Space, Tab, or Enter to accept the top suggestion, use ↑/↓ then Enter to pick another, Alt+1…6 to jump to one, or click it.
  4. You can mix English, Sinhala, and Tamil in the same document.

Sinhala scheme (quick reference)

  • Vowels — double for long: a→අ aa→ආ i→ඉ ii→ඊ u→උ uu→ඌ e→එ ee→ඒ o→ඔ oo→ඕ
  • Consonant series: t→ට th→ත d→ඩ dh→ද T→ඨ D→ඪ N→ණ L→ළ sh→ශ Sh→ෂ
  • Conjuncts form automatically: kra→ක්‍ර kya→ක්‍ය ksha→ක්‍ෂ; nk/ng → ං (anusvara)
  • ~260 common words are built in (e.g. ayubowan→ආයුබෝවන්, srilanka→ශ්‍රී ලංකා).
  • When t/d is ambiguous, the 2nd dropdown item is the dental/retroflex alternative.

Features

Formatting (bold/italic/underline/strike/super/sub), headings, alignment, lists & indent, text/highlight colour, font family & size, tables, links, images, horizontal rules, undo/redo, clear formatting. Multi-document storage with auto-save every 3 s, templates, light/dark theme, live word/character/reading-time stats, and export to clipboard / .txt / .html / print.

What's in this folder

index.html              app shell
app.js                  engine + dictionaries + editor logic
styles.css              compiled Tailwind (offline)
fonts.css + fonts/      bundled Noto Sans Sinhala & Tamil (offline)
manifest.webmanifest    PWA metadata
sw.js                   service worker (offline cache)
icons/                  app icons
serve.py start.sh start.bat   local launchers

A note on accuracy

Transliteration combines a rule engine (vowel signs, conjuncts, anusvara, retroflex/dental handling) with a built-in dictionary and a candidate dropdown. This is highly accurate for everyday words. Google Input Tools additionally uses a large statistical model trained on huge text corpora; to push accuracy even further you can keep adding entries to DICT_SI / DICT_TA in app.js.

About

LankaScript - A trilingual word processor with Google-style phonetic transliteration. Switch languages from the top bar and type in English letters.

Topics

Resources

Code of conduct

Contributing

Security policy

Stars

1 star

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages