![]() |
Set forum-language automatic to browser-language for first-visitors
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
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 |
Really really great! Thanks man!
*Installed* |
Marvelous hack, thank you :)
|
Thanks nice modification. :)
**Installed** |
will this work 3.6.0 thxs m8 great hack also i couldnt find her after install to check her in adminp
thxs MArkAnthony nope nothing?? Im missing something here correct?? |
I have not tested it with 3.6.0, but it works for all 3.5.x versions and for 3.6.2, so it should work for 3.6.0 and 3.6.1 too.
After you have installed the plugin, there will be not new points in the settings. You have to go to the plugin-area and edit the plugin-code direct. So click on "Plugins & Products" in the left menue in the Admin-CP, then select "Plugin Manager". There you click on "Edit" at the plugin "Set automatic forumlanguage to browserlanguage". To have a better overview increase the size of the edit-box 3 or 4 times. Scroll to the end of the plugin-code. There you find direct above the edit-description the lines, where you can assign the language-code to your language ID. If you still have problems to find it, I can provide some screenshots. Best regards J?rg |
Quote:
|
Quote:
2.) Check Languages (with my board German is ID1 and English ID2) 3.) Go Plugins & Products 4.) Manage Plugins 5.) Click "edit" for "Set automatic forumlanguage to browserlanguage" 6.) Check code at the end. If you only run German and English, you might want to delete French or set it to German/English. Do your testing with your browser, delete cookies and stuff ... |
Quote:
To give an example: You have installed the following languages on your board: English, German, French. A visitor, that has never been bevore on your forum comes to your website with the board. Without any modification the user see the board in the language, you have defined as default. Let's say English. To change the language the user has to select it from the drop-down menu at the bottom. With this hack, a first-time visitor from France would see the board immedeately in French, without changing the language manually. That's what the hack is doing. How you set the hack correct to the languages you have installed, is described in the downloadable installation-description. How to get there, has uspange described in the post above very good. BR J?rg |
thxs mates great hack!!!!1
|
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?
|
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 |
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 |
Quote:
BR J?rg |
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") { |
Thanks, it works on 3.6.4
|
tanks nice idea
|
can not change language settings from control panel after installed.
|
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; |
*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. |
I just installed it in version 3.5.8 the xml didn't work but I made a simple modification to the xml reuploaded and worked no problem.
if anyone wants this mod and can't get it to work in v 3.5 i can give you the moded xml btw thanks for the hack it was exactly what I was looking for |
it works on 3.6.8 with a custom style?
|
Quote:
The change was not necessray, because there is a 3.5 Version too. Moreover it would have beend nice to ask me before you offer your modified version to others ;) Quote:
J?rg |
My forum is in Spanish, does this hack not work?
thank |
To give you some help I need more information. Which languages do you have installed ? Is the board public where you have installed the hack ? If so, then please send me the link via PM, so I can have a look on your site.
Jörg |
Ok Jörg:
My forum is in English, the base. I have translated text into Spanish, I do not have once no hack of language was installed. Thanks |
Hi yeku !
It is not a good idea to post user and pw public. :) I changed the password of the user. As far as I see, you don't offer different languages to choose. But that's a condition for using the hack. You have to install different language-packages and have to make them user-selectable. Then the hack will automatic change to the fitting language for guest. J?rg |
Hello!!!
No matter, himself I do that, I have the controlled theme, in any case thanks. I will install several hack of languages thank |
Can anyone update this great addon to vbulletin 3.7? It?s not working for me there. :(
|
I am sorry, but currently I have no time to work on hacks.
If anyone want to modify this hack, so it works with 3.7 ,feel free to do it. Best regards Joerg |
seems to work fine for our forum, and we are on 3.7.2
|
Nice to hear.
Then Pander23 maybe did something wrong.. ;) Joerg |
Fatal error: Cannot redeclare rk_getenvvar() (previously declared in /var/www/vhosts/c-arena.com/subdomains/forum/httpdocs/includes/init.php(298) : eval()'d code:63) in /var/www/vhosts/c-arena.com/subdomains/forum/httpdocs/includes/init.php(298) : eval()'d code on line 266
is coming when I install this on 3.8.1 |
Sorry, as you can see in the top, it is only tested and approved up to 3.6.2
Due to lack of time, I have currently no plans to bring it to 3.8.x. Sorry Best regards Joerg |
Hi
could anybody adjust this great mod for vb 3.8x? Or does anybody knows a similar hack. I absolutely need this automatic browser language detection! |
FYI
I tested this now on a vb installation version 3.80 and 3.83. It works in both of them. I have not seen yet any errors or incompatibilities. Great mod! |
Hi snoopy5,
thank you very much for your feedback. I am lucky to hear it is working with 3.8 Joerg |
Hi
I tried it now on a third installation, but it seems that I tried accidentally to upload it twice. Now I get an error. I disabled all plugins in config.php, so that I have access again the ACP. But how do I delete this plugin now properly, so that I can try to install it again? |
update:
I found it. It was under a different section of the plugin options within ACP. So I deleted it and installed it again. This time no error. BUT it does not recognize the browser language and I do not know why. The settings are the exact same as with the other 2 installations. What could be the reason for this? I deleted already in FF cookies etc. |
update:
I found it. It was under a different section of the plugin options within ACP. So I deleted it and installed it again. This time no error. BUT it does not recognize the browser language and I do not know why. The settings are the exact same as with the other 2 installations. What could be the reason for this? I deleted already in FF cookies etc. |
All times are GMT. The time now is 08:34 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 | |
---|---|
|
|
![]() |
|
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|