Skip to content

Instantly share code, notes, and snippets.

@eboominathan
Created September 18, 2017 05:56
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save eboominathan/1c84c7925663fc39d0e59cf616483e6e to your computer and use it in GitHub Desktop.
Save eboominathan/1c84c7925663fc39d0e59cf616483e6e to your computer and use it in GitHub Desktop.
Tamil Typewriting using Google
<!DOCTYPE html>
<html>
<head>
<title>Tamil Font </title>
</head>
<body>
<input type="text" name="" id="tamil">
<script type="text/javascript" src="https://www.google.com/jsapi"></script>
<script type="text/javascript">
// Load the Google Transliterate API
google.load("elements", "1", {
packages: "transliteration"
});
function onLoad() {
var options = {
sourceLanguage:
google.elements.transliteration.LanguageCode.ENGLISH,
destinationLanguage:
[google.elements.transliteration.LanguageCode.TAMIL],
shortcutKey: 'ctrl+g',
transliterationEnabled: true
};
// Create an instance on TransliterationControl with the required
// options.
var control =
new google.elements.transliteration.TransliterationControl(options);
// Enable transliteration in the textbox with id
// 'transliterateTextarea'.
control.makeTransliteratable(['tamil']);
}
google.setOnLoadCallback(onLoad);
</script>
</body>
</html>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment