vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vBulletin 3.6 Add-ons (https://vborg.vbsupport.ru/forumdisplay.php?f=194)
-   -   Mini Mods - Set forum-language automatic to browser-language for first-visitors (https://vborg.vbsupport.ru/showthread.php?t=129081)

Greek76 10-18-2006 08:39 AM

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?

JoergZ 10-18-2006 08:54 AM

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

lapinkulta 10-19-2006 01:38 PM

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

JoergZ 10-19-2006 05:06 PM

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

lapinkulta 10-19-2006 06:44 PM

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


localrelax 12-22-2006 12:48 PM

Thanks, it works on 3.6.4

domainsTRADER 12-27-2006 06:36 AM

tanks nice idea

bjhuang 06-06-2007 06:50 PM

can not change language settings from control panel after installed.

zhaoke 10-12-2007 09:47 PM

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;

Kirauni 11-02-2007 08:30 PM

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


All times are GMT. The time now is 10:01 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.01267 seconds
  • Memory Usage 1,735KB
  • 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
  • (1)bbcode_code_printable
  • (1)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (3)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