well I was looking for the same solution...
What i did
i placed a flag on the page and
linked it with the following code:
PHP Code:
<a href="javascript:switch_lang(1);"><img src="images/flag_english.gif" border=0 /></a>
in switch_lang(1) the 1 is your language id corresponding to the language..
you have to change it for the language corresponding to the flag !!!!!
then open forum/clientscript/vbulletin_global.js
in there find:
PHP Code:
function switch_id(selectobj, type)
and
ABOVE add:
PHP Code:
function switch_lang(language)
{
var id = language;
if (id == '')
{
return;
}
var url = new String(window.location);
var fragment = new String('');
// get rid of fragment
url = url.split('#');
// deal with the fragment first
if (url[1])
{
fragment = '#' + url[1];
}
// deal with the main url
url = url[0];
// remove id=x& from main bit
if (url.indexOf('langid=') != -1 && is_regexp)
{
re = new RegExp("langid=\\d+&?");
url = url.replace(re, '');
}
// add the ? to the url if needed
if (url.indexOf('?') == -1)
{
url += '?';
}
else
{
// make sure that we have a valid character to join our id bit
lastchar = url.substr(url.length - 1);
if (lastchar != '&' && lastchar != '?')
{
url += '&';
}
}
window.location = url + 'langid=' + id + fragment;
}
I hope that helps
Felix