Articles → JavaScript → Convert English text to Hindi using Google API

Convert English text to Hindi using Google API






Steps






<script type="text/javascript" src="https://www.google.com/jsapi"></script>




<b>English to Hindi</b> : <textarea id="transliterateTxtBox"></textarea>




<script type="text/javascript">
         google.load("elements", "1", {
    packages: "transliteration"
  });

function onLoad() {
  var options = {
    sourceLanguage: google.elements.transliteration.LanguageCode.ENGLISH,
    destinationLanguage: [google.elements.transliteration.LanguageCode.HINDI],
    shortcutKey: 'ctrl+g',
    transliterationEnabled: true
  };

  var control =
    new google.elements.transliteration.TransliterationControl(options);
  control.makeTransliteratable(['transliterateTxtBox']);
}
google.setOnLoadCallback(onLoad);
</script>





Click to Enlarge


Posted By  -  Karan Gupta
 
Posted On  -  Monday, May 11, 2015

Query/Feedback


Your Email Id  
 
Subject 
 
Query/FeedbackCharacters remaining 250