Go Back   vb.org Archive > vBulletin Modifications > Archive > vB.org Archives > vBulletin 3.6 > vBulletin 3.6 Add-ons

Reply
 
Thread Tools
Set forum-language automatic to browser-language for first-visitors Details »»
Set forum-language automatic to browser-language for first-visitors
Version: 2.00, by JoergZ JoergZ is offline
Developer Last Online: Dec 2012 Show Printable Version Email this Page

Category: Mini Mods - Version: 3.6.2 Rating:
Released: 10-13-2006 Last Update: Never Installs: 75
Uses Plugins
 
No support by the author.

Short-description

This Hack detects the browser-language automatic and shows the board in the language of the user, if the user has never been at your board before or has no cookie for your board.

The part of automatic-detection of the browser-language was realised by WildChild


Requirements
  • vB 3.6 (Tested with 3.6.2)
  • Of course more than one installed and selectable language, otherwise this modification makes no sense
Installation-time

about 1 minutes


PLEASE CLICK THE INSTALL BUTTON IF INSTALLED!


------------------------------------------------------------------------

If you want to test the hack after installing, do it like this:

- Log out of your forum. Dont klick any of the displayed links after logging out !
- Close your browser-window
- Open a new browser-window
- Set your language preferences in the browser
- Go to your forum homepage

Show Your Support

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

Comments
  #12  
Old 10-18-2006, 08:39 AM
Greek76's Avatar
Greek76 Greek76 is offline
 
Join Date: Aug 2006
Location: Planet Earth
Posts: 440
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

I installed but doesnt seem to work. Where it says x or xx I forget I replaced it with the language I would like. I added tha language on my browser did what you said but no good. Any ideas?
Reply With Quote
  #13  
Old 10-18-2006, 08:54 AM
JoergZ JoergZ is offline
 
Join Date: Jun 2002
Location: Germany
Posts: 127
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Hi Greek76 !

The only idea I have is the following: After you have added a different language-preferenz to your browser, have you changed the order, so the new language is on top ?

And it is important, that you logout from your board, and do not click anything after logging out, otherwise again a cookie would be set. So logout, and then close the browser window, then start your browser again.

What browser are you using ? I admit, I have tested it only with IE 6.0. But it should work with all browsers.

Best regards

Jörg
Reply With Quote
  #14  
Old 10-19-2006, 01:38 PM
lapinkulta's Avatar
lapinkulta lapinkulta is offline
 
Join Date: Sep 2006
Posts: 3
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

wonderfull hack, very usefull.

one question: can i assign a specific style together with the language? will this work also for guests or for users only?

greetings,
lapinkulta
Reply With Quote
  #15  
Old 10-19-2006, 05:06 PM
JoergZ JoergZ is offline
 
Join Date: Jun 2002
Location: Germany
Posts: 127
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by lapinkulta
one question: can i assign a specific style together with the language? will this work also for guests or for users only?
Never thought about that. I will check this. If it works, then it would be also only for first-time visitors with no cookie. The user is always able to change the style.


BR

J?rg
Reply With Quote
  #16  
Old 10-19-2006, 06:44 PM
lapinkulta's Avatar
lapinkulta lapinkulta is offline
 
Join Date: Sep 2006
Posts: 3
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

yes, would be nice for replacement variables in different languages. i am using something like that which works only for logged in users, not for guests:

Code:
if ($_SERVER['HTTP_HOST'] == "en.domain.com") {
				$_REQUEST['langid'] = 3;
$_REQUEST['styleid'] = 4;
		} elseif ($_SERVER['HTTP_HOST'] == "de.domain.com") {
				$_REQUEST['langid'] = 2;
$_REQUEST['styleid'] = 3;
		} else {
				$_REQUEST['langid'] = 16;
$_REQUEST['styleid'] = 5;
		}
Reply With Quote
  #17  
Old 12-22-2006, 12:48 PM
localrelax localrelax is offline
 
Join Date: Dec 2006
Posts: 4
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Thanks, it works on 3.6.4
Reply With Quote
  #18  
Old 12-27-2006, 06:36 AM
domainsTRADER domainsTRADER is offline
 
Join Date: Dec 2006
Posts: 6
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

tanks nice idea
Reply With Quote
  #19  
Old 06-06-2007, 06:50 PM
bjhuang bjhuang is offline
 
Join Date: Jul 2006
Posts: 77
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

can not change language settings from control panel after installed.
Reply With Quote
  #20  
Old 10-12-2007, 09:47 PM
zhaoke zhaoke is offline
 
Join Date: Jun 2007
Location: Islab.org
Posts: 7
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

This sounds great, but it not works on 3.6.8, the below is my settings:
(i checked language code settings, zh-cn_id: 11, en-US_id: 1)

$_DLANG='en-US';

'en-US', # english.
'zh-cn' # chinese.

case 'en-US':
$_REQUEST['langid'] = 1;
break;
case 'zh':
$_REQUEST['langid'] = 11;
break;
Reply With Quote
  #21  
Old 11-02-2007, 08:30 PM
Kirauni Kirauni is offline
 
Join Date: Oct 2007
Posts: 16
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

*installed this add-on*

It works fine on my vBulletin 3.6.8.
However, I had to delete all my browser's temporary files, cookies etc.
Right after this I switched my browser's language and then it worked perfectly.

Thank you very much for this nice hack, it makes browsing a multilingual board as a guest much easier.
Reply With Quote
Reply

Thread Tools

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 04:19 AM.


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.06453 seconds
  • Memory Usage 2,296KB
  • 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
  • (1)bbcode_code
  • (1)bbcode_quote
  • (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
  • (3)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