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
Language Changer for Vbulletin Details »»
Language Changer for Vbulletin
Version: 1.00, by billstelling billstelling is offline
Developer Last Online: Dec 2016 Show Printable Version Email this Page

Category: Add-On Releases - Version: 4.1.4 Rating:
Released: 08-20-2011 Last Update: Never Installs: 10
Re-useable Code Code Changes Translations  
No support by the author.

This is a little add on for VB so your members can switch the site to their chosen language.
I have it in the footer but if you know what you are doing you can put it just about anywhere. It will work in the header or footer like I have it now. If you are new at VB it's not to hard with a little trial and error to get it were you want it.
UPDATED 9/12/2011
to change margin and padding
to chance font color
Code:
<!-- Translate vBulletin -->
<style>
.goog-te-banner-frame{
	display: none !important;
}
.goog-te-balloon-frame{
        display: none !important;
}
.goog-te-gadget {
    font-size: 0px;
    color #333333;
}
.goog-te-gadget img {
	display: none !important;
}
.goog-te-combo {
    margin-left: 14px;
    margin-right: 14px;
    vertical-align: baseline;
}
.goog-te-gadget .goog-te-combo {
    margin: 0px 0px 0px 0px;
    border: 0px solid #444444;
    float:right;
}
.goog-logo-link, .goog-logo-link:link, .goog-logo-link:visited, .goog-logo-link:hover, .goog-logo-link:active {
	display: none !important;
}
.goog-te-combo, .goog-te-banner *, .goog-te-ftab *, .goog-te-menu *, .goog-te-menu2 *, .goog-te-balloon * {
    font-family: none;
    font-size: none;
    color: #ffffff;
}
body{
    top: 0px !important;
}
font{
	clear: both !important;
        color:auto !important;
	background: transparent !important;
}
</style>
<div id="google_translate_element" class="footer_select"></div><script>
function googleTranslateElementInit() {new google.translate.TranslateElement({
layout: google.translate.TranslateElement.InlineLayout.HORIZONTAL,
         pageLanguage: 'en',    gaTrack: true,}, 'google_translate_element');
}
</script><script src="//translate.google.com/translate_a/element.js?cb=googleTranslateElementInit"></script>
<!-- /Translate vBulletin -->
I have placed it after this for the theme I am using..
example:
this is the start of footer templet
Code:
{vb:raw ad_location.ad_footer_start}
{vb:raw ad_location.global_above_footer}
<div id="footer" class="floatcontainer footer">

	<form action="{vb:link forumhome|nosession}" method="get" id="footer_select" class="footer_select">

			
		<vb:if condition="$show['quickchooser']">
			<select name="styleid" onchange="switch_id(this, 'style')">
				<optgroup label="{vb:rawphrase quick_style_chooser}">
					{vb:raw quickchooserbits}
				</optgroup>
			</select>	
		</vb:if>

		<vb:if condition="$show['languagechooser']">
			<select name="langid" onchange="switch_id(this, 'lang')">
				<optgroup label="{vb:rawphrase quick_language_chooser}">
					{vb:raw languagechooserbits}
				</optgroup>
			</select>
		</vb:if>
	</form>
This is from the start of the footer template for common templates down to </form> and I put it after that.


I found parts for doing this from here and from Google's code for the translator. It took a little trial and error to get it this far but it works really good so i have decided to let every one check it out but keep in mind we are still working on improving it.

Credit goes To me, Mark over at Virtual Customs as well as those whose code we started out with.

If you can make it any better feel free to do so and post up what you have here.

You can also change colors of the text for different parts of as you can see in the code. Just play around with it and you will figure out which is which.

Bugs.
! so far. It will preempt the color of text in post bits.. So if you have posted coloring you text it shows up white on the forum. But not in the editor.. go figure. But I dont color my text so it doesn't bother me a bit, but we are working on it. If you figure it out let me know.

Screenshots

File Type: jpg Untitled2.jpg (28.5 KB, 0 views)
File Type: jpg Untitled1.jpg (54.2 KB, 0 views)
File Type: jpg Untitled.jpg (22.8 KB, 0 views)

Supporters / CoAuthors

Show Your Support

  • This modification may not be copied, reproduced or published elsewhere without author's permission.
2 благодарности(ей) от:
leejohn02, NightLord

Comments
  #2  
Old 08-21-2011, 10:27 PM
Mr GRiM's Avatar
Mr GRiM Mr GRiM is offline
 
Join Date: Jul 2011
Posts: 33
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Nice one Bill, lets see if we can get the collective to improve on this a bit
Reply With Quote
  #3  
Old 08-22-2011, 12:02 AM
NightLord's Avatar
NightLord NightLord is offline
 
Join Date: Nov 2009
Location: cyprus
Posts: 42
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

very nice, thank you
Reply With Quote
  #4  
Old 08-22-2011, 04:57 AM
thedvs thedvs is offline
 
Join Date: May 2002
Posts: 353
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

works fine in firefox, chrome, but when using IE, I get a powered by text before the language chooser box
Reply With Quote
  #5  
Old 08-22-2011, 09:46 AM
AdrianH AdrianH is offline
 
Join Date: Sep 2007
Posts: 222
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

<a href="https://vborg.vbsupport.ru/showthread.php?t=258009&highlight=Google+translati on" target="_blank">https://vborg.vbsupport.ru/showt...le+translation</a>
Reply With Quote
  #6  
Old 08-22-2011, 02:48 PM
HMBeaty's Avatar
HMBeaty HMBeaty is offline
 
Join Date: Sep 2005
Posts: 4,141
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by AdrianH View Post
This one has a slighly different layout
Reply With Quote
  #7  
Old 08-22-2011, 07:51 PM
leejohn02 leejohn02 is offline
 
Join Date: Apr 2011
Posts: 90
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

u should really say where to put both the codes, for css and footer, that way it will help people who cant code work out where is best to put both
Reply With Quote
  #8  
Old 08-25-2011, 02:47 PM
billstelling's Avatar
billstelling billstelling is offline
 
Join Date: Apr 2011
Posts: 246
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

only one "code" and it goes in the footer.. every theme is different so.... placement will be slightly different. As I said it goes after </form>
try reading what I wrote.. It's pretty much a no brainer.
Reply With Quote
  #9  
Old 09-12-2011, 04:40 PM
billstelling's Avatar
billstelling billstelling is offline
 
Join Date: Apr 2011
Posts: 246
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Just letting everyone know that the mod has been updated.
Reply With Quote
  #10  
Old 10-22-2015, 03:25 PM
Nirjonadda Nirjonadda is offline
 
Join Date: Dec 2011
Location: Italy
Posts: 739
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Please can you make this mod without manual template edit?
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 08:48 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.05945 seconds
  • Memory Usage 2,331KB
  • Queries Executed 27 (?)
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
  • (2)bbcode_code
  • (1)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
  • (2)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
  • (3)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_attachment
  • postbit_display_complete
  • post_thanks_function_can_thank_this_post_start
  • pagenav_page
  • pagenav_complete
  • tag_fetchbit_complete
  • forumrules
  • navbits
  • navbits_complete
  • showthread_complete