Google Translate Script
Posted: Fri Aug 10, 2012 9:20 am
I've inserted the script for Google Translate into my master page and am pretty pleased with the results - except that in addition to the Google dropdown box, after the first time a selection is made from the dropbox, I am also getting a Google Translate bar across the top of my pages.
I'm not much of a Javascript person - strictly copy and paste - so, I can't tell if I've got some code in there that I might be able to remove so that only the dropdown box displays, and not the Google bar.
This is the test site where I have published it:
http://www.knowlagent.com/documentation ... imeReview/
I've included the code from my Master Page, with the script inserted after the <body> tag.
I'd appreciate any suggestions on changes I can make to get rid of the tool bar.
Thanks,
Linda
<?xml version="1.0" encoding="utf-8"?>
<html xmlns:MadCap="http://www.madcapsoftware.com/Schemas/MadCap.xsd" MadCap:lastBlockDepth="3" MadCap:lastHeight="345" MadCap:lastWidth="1169" MadCap:conditions="KnowlagentConditionTagSet.NotForTranslations">
<head>
<meta http-equiv="X-UA-Compatible" content="IE=9; IE=8; IE=7; IE=EDGE">
</meta>
<script type="text/javascript">/*<![CDATA[*/ var _gaq = _gaq || [];
_gaq.push(['_setAccount', 'UA-28517412-1']);
_gaq.push(['_setDomainName', 'knowlagent.com']);
_gaq.push(['_trackPageview']);
(function() {
var ga = document.createElement('script'); ga.type = 'text/javascript'; ga.async = true;
ga.src = ('https:' == document.location.protocol ? 'https://ssl' : 'http://www') + '.google-analytics.com/ga.js';
var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(ga, s);
})();/*]]>*/</script>
</head>
<body>
<div id="google_translate_element" style="float: right;">
</div>
<script type="text/javascript">
function googleTranslateElementInit() {
new google.translate.TranslateElement({pageLanguage: 'en', layout: google.translate.TranslateElement.InlineLayout.SIMPLE, gaTrack: true, gaId: 'UA-28517412-1'}, 'google_translate_element');
}
</script>
<script type="text/javascript" src="http://translate.google.com/translate_a ... lementInit">
</script>
<p> </p>
<p style="text-align: right;">
<script src="../feedback_script.js">
</script>
</p>
<MadCap:breadcrumbsProxy />
<MadCap:bodyProxy />
<MadCap:miniTocProxy />
<MadCap:topicToolbarProxy class="" style="mc-topic-toolbar-items: ;" />
<hr class="hr_wide" />
<blockquote>
<h2 class="TopicHeading"><span style="font-weight: normal;">We value your feedback. Please send your comments or requests to the WebHelp Development Team.</span> <![CDATA[ ]]></h2>
<p>
<script src="../feedback_script.js">
</script>
</p>
</blockquote>
<hr class="hr_wide" />
</body>
</html>
I'm not much of a Javascript person - strictly copy and paste - so, I can't tell if I've got some code in there that I might be able to remove so that only the dropdown box displays, and not the Google bar.
This is the test site where I have published it:
http://www.knowlagent.com/documentation ... imeReview/
I've included the code from my Master Page, with the script inserted after the <body> tag.
I'd appreciate any suggestions on changes I can make to get rid of the tool bar.
Thanks,
Linda
<?xml version="1.0" encoding="utf-8"?>
<html xmlns:MadCap="http://www.madcapsoftware.com/Schemas/MadCap.xsd" MadCap:lastBlockDepth="3" MadCap:lastHeight="345" MadCap:lastWidth="1169" MadCap:conditions="KnowlagentConditionTagSet.NotForTranslations">
<head>
<meta http-equiv="X-UA-Compatible" content="IE=9; IE=8; IE=7; IE=EDGE">
</meta>
<script type="text/javascript">/*<![CDATA[*/ var _gaq = _gaq || [];
_gaq.push(['_setAccount', 'UA-28517412-1']);
_gaq.push(['_setDomainName', 'knowlagent.com']);
_gaq.push(['_trackPageview']);
(function() {
var ga = document.createElement('script'); ga.type = 'text/javascript'; ga.async = true;
ga.src = ('https:' == document.location.protocol ? 'https://ssl' : 'http://www') + '.google-analytics.com/ga.js';
var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(ga, s);
})();/*]]>*/</script>
</head>
<body>
<div id="google_translate_element" style="float: right;">
</div>
<script type="text/javascript">
function googleTranslateElementInit() {
new google.translate.TranslateElement({pageLanguage: 'en', layout: google.translate.TranslateElement.InlineLayout.SIMPLE, gaTrack: true, gaId: 'UA-28517412-1'}, 'google_translate_element');
}
</script>
<script type="text/javascript" src="http://translate.google.com/translate_a ... lementInit">
</script>
<p> </p>
<p style="text-align: right;">
<script src="../feedback_script.js">
</script>
</p>
<MadCap:breadcrumbsProxy />
<MadCap:bodyProxy />
<MadCap:miniTocProxy />
<MadCap:topicToolbarProxy class="" style="mc-topic-toolbar-items: ;" />
<hr class="hr_wide" />
<blockquote>
<h2 class="TopicHeading"><span style="font-weight: normal;">We value your feedback. Please send your comments or requests to the WebHelp Development Team.</span> <![CDATA[ ]]></h2>
<p>
<script src="../feedback_script.js">
</script>
</p>
</blockquote>
<hr class="hr_wide" />
</body>
</html>