Hello everybody. please excuse my poor english. When I try and open your file, here's what it shows :
// Version 1.1.0 /////////////////////////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////////////////////////// // Customize these variables to your situation /////////////////////////////////////////////////////////////////////////////// $phpbb_root_path = "./"; $phpEx = "php"; $translate_from = "french"; $translate_to = "breton"; // at present only 'main' and 'admin' are supported $translate_file = "main"; $input_size = "70"; /////////////////////////////////////////////////////////////////////////////// ?>
phpBB 2.0 Language Translation Tool
"; print ""; @reset($lang_from); while ( list($key, $value) = each($lang_from) ) { if ( is_array($value) ) { while ( list($key2, $value2) = each($value) ) { $value2 = htmlspecialchars($value2); $translation = htmlspecialchars($lang_to["$key"]["$key2"]); $name = $key . "__" . str_replace('.', '_', $key2); $class = ($translation != '' ? '' : ' class="red"'); print "\n"; } } else { $value = htmlspecialchars($value); $value = str_replace("<br />", "<br />
", $value); $strlen = ($lang_to[$key] != "" ? strlen($lang_to[$key]) : strlen($value)); $rows = floor($strlen / $input_size) + 1; $translation = htmlspecialchars($lang_to["$key"]); $class = ($translation != '' ? '' : ' class="red"'); if ( $rows > 1 ) { print "\n"; } else { print "\n"; } } flush(); } print "
$value2
$value
$value
"; 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); $second = str_replace('_', '.', $second); $variable = "\$lang['$first']['$second']"; } else { $variable = "\$lang['$key']"; } $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."; } ?>
There are also a few fiels that haven't been copied...