Here is an example :
JavaScript code :
<script type="text/javascript" src="http://www.google.com/jsapi"></script>
<script type="text/javascript">
google.load("elements", "1", { packages: "transliteration" });
</script>
<script>
function OnLoad() {
var currValue = document.getElementById("text1");
var options = {
sourceLanguage:
google.elements.transliteration.LanguageCode.ENGLISH,
destinationLanguage:
[google.elements.transliteration.LanguageCode.HINDI],
transliterationEnabled: true
};
var control = new
google.elements.transliteration.TransliterationControl(options);
control.makeTransliteratable(["text1"]);
}
google.setOnLoadCallback(OnLoad);
</script>
Html code :
<form name="trans">
<input type="text" id="text1" name="text1" />
</form>
Reference :
English to Hindi Translation | The ASP.NET Forums[
^]
Good luck.