English to Hindi Typing Tool converts from English (Source Language) to Hindi Langunage, then it will pass to destination language like hi for Hindi, gu for gujarati, Type into the editor text will converted to your language. Not only one language Google api supports more than 100 languages. Just you have to change the destination language.

      function onLoad() {
        var options = {
          sourceLanguage: 'en',
          destinationLanguage: ['hi'],
          shortcutKey: 'ctrl+m',
          transliterationEnabled: true
        }

Complete Source code

<script type="text/javascript" src="http://www.google.com/jsapi"></script>
<script type="text/javascript">
/*
Convert from English (sourceLanguage) to your Langunage, Then Pass your destination language like hi for Hindi, gu for gujarati, kn for kannada  Type into the editor text will converted to your language
*/
// Load the Google Transliteration API
google.load("elements", "1", {
  packages: "transliteration"
});

function onLoad() {
  var options = {
	sourceLanguage: 'en',
	destinationLanguage: ['hi'],
	shortcutKey: 'ctrl+m',
	transliterationEnabled: true
  }

  // Create an instance on TransliterationControl with the required options.
  var control = new google.elements.transliteration.TransliterationControl(options);

  // Enable transliteration in the textfields with the given ids.
  var ids = ["language"];
  control.makeTransliteratable(ids);

  // Show the transliteration control which can be used to toggle between English and Hindi and also choose other destination language.
  control.showControl('translControl');
}
google.setOnLoadCallback(onLoad);
</script>
<form><textarea name="ta"  rows="6"  id="language" cols="6" style="width:600px;height:218px" ></textarea></form>

DOWNLOAD LINK

0.00Add to cart

🔥51 Views

Do you have anything to Ask?

This site uses Akismet to reduce spam. Learn how your comment data is processed.