Go Back   vb.org Archive > vBulletin Modifications > vBulletin 4.x Modifications > vBulletin 4.x Add-ons
FAQ Community Calendar Today's Posts Search

Reply
 
Thread Tools
Google's website translator Details »»
Google's website translator
Version: 1.00, by linuxututs linuxututs is offline
Developer Last Online: Jan 2012 Show Printable Version Email this Page

Category: Integration with vBulletin - Version: 4.0.0 Rating:
Released: 01-01-2010 Last Update: Never Installs: 18
Template Edits
 
No support by the author.

Google's website translator

Translate your website with Google: Expand your audience globally

Live Demo: LinuxTuts

This is straight from google and is nothing compared to "NLP-er's" translator Mod for 3.8x version of vBulletin.

But if you're like me and had That translator Mod installed and have people from different parts of the world already visiting your website, you have to do something while That Mod is getting upgraded.

Here's How...

1) Copy/paste this code into the bottom of your "header" template.

PHP Code:
<div align="right">
<
div id="google_translate_element"></div><script>
function 
googleTranslateElementInit() {
  new 
google.translate.TranslateElement({
    
pageLanguage'en'
  
}, 'google_translate_element');
}
</
script><script src="http://translate.google.com/translate_a/element.js?cb=googleTranslateElementInit"></script>
</
div
2) Here's the official API code from google to put into your "headinclude" template.
Quote:
Including the Transliteration API on Your Page

AJAX Transliteration API is packaged under the "elements" module. To include the Google Transliteration API in your page, first you need the Google AJAX APIs script tag:

<script type="text/javascript" src="http://www.google.com/jsapi"></script>

This script tag will load the google.load function, which lets you load the individual Google APIs. For loading Google Transliteration API, calls to google.load look like this:

<script type="text/javascript">
google.load("elements", "1", {
packages: "transliteration"
});
</script>
That's a quote from google.

Here's the code again for you to copy/paste into your "headinclude" template.

PHP Code:
<script type="text/javascript" src="http://www.google.com/jsapi"></script>
<
script type="text/javascript">
  
google.load("elements""1", {
      
packages"transliteration"
  
});
</
script
Mine worked without the API, but I figure this makes it load faster and work better.
I'm no programmer/coder, but I get by with my own few little hacks and just thought some of you might like this as well until something better comes along.

Official Google resources are Here.
Code:
http://translate.google.com/translate_tools?hl=en&layout=1&eotf=1
and
Code:
http://code.google.com/apis/ajaxlanguage/documentation/#TransliterationApiLoading

