dimanche 28 décembre 2014

Google Translator causes navigation links to fail


We have added the google translator to our sharepoint site. But it is causing our navigation to fail. After the conversion the translator is adding two html tags to each of the elements.


Before Translation:



<span class="menu-item-text">Who We Are</span>


After Translation:


<span class="menu-item-text"><font><font class="">हम कौन हैं</font></font></span>


Code in the master page for google Translation:



<script type="text/javascript">//<![CDATA[
function googleTranslateElementInit() {
new google.translate.TranslateElement({ pageLanguage: 'en', layout: google.translate.TranslateElement.InlineLayout.SIMPLE }, 'google_translate_element');}
//]]>
</script>
<script type="text/javascript" src="//translate.google.com/translate_a/element.js?cb=googleTranslateElementInit">//<![CDATA[ //]]>
</script>


I have manually removed those tags and that made the navigation to work again. Do you have any workaround for this? is it possible to remove those tags after the translation happens through javascript?


Thanks in Advance.





Aucun commentaire:

Enregistrer un commentaire