Go Back   vb.org Archive > vBulletin Modifications > Archive > vB.org Archives > vBulletin 3.0 > vBulletin 3.0 Full Releases
FAQ Community Calendar Today's Posts Search

Reply
 
Thread Tools
Language-selection for guest Details »»
Language-selection for guest
Version: 1.00, by JoergZ JoergZ is offline
Developer Last Online: Dec 2012 Show Printable Version Email this Page

Version: 3.0.0 Rating:
Released: 01-02-2004 Last Update: 03-08-2004 Installs: 58
Code Changes  
No support by the author.

PLEASE CLICK THE INSTALL BUTTON IF INSTALLED!


Hallo,

the vB3 offers the chance to have multi languages, but at the moment it is unfortunally only for registred / logged-in users possible to select a language. Guests / not logged-in users will see always the default language.


With this modification you can offer your guests / not-logged-in users an option to select a language, so they can see the forum and the registration in the selected language. Further the selected language will be set during the registratin as default for the new user.


Short-description

Language-Selection for not logged-in users


Requirements
  • vB3 RC1 or higher (Tested up to 3.0.7) NOTE !! For installation on 3.0.8 or above read this posting !! Thanks to Khashyar for finding this change !
  • Of cource more than one installed language, otherwise this modification make no sense
Installationtime

about 5 minutes


The use of this modification is as always at your own risk !


J?rg


Update 05. January 2004 (added version 2)

Update 09. March 2004 (added version 3)

Update 27. March 2004: Tested in 3.0.0 Gold



Version 1:

In this version you have to enter for each language a menue-entry manually

Version 2:

This version detects the selectable languages automaticly and the menue-entries are created automaticly too. To get the menue-entries, the function "Use DHTML Popup Menus" must be activated. This version has an additional query with each page-call. If you don't like this, use version 1.

Version 3:

This version is based on version 1, but it detects the browser-language automatic and shows the board in the language of the user. This automatic-detection of the user-language was realised by WildChild. Thanks for this extension of my hack. Note the difference to my version 2: My Version 2 detects the installed languages automatic, version 3 detects the language which is set in the users browser !



Note: A german version of the installation-instructions you will find here at vbulletin-germany.com

Show Your Support

  • This modification may not be copied, reproduced or published elsewhere without author's permission.

Comments
  #32  
Old 03-27-2004, 08:15 AM
JoergZ JoergZ is offline
 
Join Date: Jun 2002
Location: Germany
Posts: 127
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Yes, I have written a soloution for that, because a german user asked me the same. I will post it this afternoon here.

But can you tell me for what this make sense ? Which user switches the language after he selected it once ?

(I am using it only in my local test-board so I can check the translations without always going the long way via the user-settings).


Jörg
Reply With Quote
  #33  
Old 03-27-2004, 09:48 AM
JoergZ JoergZ is offline
 
Join Date: Jun 2002
Location: Germany
Posts: 127
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

O.k., here we go:

To change the language use the following line in the navbar template:

PHP Code:
 <tr><td class="vbmenu_option"><a href="changelanguage.php?$session[sessionurl]languageid=1">Name of language 1</a></td></tr
<
tr><td class="vbmenu_option"><a href="changelanguage.php?$session[sessionurl]languageid=2">Name of language 2</a></td></tr

Add to the phrasegroup Front-End Redirect Messages the following 2 phrases:

Varname: changelanguage
Text: Boardlanguage was changed

Varname: nochangelanguage
Text: Language was not changed


Save the changelanguage.php I have attached in the main board directory (where you have your index.php).

That's all.



Best Regards

J?rg
Reply With Quote
  #34  
Old 04-08-2004, 06:25 PM
AZone's Avatar
AZone AZone is offline
 
Join Date: Nov 2002
Posts: 51
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

This is a great hack! Easy and very usefull! Thank you a lot!
Reply With Quote
  #35  
Old 04-24-2004, 02:11 PM
ricoche's Avatar
ricoche ricoche is offline
 
Join Date: Oct 2002
Location: Nagano, Japan
Posts: 53
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Hello,

Thanks for the hack.

Any idea why I might be getting this error on line 76?

