The Arcive of Official vBulletin Modifications Site.It is not a VB3 engine, just a parsed copy! |
|
Comments |
#12
|
|||
|
|||
Well...
The standard language hack is probably already explained in the messages above, so unless you have a question about it, I won't elaborate on that... The forumjump template is different because it's evaluation code can be found in a function. PHP functions don't know the content of variables declared outside the function (in this case the variables that are loaded from the language files...) Solution... You must include the variables that you use in the forumjump template as global in the beginning of that function. In my particular case this means adding following rule to the declaration of variables in the makeforum() function of global.php global $bobexforumjump,$bobexgobutton,$bobexselectone; When it comes to remembering the language without cookies, this is a little harder. I first implemented this by adding a language field to the user-table so that when cookies were disabled, It could read the default language for that user. However, without cookies, vBulletin doesn't keep you logged-in all the time, and you loose your language variable again. This leaves only passing the language variable everywhere through the URL. However, I haven't implemented that yet, and probably won't since it means changing links in virtually every template. If you have any more questions, just ask! Greetings stcham |
#13
|
|||
|
|||
Did I miss something? I don't see the hack.
I see talk about it. Are there any language files I need plus instructions on how to use this? |
#14
|
|||
|
|||
I don't see the problem actually?
On top of your page you set a couple of links that will set a cookievariable language based on the link that is pressed. (for instance... you set the language cookie to 'Fra' if the link 'French' is clicked) In global.php you set something like: if (!(isset($language))) $language = "Eng"; if ($language == "Eng") include ("English.php"); if ($language == "Ned") include ("Dutch.php"); if ($language == "Fra") include ("French.php"); Then you make the language files you want... For instance (a very short version of) english.php might look like: <?php $bobexthread = "Thread"; $bobexbulletinpower = "powered by vBulletin"; $bobexalltimes = "All times are "; $bobexselectlanguage = "Select a language"; $bobexcontactusmesssage = "Contact Us"; $bobexgobutton = "Go"; $bobexfdpostnewthread = "Post New Thread"; $bobexforumrules = "Forum Rules"; $bobexadminoptions = "Admin Options"; $bobexregistered = "Registered"; $bobexpoststitle = "Posts"; ?> In short: include a variable for every piece of textual information that is present in the templates. The reason bobex is in front of all the variables is that you definitely want to make sure you have unique variable names that aren't used somewhere else in the code (and bobex is the name of the company I'm adjusting vbulletin for) You make a language file for every language defining the same variables but assigning different values to it (obviously) Then in your templates, you change the string "Forum Rules" by "$bobexforumrules" and you're done. Well.. Mostly that is, because, as I already mentioned, some templates give troubles (forumjump for instance) All clear now? stcham |
#15
|
|||
|
|||
ok....I was hoping someone had already done the language files. I do not know any other language besides English. Maybe a little Spanish.
Can I have your language files? |
#16
|
|||
|
|||
Well...
My language files aren't done yet. It's a hell of a lot of work Also, my language files are not exact translations of the original site, since some things were changed (for instance: the faq contains different answers for our site than for the standard vbulletin) If you are still interested, I don't see why not (when they're ready) Remember that you'll have to adjust all your templates to work with my variables... Let me know. stcham |
#17
|
|||
|
|||
When I try to change the language to Italian on Big Soccer, I keep getting the following error:
Warning: Cannot add header information - headers already sent by (output started at italian.php:88) in global.php on line 753 The hack looks cool - I like to bug John, so lets request that he add this to a future version. He would only have to do the translation once and it would be good to go. Maybe this would even fit in with the "Skins" idea that had been floating around... |
#18
|
|||
|
|||
Quote:
If you still want them, I'll post them, however the templates need a LOT of work. On top of that, most PHP files need to be edited. The hack seems extremely easy, and indeed, it's not that hard, but you need to add globals on many different places in order for your variables to be recognised. Also, some templates are just inserted without being evaluated through PHP. For instance, most error_templates contain only text. Since they don't contain variables, it's not necessary to evaluate them. However, if you use multilangsupport, you introduce variables, and therefore you DO need to evaluate them... To be more exact, you need to replace echo standarderror($bbtitle,gettemplate("whatever",0)); in eval("echo standarderror(\$bbtitle,\"".gettemplate("whatever" )."\",\"\");"); in a lot of different places. I hope I'm making myself a little clear? If that's not a problem for you, the languagefiles are yours. Greetings, stcham |
#19
|
|||
|
|||
Quote:
|
#20
|
|||
|
|||
Me too please
|
#21
|
|||
|
|||
hmmm...what browser? i'll take a look...
Quote:
|
|
|
X vBulletin 3.8.12 by vBS Debug Information | |
---|---|
|
|
More Information | |
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|