View Full Version : I need to call modules based on language
DannyITR
11-28-2005, 04:56 PM
Can someone tell me where I need to put the <if> statement so if a user has the forum in another language then only certain modules will show (ones containing the different language presumably).
I can't put it in the module template because the header is common to all. Would I need to make a template called module_shell 2 or something and call one or the other? How would I do this? I've been trying for 2 weeks now. Help!
DannyITR
11-30-2005, 01:27 PM
up
Brian
11-30-2005, 02:31 PM
It's not quite as simple as using an <if condition>. You would need to modify the PHP files and have a decent knowledge of PHP in order to acomplish something like that.
DannyITR
11-30-2005, 02:41 PM
It's not quite as simple as using an <if condition>. You would need to modify the PHP files and have a decent knowledge of PHP in order to acomplish something like that.
Would you happen to know someone who'd be willing to do it for me? I'm willing to pay for this mod.
DannyITR
12-01-2005, 05:06 PM
I can't start using the cms until I find a solution. :( up
Brian
12-01-2005, 06:27 PM
If I had the time I would offer to help, but unfortunatly that's something I haven't had enough of lately. If you make a post in the Service Requests forum over at vbulletin.org though you could probably find someone there that could take on the task.
Ramses
12-01-2005, 07:29 PM
I don't know if it is useful for your site but I made it with phrases insinde the modules.
But the title of the modules will be not changed because it is not phrasable.
If you think this could help you I'll glad to tell you more.
DannyITR
12-01-2005, 07:31 PM
Hey thanks. I actually did this as well but I couldn't get around the title problem.
Would you be able to tell me the phrase you used anyways?
Ramses
12-01-2005, 08:03 PM
Hm, don't know exactly what you mean, please take a look how I made it on www.modell-chat.de watch the center modul on the upper side and than switch to english and you see how I made it and I can give you the phrase I used and what I put into the modul box.
DannyITR
12-01-2005, 08:20 PM
Sure that would be great. What is the phrase.
Ramses
12-01-2005, 08:27 PM
I made a template based module containing:
<tr>
<td class="$bgclass">
$vbphrase[guest_welcome]
</td>
</tr>
The phrase I made as following:
<p><table border="0">
<tr>
<td>
<---- your html content here---->
<br>
That's the english phrase, and also i made it the same with the german phrase.
DannyITR
12-01-2005, 08:51 PM
Can you highlight the actual phrase that specifies the language?
Ramses
12-02-2005, 12:04 AM
Ok, I will discribe it more precisely.
1. Create your content you want to have inside the module with a html editor in each language you need, say french and english in your case.
2. Now create a template based module with the content:
<tr>
<td class="$bgclass">
$vbphrase[guest_welcome]
</td>
</tr>
Bold is the phrase you need to create in the next step by yourself and you can choose a custom name as you like it to have, in my case the phrase is named: guest_welcome
2. Go to your admin control center to Languages & Phrases ---> Phrase Manager ---> than you click in the right frame on Add New Phrase
choose now:
Phrase Type: GLOBAL
Product: Vbulletin
Varname: guest_welcome (or what you want to name the phrase)
Text: here you need to put the english html content which you created before in step 1
in my case its looking:
<p><table border="0">
<tr>
<td>
<---- your html content in english here---->
<br>
After this you put in the next field in your case I think it's french:
<p><table border="0">
<tr>
<td>
<---- your html content in french here---->
<br>
After that, click on the save button.
Your content in the module should now be shown in the language you choose.
klaush
12-03-2005, 06:21 AM
That i was looking for a hundred of years, Ramses.
Thanks for sharing!
Greetings
Klaus
vBulletin® v3.7.4, Copyright ©2000-2009, Jelsoft Enterprises Ltd.