1

How to use google transliteration for dynamic text fields?

<script type="text/javascript" src="http://www.google.com/jsapi"></script>
<script type="text/javascript">
// Load the Google Transliteration API
google.load("elements", "1", { packages: "transliteration" });

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

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

// Enable transliteration in the textfields with the given ids.
var ids = ['temrorary_address','permanant_address','bankbranch','member_name','father_husband','workingoffice_address','name1' ];
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>  
1
  • Please Don't Start Every Single Word With An Uppercase Letter Commented Jun 15, 2017 at 12:28

0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.