vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vBulletin 4.x Template Modifications (https://vborg.vbsupport.ru/forumdisplay.php?f=246)
-   -   End-User Options - Forum Translator by Google (https://vborg.vbsupport.ru/showthread.php?t=258009)

BadgerDog 02-22-2011 07:14 PM

Quote:

Originally Posted by scottct1 (Post 2165421)
I have had to uninstall it from mine because of this issue.

I hope they can fix it as its a great mod, but I was getting to many complaints from people.

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

guru1221 03-06-2011 01:55 AM

thanks installed

karlm 03-09-2011 02:10 PM

Quote:

Originally Posted by BadgerDog (Post 2165550)
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...

seconded.

gr8 idea btw dev.

LeventX 03-10-2011 11:35 AM

Thank you..Installed..

SkyStryder 03-11-2011 06:33 PM

Awesome. I have installed it. Some people have mentioned that it is
slowing down the page load. I believe that will only happen if you
are using the Google Analytics lines. Unfortunately, Google Analytics
does add a delay when the page is loaded. They usually specify to
put it in the header but I put it in the footer to reduce "apparent" load time.
It does mean that if the user aborts before the page is fully loaded, it
won't be counted.

Thank you!
Rick

COL NIL SATIS 03-17-2011 09:24 PM

Installed!!!!!!! great work man

Marv 03-18-2011 04:35 AM

Quote:

Originally Posted by karlm (Post 2171409)
seconded.

gr8 idea btw dev.

Quote:

Originally Posted by BadgerDog (Post 2165550)
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 (Post 2159748)
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 (Post 2159752)
That's what I was trying to say, albeit badly, in my post above, repeated here:

Quote:

Originally Posted by BadgerDog (Post 2159950)
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 ?

Juggernaut 03-18-2011 05:32 AM

The if condition should be doable. I wonder if someone will come up with the code here, will keep an eye out, as I haven't tried anything myself. :)

Infopro 03-21-2011 12:56 PM

I'm not aware of a language conditional. If you have a link to one we could surely use it.

There are usergroup conditionals of course, and an option to use one was posted earlier in this thread.

MAdotcom 03-22-2011 05:11 PM

Very cool thanks!!!


All times are GMT. The time now is 08:16 AM.

Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2025, vBulletin Solutions Inc.

X vBulletin 3.8.12 by vBS Debug Information
  • Page Generation 0.02616 seconds
  • Memory Usage 1,745KB
  • Queries Executed 10 (?)
More Information
Template Usage:
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (1)bbcode_code_printable
  • (7)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (4)pagenav_pagelink
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (10)printthreadbit
  • (1)spacer_close
  • (1)spacer_open 

Phrase Groups Available:
  • global
  • postbit
  • showthread
Included Files:
  • ./printthread.php
  • ./global.php
  • ./includes/init.php
  • ./includes/class_core.php
  • ./includes/config.php
  • ./includes/functions.php
  • ./includes/class_hook.php
  • ./includes/modsystem_functions.php
  • ./includes/class_bbcode_alt.php
  • ./includes/class_bbcode.php
  • ./includes/functions_bigthree.php 

Hooks Called:
  • init_startup
  • init_startup_session_setup_start
  • init_startup_session_setup_complete
  • cache_permissions
  • fetch_threadinfo_query
  • fetch_threadinfo
  • fetch_foruminfo
  • style_fetch
  • cache_templates
  • global_start
  • parse_templates
  • global_setup_complete
  • printthread_start
  • pagenav_page
  • pagenav_complete
  • bbcode_fetch_tags
  • bbcode_create
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • printthread_post
  • printthread_complete