'.PageLink2('checki18n&changedonly=yes','Show changes only').'

'; # translation check. See that every token has a text in a file and vv function getFileI18Ntags($file) { $res = array(); if (!is_file($file)) return $res; $fd = fopen ($file, "r"); $contents = fread ($fd, filesize ($file)); fclose ($fd); preg_match_all('/\$GLOBALS\[(["|\'])I18N\1\]->get\((["|\'])([^\2]+)\2\)/Uim', $contents, $globalsi18ntags); preg_match_all('/\$I18N->get\((["|\'])([^\1]+)\1\)/Uim', $contents, $i18ntags); for ($i=0; $i< count($globalsi18ntags[0]); $i++) { array_push($res,$globalsi18ntags[3][$i]); } for ($i=0; $i< count($i18ntags[0]); $i++) { array_push($res,$i18ntags[2][$i]); } return $res; } function checkI18NDir($rootdir) { $dir = opendir($rootdir); while ($file = readdir($dir)) { $fileoutput = ''; $some = 0; if (is_file($rootdir.'/'.$file)) { $fileoutput .= '

'.$file."


"; $arr = getFileI18Ntags($rootdir.'/'.$file); $lan = array(); # include 'lan/en/'.$file; switch ($file) { case 'send_core.php': $_GET['page'] = 'send';break; case 'importcsv.php': $_GET['page'] = 'import2';break; default: $_GET['page'] = basename($file,'.php'); } /* $page = $_GET['page']; include_once dirname(__FILE__)."/lan/".$_SESSION['adminlanguage']['iso']."/pagetitles.php"; if (!strtolower($page_title) === 'phplist') { print "No page title: $page
"; } else { print "Page title: $page, $page_title
"; } */ foreach ($arr as $tag) { # $tag = ereg_replace('/','//',$tag); $translation = $GLOBALS['I18N']->get(stripslashes($tag)); if (!isset($_GET['changedonly']) || ($_GET['changedonly'] === 'yes' && preg_match('/ff1717/i',$translation))) { $fileoutput .= "'".$tag.'\' => \''.$translation.'\',
'; $some = 1; } } if ($some) { print $fileoutput; } # print "RES: $tag
"; # } # if (!in_array($tag,$lan)) { # print "Missing: $tag
"; # } else { # print "Exists: $tag
"; # } # } } } } /* print ' Select All
'; #print '
'; print ''; print '
';