The language switcher extension seems to be exactly what I need. However, when I upload it, my CP extension page goes blank. I tried some trial and error of removing bits of code, and it shows up properly in the extension page when I remove this part:
function switch_language($this)
{
global $IN, $DB;
if(isset($IN->global_vars['language'])) {
$curr_lang = $this->userdata['language'];
$glob_lang = $IN->global_vars['language'];
$mem_id = $this->userdata['member_id'];
if ($glob_lang != $curr_lang) $DB->query("UPDATE exp_members SET language = '$glob_lang' WHERE member_id = '$mem_id'");
}
}Of course, that’s the part that makes it work… 😊 Any idea what’s happening here?
Packet Tide owns and develops ExpressionEngine. © Packet Tide, All Rights Reserved.