Are you sure you added the extra global variables to the send_footer function? The name of the language would come from the cookies, which don't normally work in the footer.
I'd double check your instructions for ubbt.inc.php - particularly the steps in the send_footer function. Make sure you're adding these:
$dbh,${$config['cookieprefix']."w3t_language"},
to the global call in send_footer.
