Thanks guys,
Yes I cross posted because on second thought I wasn't sure if this is the right forum.
Re IE 7 and IE 8: We officially require IE 9+ for our website, but we know from stats that almost a quarter of our user base is still on IE 7 and 8.
FYI the problem also existed in compatibility mode on IE 9+ or in a .NET Web Browser control, embedded in another program, which defaults to IE 7.
To deal with the issue we now
- don't show the translate utility for IE 7 and 8, users have to upgrade to get the translate option.
- used <meta http-equiv="X-UA-Compatible" content="IE=edge" /> to force IE to use the latest document mode in compatibility view or a .NET Web Browser control.
The remaining issue is that the translation utility is still not working in an embedded Web Browser on a computer that has IE 10 or IE 11 installed (IE 9 seems to work). Yesterday, we got an invalid parameter error in another js file (which I managed to trap by wrapping the initialisation in a try/catch block as shown below), today it just seems to fail silently (maybe the error is trapped internally now?). This stabilises the situation, but we really would have liked to us the utility in the embedded browsers...
function googleTranslateElementInit() {
try {
new google.translate.TranslateElement({ pageLanguage: 'en', layout: google.translate.TranslateElement.InlineLayout.HORIZONTAL, gaTrack: true, gaId: 'UA-xxxxxxxx-x' }, 'google_translate_element');
}
catch(ex) {
//ignore
}
}
BTW: I got the error regardless whether I include the analytics parameters or not...
Thanks.