Supporters / CoAuthors

    Show Your Support

    • This modification may not be copied, reproduced or published elsewhere without author's permission.
    Благодарность от:
    andro140

    Comments
      #12  
    Old 01-22-2010, 02:25 PM
    twizzler twizzler is offline
     
    Join Date: Oct 2008
    Posts: 19
    Благодарил(а): 0 раз(а)
    Поблагодарили: 0 раз(а) в 0 сообщениях
    Default

    Seems to be good one, but I will wait a bit
    Reply With Quote
      #13  
    Old 01-28-2010, 06:49 PM
    jnrdavo jnrdavo is offline
     
    Join Date: Aug 2007
    Posts: 122
    Благодарил(а): 0 раз(а)
    Поблагодарили: 0 раз(а) в 0 сообщениях
    Default

    anybody know a way to get it to be inline with the main logo of the forum?

    Mines sitting just below (and to the right), taking up unwanted space... I would really like it to be under the Welcome message if possible...

    Happy to post up a link to the site if required.
    Reply With Quote
      #14  
    Old 02-11-2010, 07:17 PM
    linuxututs linuxututs is offline
     
    Join Date: Oct 2009
    Posts: 160
    Благодарил(а): 0 раз(а)
    Поблагодарили: 0 раз(а) в 0 сообщениях
    Default

    Ok, I can get above the logo by finding...

    Code:
    {vb:raw ad_location.ad_header_logo}
    and place this code "below" it...

    PHP Code:
    <div align="justify"><div id="google_translate_element"></div><script>
    function 
    googleTranslateElementInit() {
      new 
    google.translate.TranslateElement({
        
    pageLanguage'en'
      
    }, 'google_translate_element');
    }
    </
    script><script src="http://translate.google.com/translate_a/element.js?cb=googleTranslateElementInit"></script></div
    I'm fixing to figure out how to get it below the navbar and to the right...
    Attached Images
    File Type: jpg screenshot_023.jpg (37.5 KB, 0 views)
    Reply With Quote
      #15  
    Old 02-11-2010, 09:06 PM
    linuxututs linuxututs is offline
     
    Join Date: Oct 2009
    Posts: 160
    Благодарил(а): 0 раз(а)
    Поблагодарили: 0 раз(а) в 0 сообщениях
    Default

    If navigate to "Navigation / Breadcrumb Templates "
    Then to "navbar"

    And place this code at the end of the file you can get it to line up at the right below your navbar as well.

    PHP Code:
    <div align="right"><div id="google_translate_element"></div><script>
    function 
    googleTranslateElementInit() {
      new 
    google.translate.TranslateElement({
        
    pageLanguage'en'
      
    }, 'google_translate_element');
    }
    </
    script><script src="http://translate.google.com/translate_a/element.js?cb=googleTranslateElementInit"></script></div
    Think I will be leaving it there Myself.

    Its fast to.
    Attached Images
    File Type: jpg screenshot_024.jpg (116.6 KB, 0 views)
    Reply With Quote
      #16  
    Old 03-13-2010, 07:47 PM
    jnrdavo jnrdavo is offline
     
    Join Date: Aug 2007
    Posts: 122
    Благодарил(а): 0 раз(а)
    Поблагодарили: 0 раз(а) в 0 сообщениях
    Default

    great hack, but how can I get it to sit up here...

    First pic is existing location


    Second pic is where I want it to be...


    Any help appreciated...
    Reply With Quote
      #17  
    Old 06-21-2010, 04:54 PM
    DieselMinded's Avatar
    DieselMinded DieselMinded is offline
     
    Join Date: Mar 2007
    Posts: 1,655
    Благодарил(а): 0 раз(а)
    Поблагодарили: 0 раз(а) в 0 сообщениях
    Default

    thanks worked great
    Reply With Quote
      #18  
    Old 07-03-2010, 04:13 PM
    speakeasy media speakeasy media is offline
     
    Join Date: Jan 2008
    Posts: 8
    Благодарил(а): 0 раз(а)
    Поблагодарили: 0 раз(а) в 0 сообщениях
    Default

    When I place the Google script code at the bottom of the header template (or anywhere else in any template, for that matter) it gives me an internal server error.

    Quote:
    Internal Server Error

    The server encountered an internal error or misconfiguration and was unable to complete your request.

    Please contact the server administrator, [my email address] and inform them of the time the error occurred, and anything you might have done that may have caused the error.

    More information about this error may be available in the server error log.

    Additionally, a 404 Not Found error was encountered while trying to use an ErrorDocument to handle the request.
    The error log says:
    Quote:
    [Sat Jul 03 13:12:42 2010] [error] [client 200.62.106.103] File does not exist: /home... .../admincp/template.php?s=&do=edit&templateid=4047&group=&sea rchstring=&expandset=2[/url]
    I can make minor non-code changes and it saves just fine, but not this. And I have several customized templates.

    So I'm lost and don't know what to do...
    Reply With Quote
      #19  
    Old 07-08-2010, 08:11 PM
    speakeasy media speakeasy media is offline
     
    Join Date: Jan 2008
    Posts: 8
    Благодарил(а): 0 раз(а)
    Поблагодарили: 0 раз(а) в 0 сообщениях
    Default

    So I guess I'm the only one with this problem.
    Reply With Quote
      #20  
    Old 10-16-2015, 07:01 AM
    friendlymela's Avatar
    friendlymela friendlymela is offline
     
    Join Date: Dec 2012
    Location: Karachi, Pakistan
    Posts: 272
    Благодарил(а): 0 раз(а)
    Поблагодарили: 0 раз(а) в 0 сообщениях
    Default

    any screenshot for this?
    Reply With Quote
    Reply


    Posting Rules
    You may not post new threads
    You may not post replies
    You may not post attachments
    You may not edit your posts

    BB code is On
    Smilies are On
    [IMG] code is On
    HTML code is Off

    Forum Jump


    All times are GMT. The time now is 02:23 PM.


    Powered by vBulletin® Version 3.8.12 by vBS
    Copyright ©2000 - 2024, vBulletin Solutions Inc.
    X vBulletin 3.8.12 by vBS Debug Information
    • Page Generation 0.06094 seconds
    • Memory Usage 2,343KB
    • Queries Executed 28 (?)
    More Information
    Template Usage:
    • (1)SHOWTHREAD
    • (1)ad_footer_end
    • (1)ad_footer_start
    • (1)ad_header_end
    • (1)ad_header_logo
    • (1)ad_navbar_below
    • (1)ad_showthread_beforeqr
    • (3)bbcode_code
    • (4)bbcode_php
    • (3)bbcode_quote
    • (1)footer
    • (1)forumjump
    • (1)forumrules
    • (1)gobutton
    • (1)header
    • (1)headinclude
    • (1)modsystem_post
    • (1)navbar
    • (4)navbar_link
    • (120)option
    • (1)pagenav
    • (1)pagenav_curpage
    • (1)pagenav_pagelink
    • (10)post_thanks_box
    • (1)post_thanks_box_bit
    • (10)post_thanks_button
    • (1)post_thanks_javascript
    • (1)post_thanks_navbar_search
    • (1)post_thanks_postbit
    • (10)post_thanks_postbit_info
    • (9)postbit
    • (2)postbit_attachment
    • (10)postbit_onlinestatus
    • (10)postbit_wrapper
    • (1)spacer_close
    • (1)spacer_open
    • (1)tagbit_wrapper 

    Phrase Groups Available:
    • global
    • inlinemod
    • postbit
    • posting
    • reputationlevel
    • showthread
    Included Files:
    • ./showthread.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/functions_bigthree.php
    • ./includes/class_postbit.php
    • ./includes/class_bbcode.php
    • ./includes/functions_reputation.php
    • ./includes/functions_post_thanks.php 

    Hooks Called:
    • init_startup
    • init_startup_session_setup_start
    • init_startup_session_setup_complete
    • cache_permissions
    • fetch_postinfo_query
    • fetch_postinfo
    • fetch_threadinfo_query
    • fetch_threadinfo
    • fetch_foruminfo
    • style_fetch
    • cache_templates
    • global_start
    • parse_templates
    • global_setup_complete
    • showthread_start
    • showthread_getinfo
    • forumjump
    • showthread_post_start
    • showthread_query_postids
    • showthread_query
    • bbcode_fetch_tags
    • bbcode_create
    • showthread_postbit_create
    • postbit_factory
    • postbit_display_start
    • post_thanks_function_post_thanks_off_start
    • post_thanks_function_post_thanks_off_end
    • post_thanks_function_fetch_thanks_start
    • fetch_musername
    • post_thanks_function_fetch_thanks_end
    • post_thanks_function_thanked_already_start
    • post_thanks_function_thanked_already_end
    • post_thanks_function_fetch_thanks_bit_start
    • post_thanks_function_show_thanks_date_start
    • post_thanks_function_show_thanks_date_end
    • post_thanks_function_fetch_thanks_bit_end
    • post_thanks_function_fetch_post_thanks_template_start
    • post_thanks_function_fetch_post_thanks_template_end
    • postbit_imicons
    • bbcode_parse_start
    • bbcode_parse_complete_precache
    • bbcode_parse_complete
    • postbit_display_complete
    • post_thanks_function_can_thank_this_post_start
    • postbit_attachment
    • pagenav_page
    • pagenav_complete
    • tag_fetchbit_complete
    • forumrules
    • navbits
    • navbits_complete
    • showthread_complete