I was actually writing this for a completely different reason (and even method...), but I thought this would be useful when writing modifications or new mod files.
Please note that while I am giving you the code, this is not released under the GPL. Do not redistribute it.
<?php// Language file checker, version 1.0.// Copyright 2003 by [Unknown]. All rights reserved. Do not redistribute without permission.$cwd = dirname(__FILE__);// Change this to the language file you want to test.$language_file = $cwd . '/english.lng';define('YaBBSE', 1);require ($language_file);$sd = dir($cwd . '/Sources');while ($entry = $sd->read()){ if (is_file($cwd . '/Sources/' . $entry) && $entry != 'index.php' && $entry != 'gpl.txt') $file_list[] = $cwd . '/Sources/' . $entry;}$sd->close();$file_list[] = $cwd . '/SSI.php';$file_list[] = $cwd . '/help.php';$file_list[] = $cwd . '/Printpage.php';$file_list[] = $cwd . '/Reminder.php';$txt_used = array();foreach ($file_list as $file){ $full = implode('', file($file)); preg_match_all('/\$txt\[(?:\')?([^\]]+?)(?:\')?\]/i', $full, $matches); foreach ($matches[1] as $text) if (!isset($txt[$text])) { if (!isset($txt_used[$text])) $txt_used[$text] = array(basename($file)); elseif (!in_array(basename($file), $txt_used[$text])) $txt_used[$text][] = basename($file); }}ksort($txt_used);echo '<pre>';print_r($txt_used);echo '</pre>';?>
-[Unknown]