An additional note should say, that it is not needed for XOOPS versions from 2.4.0 and higher.
Try by replacing all $langs by $GLOBALS['langs'] in both files.
Upgraded to preload version and hack for php5.2 but still doesn't work.
I think the unset for it can be put in comments:
The admin interface can give weights to the languages.
To view them weighted, you need to change in /class/language.php:
$sql = 'SELECT * FROM '.$this->db->prefix($prefix);
$sql = 'SELECT * FROM '.$this->db->prefix($prefix).' ORDER BY weight';
Because the language switching links can be someting as server/isomefile.php?someoption=somevalue&lang=nl some systems (at eg Google) may get confused and accidentily (also erronnous) take this as the html lang entity ⟨, which make an ugly character (〈) in your URL, which make them to arrive on another pages than intented.
To avoid this alter the definition for the query field to:
if(!defined('XLANGUAGE_LANG_TAG')) define('XLANGUAGE_LANG_TAG', "xlang");