How can I bind Google translate in Durundal Shell.js , shell.html?
html
<div id="google_translate_element"></div>
script
<script type="text/javascript" src="//translate.google.com/translate_a/element.js?cb=googleTranslateElementInit"></script>
function googleTranslateElementInit() {
new google.translate.TranslateElement({ pageLanguage: 'en', autoDisplay: false }, 'google_translate_element');
}
See Durandal's Composition functionality: http://durandaljs.com/documentation/Using-Composition/
Example:
Durandal doesn't render script tags within views. To render them, you should use knockout custom bindings:
Use it in your shell.html: