
03-18-2011, 04:35 AM
|
|
|
Join Date: Jun 2002
Location: Germany
Posts: 372
Благодарил(а): 0 раз(а)
Поблагодарили:
0 раз(а) в 0 сообщениях
|
|
Quote:
Originally Posted by karlm
seconded.
gr8 idea btw dev.
|
Quote:
Originally Posted by BadgerDog
If we could get an "if then ..." statement to check for the standard language, then the mod wouldn't execute and hence the Google load delay wouldn't happen, except in the case where the user was connecting with a language other than the site default. If the latter, then I don't think he's going to mind the delay if he's able to use the mod to get the site displayed in his own native language.
Regards,
Doug
|
Quote:
Originally Posted by Crogge
I really like this modification, though I noticed a increased loading time because it is connecting to the Google servers each time. Is there a possibility to use this modification and let it access the Google servers only when you actually need it?
|
Quote:
Originally Posted by BadgerDog
That's what I was trying to say, albeit badly, in my post above, repeated here:
|
Quote:
Originally Posted by BadgerDog
Yup ... +1 ...
Anyway, on the other matter, what I'm trying to say ... is it possible to make the execution of this mode conditional?
In other words, wrap the mod in IF THEN code?
ie: If the language is NOT English, then execute this code
Code:
<!-- Translate vBulletin -->
<div id="google_translate_element" class="footer_select"></div><script type="text/javascript">
function googleTranslateElementInit() {
new google.translate.TranslateElement({
pageLanguage: 'en',
multilanguagePage: true,
gaTrack: true,
gaId: 'UA-12345-12',
layout: google.translate.TranslateElement.InlineLayout.SIMPLE
}, 'google_translate_element');
}
</script><script type="text/javascript" src="//translate.google.com/translate_a/element.js?cb=googleTranslateElementInit"></script>
<!-- /Translate vBulletin -->
ELSE do not execute the mod....
Is that any clearer and is it possible to create such a conditional?
Thanks for any help ...
Regards,
Doug
|
+1. Anyone ?
|