ta-transliteration.js 2.88 KB
Newer Older
priyank's avatar
priyank committed
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120
( function ( $ ) {
	'use strict';

	var taTransliteration = {
		id: 'ta-transliteration',
		name: 'எழுத்துப்பெயர்ப்பு',
		description: 'Tamil Transliteration based input method',
		date: '2012-10-03',
		URL: 'http://github.com/wikimedia/jquery.ime',
		author: 'Junaid P V',
		license: 'GPLv3',
		version: '1.0',
		contextLength: 1,
		maxKeyLength: 4,
		patterns: [
			[ 'ச்h', 'h', 'ச்ஹ்' ],
			[ 'ழ்h', 'h', 'ழ்ஹ்' ],

			// '(ஸ்ரிi|ஸ்ர்I)',
			[ 'ஸ்ர்i', 'ஸ்ரீ' ],

			[ 'க்(ச்|ஸ்)h', 'க்\u200Cஷ்' ], // with ZWNJ
			[ 'க்(ச்|ஸ்)H', 'க்ஷ்' ],

			[ '([க-ஹ])்a', '$1' ],
			[ '([க-ஹ])(்A|a)', '$1ா' ],
			[ '([க-ஹ])்i', '$1ி' ],
			[ '([க-ஹ])(்I|ிi)', '$1ீ' ],
			[ '([க-ஹ])்u', '$1ு' ],
			[ '([க-ஹ])(்U|ுu)', '$1ூ' ],
			[ '([க-ஹ])்e', '$1ெ' ],
			[ '([க-ஹ])(்E|ெe)', '$1ே' ],
			[ '([க-ஹ])i', '$1ை' ],
			[ '([க-ஹ])்o', '$1ொ' ],
			[ '([க-ஹ])(்O|ொo)', '$1ோ' ],
			[ '([க-ஹ])u', '$1ௌ' ],

			[ '([அ-ஹ][ெ-்]?)n', '$1ன்' ],

			[ 'அa', '' ],
			[ 'இi', '' ],
			[ 'உu', '' ],
			[ 'எe', '' ],
			[ 'அi', '' ],
			[ 'ஒo', '' ],
			[ 'அu', '' ],

			[ '(ந்|ன்)g', 'ங்' ],
			[ '(ந்|ன்)j', 'ஞ்' ],
			[ 'ச்h', 'ஷ்' ],
			[ 'ழ்h', 'ழ்' ],
			[ 'ட்h', 'த்' ],
			[ 'ஸ்h', 'ஷ்' ],

			[ 'a', '' ],
			[ 'b', 'ப்' ],
			[ 'c', 'ச்' ],
			[ 'd', 'ட்' ],
			[ 'e', '' ],
			[ 'f', 'ஃப்' ],
			[ 'g', 'க்' ],
			[ 'h', 'ஹ்' ],
			[ 'i', '' ],
			[ 'j', 'ஜ்' ],
			[ 'k', 'க்' ],
			[ 'l', 'ல்' ],
			[ 'm', 'ம்' ],
			[ 'n', 'ன்' ],
			[ 'o', '' ],
			[ 'p', 'ப்' ],
			[ 'q', '' ],
			[ 'r', 'ர்' ],
			[ 's', 'ச்' ],
			[ 't', 'ட்' ],
			[ 'u', '' ],
			[ 'v', 'வ்' ],
			[ 'w', 'ந்' ],
			[ 'y', 'ய்' ],
			[ 'z', 'ழ்' ],
			[ 'A', '' ],
			[ 'B', 'ப்' ],
			[ 'C', 'க்க்' ],
			[ 'E', '' ],
			[ 'F', 'ஃப்' ],
			[ 'G', 'க்' ],
			[ 'H', '' ],
			[ 'I', '' ],
			[ 'J', 'ஜ்ஜ்' ],
			[ 'K', 'க்' ],
			[ 'L', 'ள்' ],
			[ 'M', 'ம்ம்' ],
			[ 'N', 'ண்' ],
			[ 'O', '' ],
			[ 'P', 'ப்ப்' ],
			[ 'Q', '' ],
			[ 'R', 'ற்' ],
			[ 'S', 'ஸ்' ],
			[ 'T', 'ட்' ],
			[ 'U', '' ],
			[ '(V|W)', 'வ்வ்' ],
			[ 'Y', 'ய்ய்' ],
			[ 'Z', 'ஶ்' ],

			[ '\\\\0', '\u0be6' ],
			[ '\\\\1', '' ],
			[ '\\\\2', '' ],
			[ '\\\\3', '' ],
			[ '\\\\4', '' ],
			[ '\\\\5', '' ],
			[ '\\\\6', '' ],
			[ '\\\\7', '' ],
			[ '\\\\8', '' ],
			[ '\\\\9', '' ],
			[ '10\\\\', '\u0BF0' ],
			[ '100\\\\', '\u0BF1' ],
			[ '1000\\\\', '\u0BF2' ] ]
	};

	$.ime.register( taTransliteration );
}( jQuery ) );