Code:
Parse error: parse error, expecting `']'' in /home/username/public_html/forums/changelanguage.php on line 76
Here is the code from line 75 to line 79. Is there anything missing or incorrect here?

Code:
	if (($check_language == '')  or ($check_language[
	{
		$url = "$vboptions[forumhome].php?$session[sessionurl]";
		eval(print_standard_redirect('nochangelanguage'));
	}
Thanks.
Reply With Quote
  #36  
Old 04-24-2004, 04:52 PM
JoergZ JoergZ is offline
 
Join Date: Jun 2002
Location: Germany
Posts: 127
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Sorry, don't know how this garbage came into the changelanguge.php

I have corrected the attachment.

You can solve the problem like this:

Change this line
PHP Code:
 if (($check_language == '') or ($check_language
to this

PHP Code:
 if ($check_language == ''

J?rg
Reply With Quote
  #37  
Old 05-06-2004, 07:02 PM
jluerken's Avatar
jluerken jluerken is offline
 
Join Date: Aug 2003
Location: Germany
Posts: 1,016
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Hi Joerg,

many thanks for this Hack.

I installed it and via a condition in the header template only GUESTS have the choice. This is working on all pages at not only on forumhome. Its also working on the vbAdvance Portal page...

See screenshots
Reply With Quote
  #38  
Old 07-01-2004, 12:51 PM
Bobbo Bobbo is offline
 
Join Date: Feb 2003
Posts: 47
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Great hack, thanks for your efforts. I had to do a little monkeying around with it since I am using VBA CMPS and the main index resides outside the forums directory.

However with a few minor modifications and some conditionals it is now working for both registered/logged in users as well as for guests from both the forum home as well as from VBA CMPS home page.

Thanks again.
Reply With Quote
  #39  
Old 07-22-2004, 12:17 AM
Merjawy's Avatar
Merjawy Merjawy is offline
 
Join Date: Sep 2002
Location: USA
Posts: 505
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Very nice indeed and pretty much needed for many

thanks,

one question, you have ver. 1, 2 and 3,, which do I need to install? all? forgive my asking just confused a little

I do know the logic in doing things ,, but this one did confuse me a bit sorry
Reply With Quote
  #40  
Old 07-22-2004, 07:47 AM
JoergZ JoergZ is offline
 
Join Date: Jun 2002
Location: Germany
Posts: 127
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

You need only to install one of the versions.


The different is:

Version 1:
You must define a new navbar-menue-item everytime you install a new language and want to make it selectable in the navbar

Version 2:
The installed and selectable languages are detected automatic, no need to add new navbar-item when a new language is installed

Version 3:
One of your languages is the default-language. Every visitor who comes first time to your board will see the board in this default-language. Version 3 detects the language-settings of the users browser and automatic set the vB-language to this language if available. Example: Default is English, you have installed English, German, French, Spanish. A user with French language-setting in browser come first time to your board, he will see it in French. No need for him to select the language of your board manually.

I hope your confusion is gone now

Best regards

J?rg
Reply With Quote
  #41  
Old 07-22-2004, 10:29 PM
Merjawy's Avatar
Merjawy Merjawy is offline
 
Join Date: Sep 2002
Location: USA
Posts: 505
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Indeed gone now thnx a lot mate
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 09:03 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.04853 seconds
  • Memory Usage 2,321KB
  • Queries Executed 25 (?)
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
  • (3)bbcode_php
  • (1)footer
  • (1)forumjump
  • (1)forumrules
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (1)modsystem_post
  • (1)navbar
  • (6)navbar_link
  • (120)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (4)pagenav_pagelink
  • (11)post_thanks_box
  • (11)post_thanks_button
  • (1)post_thanks_javascript
  • (1)post_thanks_navbar_search
  • (11)post_thanks_postbit_info
  • (10)postbit
  • (11)postbit_onlinestatus
  • (11)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_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
  • post_thanks_function_fetch_thanks_end
  • post_thanks_function_thanked_already_start
  • post_thanks_function_thanked_already_end
  • fetch_musername
  • postbit_imicons
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • postbit_display_complete
  • post_thanks_function_can_thank_this_post_start
  • pagenav_page
  • pagenav_complete
  • tag_fetchbit_complete
  • forumrules
  • navbits
  • navbits_complete
  • showthread_complete