Transliteration in Emacs
This is a combination of company (completion framework UI) and quail (Unicode input method) in Emacs.
indian-dev-itrans-v5-hash defines a mapping between ASCII symbols (indian-itrans-v5-table) and target language Unicode symbols (indian-dev-base-table). It is defined as
(defvar indian-dev-itrans-v5-hash
(indian-make-hash indian-dev-base-table
indian-itrans-v5-table))
Quick Test
(setq company-i18n-input-hash indian-dev-itrans-v5-hash)
(setq company-backends '(company-i18n))
(company-i18n 'trans "aa") ;; Gives "आ"
Code: company-i18n
Config:
(add-to-list 'company-backends 'company-i18n)
;; Use appropriate hash for other languages. See files in emacs/lisp/language directory
(require 'ind-util)
;; Hindi
(setq company-i18n-input-hash indian-dev-itrans-v5-hash)
;; Tamil
(setq company-i18n-input-hash indian-tml-itrans-v5-hash)
;; Kannada
(setq company-i18n-input-hash indian-knd-itrans-v5-hash)
;; Bengali
(setq company-i18n-input-hash indian-bng-itrans-v5-hash)
;; Gujarati
(setq company-i18n-input-hash indian-gjr-itrans-v5-hash)
Comments
Post a Comment