- <Html>
- <head>
- <script src="https://www.google.com/jsapi" type="text/javascript"></script>
- <script type="text/javascript" language="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+m',
- transliterationEnabled: true
- };
- var control = new google.elements.transliteration.TransliterationControl(options);
- control.makeTransliteratable(['txt_Name']);
- //TEXT1 is the id of the control which you will use for the transliteration.
- }
- google.setOnLoadCallback(onLoad);
- </script>
- </Head>
- <form runar="server">
- <asp:TextBox Id="txt_name" runat="server"/>
- </form>
- </html>
We use the google input tool in our web application to type Hindi and english in textbox(for shifting the language press 'ctrl+m'