///////////////////////////////////////////////////////////////////////////////
///////////////////////////////////////////////////////////////////////////////
// Customize these variables to your situation
///////////////////////////////////////////////////////////////////////////////
$phpbb_root_path = "./";
$phpEx = "php";
$translate_from = "english";
$translate_to = "nederlands";
// at present only 'main' and 'admin' are supported
$translate_file = "main";
$input_size = "70";
///////////////////////////////////////////////////////////////////////////////
?>
phpBB 2.0 Language translation tool
phpBB 2.0 Language Translation Tool
";
print "";
print "
";
print "";
}
else
{
$file = file($phpbb_root_path . 'language/lang_' . $translate_from . '/lang_' . $translate_file . '.' . $phpEx);
$file_text = implode('', $file);
while (list($key, $value) = each($HTTP_POST_VARS))
{
if ($key != 'submit')
{
if ( strpos($key, '__') )
{
list($first, $second) = explode('__', $key);
if ( eregi('^[0-9]+$', $second) )
{
$variable = "\$lang['$first'][$second]";
}
else
{
$variable = "\$lang['$first']['$second']";
}
}
else
{
$variable = "\$lang['$key']";
}
$value = str_replace('\\\'', '\'', $value);
$variable = preg_quote($variable);
$search = "/(".$variable.") \=[ ]+\"(.*)\"/";
$file_text = preg_replace($search, "\\1 = \"$value\"", $file_text);
}
}
print "\n";
print "
Copy-paste all text above into notepad, save it and upload to the right dir.";
}
?>