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
|