The Arcive of Official vBulletin Modifications Site.It is not a VB3 engine, just a parsed copy! |
|
Language-selection for guest Details »» | |||||||||||||||||||||||||
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
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
|
Comments |
#32
|
|||
|
|||
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 |
#33
|
|||
|
|||
O.k., here we go:
To change the language use the following line in the navbar template: PHP Code:
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 |
#34
|
||||
|
||||
This is a great hack! Easy and very usefull! Thank you a lot!
|
#35
|
||||
|
||||
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 Code:
if (($check_language == '') or ($check_language[ { $url = "$vboptions[forumhome].php?$session[sessionurl]"; eval(print_standard_redirect('nochangelanguage')); } |
#36
|
|||
|
|||
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:
PHP Code:
J?rg |
#37
|
||||
|
||||
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 |
#38
|
|||
|
|||
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. |
#39
|
||||
|
||||
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 |
#40
|
|||
|
|||
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 |
#41
|
||||
|
||||
Indeed gone now thnx a lot mate
|
#42
|
||||
|
||||
Now to the strange part
I did install the first part of the hack, edited sessions.php and register.php and I stopped right there for now I change the default to other than en and also did that somewhere little down the hack, anyway now everything looks cool, but while I was still admin I ponited my browser to the forum adding the ?&guestlanguageid=1 and then 2 ofcourse I am not a guest so that didn't do nothing I loged out, now I did that again and it worked, BUT when I used 1 I get english which is not the default language and not #1 in sessions.php and when I do 2 I get the default lang... now thats fine I can live with it and I am sure I can fix it too this is what made me post now I noticed in my nabar now I have 2 new links Mark all forums as read Open buddly list now why they showing up in nav bar now? I checked navar and they are there and uncommented but they never show up in my navbar on two sites, now after this hack they show in all tempates on this one site so for now I had to comment them out in my navbar till I figure out why they showing I looked at both sites and the navra is the same non the less, this hack is great and I am gonna use it even if my name pops in navbar |
#43
|
||||
|
||||
Its me.. I knew it
I was messing with settings, and I disabled the use of DHTML menu under vB options and I got a phone call, took me away from what I was doing when I came back, I installed the hack and thats when I saw what I did before the hack so nevermind, the problem is fixed |
#44
|
||||
|
||||
All systems good to go mate thanks
theres one little issue, for now I managed to over come it but it needs fix I use a portal (vBadvanaced CMPS) in the root and my forum in a directory under it, all work fine but when a guest is on portal (root) they change language link won't work, it will just take them to my root directroy where I have index.html as a front-end loader (which will load index.php of the portal once clicked). a guest in forum, they click the lang change, the URL will be /forum/index.php?guestXXXXX a geust in portal, they click the lang change, the URL will be /?guestlanguageXXXXXXXXX that might work if I only had 1 index in my root, but I have 2 index.html loads first then it loads index.php once clicked I managed to temp fix it by adding a "/" at the begining of the varialble ($vboptions[forumhome].php?XXXXXXXXXXXXXXXXXXXXXX) This makes it take the guest to the main root index.php (portal) no matter where the guest clicked the lingo change (in portal or forum) I hope that made any sence but for now it works non the less thnx again next step is installing the change for members .. can't wait |
#45
|
||||
|
||||
Quote:
can I change Name of language 1 / Name of language 2 to $vbphrase[lang01] / $vbphrase[lang02] ? thnx |
#46
|
|||
|
|||
Yes of course ! It was only an example
Nice to hear, that it works for you. Concerning the portal-thing, sorry, but I have no portal, so I don't thought about, that the link won't work in this case |
|
|
X vBulletin 3.8.12 by vBS Debug Information | |
---|---|
|
|
More Information | |
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|