Jay4You

Jay Sasukiya is available to help you any time

Loading image in ajax — June 13, 2017
Pagination Using submit form[POST METHOD] — March 16, 2017
wordpress theme — December 24, 2016
AngularJS And Laravel — December 15, 2016
Translate Given Language — December 6, 2016

Translate Given Language

<!– Code provided by Google –>

function googleTranslateElementInit() {
new google.translate.TranslateElement({pageLanguage: ‘en’, layout: google.translate.TranslateElement.InlineLayout.SIMPLE, autoDisplay: false}, ‘google_translate_element’);
}

//translate.google.com/translate_a/element.js?cb=googleTranslateElementInit
<!– Flag click handler –>

jQuery(document).ready(function() {
var $frame = $(‘.goog-te-menu-frame:first’);
if (!$frame.size()) {
alert(“Error: Could not find Google translate frame.”);
return false;
}
var lang=’Gujarati’;
// $frame.contents().find(‘.goog-te-menu2-item span.text:contains(hi)’).get(0).click();
$frame.contents().find(‘.goog-te-menu2-item span.text:contains(‘+lang+’)’).get(0).click();

return false;
});