I've created a script that will help you with this. It will loop through your language files and simply include them one-by-one. If there is a parse error, the script ends and the error is displayed. If everything goes fine, you get a confirmation message.
Save this file as "include_lang.php" and put it into the root of the board. Then run it by visiting the file in your webbrowser. Note: use it at your own risk!
Code: Select all
<?php
/**
*
* @package phpbbmodders
* @version $Id$
* @copyright (c) 2008 phpbbmodders.net
* @license http://opensource.org/licenses/gpl-license.php GNU Public License
*
*/
/**
* @ignore
*/
define('IN_PHPBB', true);
$phpbb_root_path = (defined('PHPBB_ROOT_PATH')) ? PHPBB_ROOT_PATH : './';
$phpEx = substr(strrchr(__FILE__, '.'), 1);
include($phpbb_root_path . 'common.' . $phpEx);
/**
* this script will include all your language files
* this makes it easier to discover parse errors
*/
if ($files = scandir($phpbb_root_path . 'language/'))
{
foreach ($files as $file)
{
if (in_array($file, array('.', '..', '.svn'), true) || is_file($phpbb_root_path . 'language/' . $file))
{
continue;
}
include_lang($phpbb_root_path . 'language/' . $file . '/');
}
}
trigger_error('All language files seem to be intact.');
/**
* recursive function to include language files
*/
function include_lang($folder)
{
global $phpEx;
if ($files = scandir($folder))
{
foreach ($files as $file)
{
if (in_array($file, array('.', '..', '.svn'), true))
{
continue;
}
if (is_file($folder . $file) && substr(strrchr($file, '.'), 1) === $phpEx)
{
include($folder . $file);
}
else if (is_dir($folder . $file))
{
include_lang($folder . $file . '/');
}
}
}
}
?>