/* Use like $(elem).GTransliterate(lang); where lang = a language code like "hi", "ka", etc. Make sure to include at top of page Also, you must include this at the top of your page: */ google.load("elements", "1", { packages: 'transliteration' }); jQuery.fn.GTransliterate = function(lang) { var options = { sourceLanguage: 'en', destinationLanguage: [lang], transliterationEnabled: true } var thisId = this.attr('id'); var GControl = new google.elements.transliteration.TransliterationControl(options); GControl.makeTransliteratable([thisId]); return this; }