The Arcive of Official vBulletin Modifications Site.It is not a VB3 engine, just a parsed copy! |
|
#1
|
|||
|
|||
hack for multiple language support
Well, this is my last attempt at getting help with this problem. I really wish I was better at PHP so I didn't have to keep coming back here and posting this and getting no response, but anyway...
My forum supports multiple languages using the Phrase Manager. This works great for menus, standard text, etc but it doesn't work for the title and description of each forum. The reason is that in the Admin CP I am only allowed to choose one and only name for the forum. Now, regardless of what Language a visitor to the forum chooses, they will only see the one and only one title that I have chosen for the forum (likewise with description). What I would like is to be able to add a phrase through Phrase Manager, and insert a translation for all of the languages that my forum supports. Then, somehow have the title and description fields reference these variable, and have the vBulletin system choose the correct translation based on the language setting. Just as an example, say I have a simple forum with only one forum called Milk. My forum supports two langauges, English & Spanish. If the user has selected English, I want it to say "Milk", and if the user has selected Spanish, it should say "Leche". I looked at index.php, and I see some code that could maybe potentially be changed. (btw, I don't know -anything- about PHP although I am experienced in other non web related languages, so I just pinpointed this as potential code, I don't know specifically what its doing) foreach ($parentlist AS $forumID) { $forumTitle =& $vbulletin->forumcache["$forumID"]['title']; $navbits['forumdisplay.php?' . $vbulletin->session->vars['sessionurl'] . "f=$forumID"] = $forumTitle; } What would be some appropriate code to do it and where would I put that code? Thanks kindly for any suggestions Zachary Turner |
#2
|
||||
|
||||
Possibly if you post in the correct section, you'd get more help.
|
#3
|
|||
|
|||
First off, yeah wrong forum
Second off, not sure if it's possible but perhaps someone else can clue in on this. First off, lets use the milk example. Name a forum "milk" Then add a hook in global_start to do something like Code:
$forum[title] = $vbphrase[forumnames_$forum[title]]; forumnames_milk with a translation for each language Milk, Leche, etc Wonder if that would work... If not, you'll have to do like a mass replace in the templates changing $forum[title] to $vbphrase[forumnames_$forum[title]] and then add a global phrase. Do that for each forum, that's prolly your best bet *shrug* |
#4
|
|||
|
|||
Yea I realized after I posted it this was the wrong forum. But then again, I also posted it another more appropriate forum a few days ago, and no response. Anyway thanks for the suggestion, sorry again about the wrong forum :ermm:
Just curious, would it work to actually use Admin CP to set the name and description of the forum to PHP code which indicate a variable name? For example: Set forum name in Admin CP to $vbphrase[forumnames_milk] Then in the index.php read this and instead of simply displaying it for the forum name, look up its value? If that's possible, what would be the code to do it? |
#5
|
||||
|
||||
Quote:
|
#6
|
|||
|
|||
I saw your post and i putted it on my list of hacks to make, but a bit busy right now.
PS moved thread |
#7
|
|||
|
|||
Yeah, I think you'd have to do it the way I mentioned, otherwise it won't parse the php I don't think.
|
#8
|
|||
|
|||
Thanks for the responses again I'll wait and see what Marco has in store for me, in the meantime possibly toying around with a test site running a test database. I suppose I should check this thread for progress updates?
|
#9
|
||||
|
||||
has there been any progress on this?
I'm still majorly stressed out over this (orginally posted this same request ages ago. ) relevant links on exact same topic (little different in responses and ideas). https://vborg.vbsupport.ru/showthread.php?t=97638 https://vborg.vbsupport.ru/showthrea...597#post791597 here was a past post about this (with screenies): =========================================== This is HUGE problem (the biggest issue) for my forum/s (and I'm sure others): How do I make it so the forum TITLE links could have titles switch languages according to the language selected?? That is, if a user chooses one language (english, for example) ...the forum titles appear in that English, but if the user switches to another language (Z language, for example), then the forum titles appear in Z language. (I'm not talking about buttons and phrases! I know this is how the language sets work for BUTTONS and MENU items etc. I have korean and english languages running fine now. ) But there is nothing for dealing with forum titles/thread title links. Right now, i have to do both languages in one title...which means:
I'm postiive others have to deal with the issue as well. And I know this would be giant boost towards internationalizing vbull. Is their ANY way around this? to make two (multi) language sets available for the FORUM TITLES? (and subforum). I would GREATLY appreciate any ideas or help. thank you. See example screenshots below: |
#10
|
|||
|
|||
Although I don't need it, I think this should be in the default vbulletin features...
|
|
|
X vBulletin 3.8.12 by vBS Debug Information | |
---|---|
|
|
More Information | |
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|