'.$code.' '; if ($c) { print $c.' translations '.$type; print '

'; foreach($missing as $key) { print $key.'
'; } } else { print 'complete'; } print '

'; } function getlangs(&$tooltipLangs) { global $LANGDIR; if ($dh = opendir($LANGDIR)) { while (($file = readdir($dh)) !== false) { if(preg_match("/(.*)\.php$/",$file,$matches)) { $langs[]=$matches[1]; if(substr($file, -16) == "withtooltips.php") { $tooltipLangs[] = $matches[1]; } } } closedir($dh); } else { print "could not open language directory $LANGDIR"; exit; } return $langs; } function loadlang($code) { global $LANGDIR; include($LANGDIR.'/'.$code.'.php'); return $lang; } foreach(getlangs($tooltipLangs) as $code) if ($base_lang !== $code) { $foreign = loadlang($code); $missing = array(); $identical = array(); $useLang = $lang; foreach (array_keys($useLang) as $key) { if(empty($foreign[$key])) { $missing[]=$key; } if ($useLang[$key] == $foreign[$key]) { $identical[] = $key; } } printlang($missing, $code, 'missing'); if ($_GET['copycheck']) printlang($identical, $code, 'identical'); } ?>