Technopedia Center
PMB University Brochure
Faculty of Engineering and Computer Science
S1 Informatics S1 Information Systems S1 Information Technology S1 Computer Engineering S1 Electrical Engineering S1 Civil Engineering

faculty of Economics and Business
S1 Management S1 Accountancy

Faculty of Letters and Educational Sciences
S1 English literature S1 English language education S1 Mathematics education S1 Sports Education
teknopedia

teknopedia

teknopedia

teknopedia

teknopedia

teknopedia
teknopedia
teknopedia
teknopedia
teknopedia
teknopedia
  • Registerasi
  • Brosur UTI
  • Kip Scholarship Information
  • Performance
  1. Wiktionary
  2. Module:sa-Knda-translit
Module:sa-Knda-translit
From Wiktionary, the free dictionary

The following documentation is located at Module:sa-Knda-translit/documentation. [edit] Categories were auto-generated by Module:module categorization. [edit]
Useful links: subpage list • links • transclusions • testcases • sandbox

This module will transliterate Sanskrit language text per WT:SA TR. The module should preferably not be called directly from templates or other modules. To use it from a template, use {{xlit}}. Within a module, use Module:languages#Language:transliterate.

For testcases, see Module:sa-Knda-translit/testcases.

Functions

tr(text, lang, sc)
Transliterates a given piece of text written in the script specified by the code sc, and language specified by the code lang.
When the transliteration fails, returns nil.
local export = {}

local consonants = {
	['ಕ']='k', ['ಖ']='kh', ['ಗ']='g', ['ಘ']='gh', ['ಙ']='ṅ',
	['ಚ']='c', ['ಛ']='ch', ['ಜ']='j', ['ಝ']='jh', ['ಞ']='ñ', 
	['ಟ']='ṭ', ['ಠ']='ṭh', ['ಡ']='ḍ', ['ಢ']='ḍh', ['ಣ']='ṇ', 
	['ತ']='t', ['ಥ']='th', ['ದ']='d', ['ಧ']='dh', ['ನ']='n', 
	['ಪ']='p', ['ಫ']='ph', ['ಬ']='b', ['ಭ']='bh', ['ಮ']='m',
	['ಯ']='y', ['ರ']='r', ['ಲ']='l', ['ವ']='v', ['ಳ']='ḷ',
	['ಶ']='ś', ['ಷ']='ṣ', ['ಸ']='s', ['ಹ']='h',
}

local diacritics = {
	['ಾ']='ā', ['ಿ']='i', ['ೀ']='ī', ['ು']='u', ['ೂ']='ū', ['ೃ']='ṛ', ['ೄ']='ṝ', 
	['ೢ']='ḷ', ['ೣ']='ḹ', ['ೇ']='e', ['ೈ']='ai', ['ೋ']='o', ['ೌ']='au',  ['್']='',
}

local tt = {
	-- vowels
	['ಅ']='a', ['ಆ']='ā', ['ಇ']='i', ['ಈ']='ī', ['ಉ']='u', ['ಊ']='ū', ['ಋ']='ṛ', ['ೠ']='ṝ',
	['ಌ']='ḷ', ['ೡ']='ḹ', ['ಏ']='e', ['ಐ']='ai', ['ಓ']='o', ['ಔ']='au', 
	-- chandrabindu    
	['ಁ']='m̐', --until a better method is found
	-- anusvara    
	['ಂ']='ṃ', --until a better method is found
	-- visarga    
	['ಃ']='ḥ',
	-- avagraha
	['ಽ']='’',
	--numerals
	['೦']='0', ['೧']='1', ['೨']='2', ['೩']='3', ['೪']='4', ['೫']='5', ['೬']='6', ['೭']='7', ['೮']='8', ['೯']='9',
	--punctuation        
    ['॥']='.', --double danda
	['।']='.', --danda
    --Vedic extensions
    ['ೱ']='x', ['ೲ']='f',
    --Om
    ['ಓಂ']='oṃ',
    --reconstructed
    ['*'] = '',
}

function export.tr(text, lang, sc)
	text = mw.ustring.gsub(
		text,
		'([ಕಖಗಘಙಚಛಜಝಞಟಠಡಢಣತಥದಧನಪಫಬಭಮಯರಲವಳಶಷಸಹ])'..
		'([ಾಿೀುೂೃೄೢೣೇೈೋೌ್]?)',
		function(c, d)
			if d == "" then        
				return consonants[c] .. 'a'
			else
				return consonants[c] .. diacritics[d]
			end
		end)

	text = mw.ustring.gsub(text, '.', tt)
	
	return text
end
 
return export
Retrieved from "https://en.wiktionary.org/w/index.php?title=Module:sa-Knda-translit&oldid=62931743"
Categories:
  • Transliteration modules used by 1 language
  • Kannada script
  • Sanskrit modules
  • Transliteration modules
  • Transliteration modules by script
  • Kannada script modules

  • indonesia
  • Polski
  • العربية
  • Deutsch
  • English
  • Español
  • Français
  • Italiano
  • مصرى
  • Nederlands
  • 日本語
  • Português
  • Sinugboanong Binisaya
  • Svenska
  • Українська
  • Tiếng Việt
  • Winaray
  • 中文
  • Русский
Sunting pranala
Pusat Layanan

UNIVERSITAS TEKNOKRAT INDONESIA | ASEAN's Best Private University
Jl. ZA. Pagar Alam No.9 -11, Labuhan Ratu, Kec. Kedaton, Kota Bandar Lampung, Lampung 35132
Phone: (0721) 702022
Email: pmb@teknokrat.ac.id