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)

Infopro 01-28-2011 10:00 PM

Forum Translator by Google
 
1 Attachment(s)
I'm not sure if anyone else has posted this, if so I apologize. I did find some other earlier versions of mods to use Google Translate, but could not find one similar and as simple to use as this.

In the footer template, find the first instance of:

Code:

</form>
Just below it add this:

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 -->

Remove the 2 lines in red if you don't use Google Analytics. If you do, edit the number to your own.

It's so simple I think this would work on any version of vB. :)

COL NIL SATIS 01-29-2011 02:44 PM

Any screenshot's mate?

Infopro 01-29-2011 03:27 PM

Live example, check footer: http://forums.cpanel.net/

Hippy 01-29-2011 04:31 PM

installed
Nominated
rated..

very nice mod

RK KINGKONG 01-29-2011 04:49 PM

thanks HIPPY for directing me here , lol . to think i was just looking for something like this the other day on a site you have to pay for it. this is an amazing add on . GREAT JOB voted/installed/nominated.. remind me to get you a call girl.

COL NIL SATIS 01-29-2011 05:46 PM

Quote:

Originally Posted by Infopro (Post 2156098)
Live example, check footer: http://forums.cpanel.net/

Cheers :up:

BadgerDog 01-29-2011 06:12 PM

Installed for testing with thanks ... :)

Amazingly simple and effective ... :up:

Regards,
Doug

COL NIL SATIS 01-29-2011 06:14 PM

Does this add any strain to the server load??

Infopro 01-29-2011 06:54 PM

The only thing it might do is slow page load on a slow computer while the tool code is loaded from the google server, not yours.

Make your own depending on your needs. :)
http://translate.google.com/translate_tools

zelnik 01-29-2011 09:36 PM

brilliant thanks!


All times are GMT. The time now is 03:35 PM.

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.01104 seconds
  • Memory Usage 1,729KB
  • 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
  • (2)bbcode_code_printable
  • (1)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (2)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