Nu vermoed ik dat het aan te passen is in admin_lang_extend.php, en dan in een van de volgende drie functies
Code: Selecteer alles
function lang_extend_get_countries()
{
global $phpbb_root_path, $phpEx;
// get all countries installed
$countries = array();
$dir = @opendir($phpbb_root_path . './language');
while ( $file = @readdir($dir) )
{
if ( preg_match('#^lang_#i', $file) && !is_file($phpbb_root_path . './language/' . $file) && !is_link($phpbb_root_path . './language/' . $file) )
{
$filename = trim( str_replace('lang_', '', $file) );
$displayname = preg_replace("/^(.*?)_(.*)$/", "\\1 [ \\2 ]", $filename);
$displayname = preg_replace("/\[(.*?)_(.*)\]/", "[ \\1 - \\2 ]", $displayname);
$countries[$file] = ucfirst($displayname);
}
}
@closedir($dir);
@asort($countries);
return $countries;
}
function lang_extend_get_packs()
{
global $phpbb_root_path, $phpEx;
global $countries;
// get all the extensions installed
$packs = array();
@reset($countries);
while ( list($country_dir, $country_name) = @each($countries) )
{
$dir = @opendir( $phpbb_root_path . './language/' . $country_dir );
while ( $file = @readdir($dir) )
{
if( preg_match("/^lang_extend_.*?\." . $phpEx . "$/", $file) )
{
$displayname = trim( str_replace(".$phpEx", '', str_replace('lang_extend_', '', $file)) );
$packs[$file] = $displayname;
}
}
@closedir($dir);
}
$packs['lang'] = '_phpBB';
$packs['custom'] = '_custom';
@asort($packs);
return $packs;
}
function lang_extend_read_one_pack($country_dir, $pack_file, &$entries)
{
global $phpbb_root_path, $phpEx;
global $countries, $packs;
// get filename
$file = $phpbb_root_path . './language/' . $country_dir . '/' . $pack_file;
// process first admin then standard keys
for ( $i=0; $i < 2; $i++ )
{
$lang_extend_admin = ($i==0);
// fix the filename for standard keys
if ($pack_file == 'lang')
{
$file = $phpbb_root_path . './language/' . $country_dir . '/' . ($lang_extend_admin ? 'lang_admin.' : 'lang_main.') . $phpEx;
}
// fix the filename for custom keys
if ($pack_file == 'custom')
{
$file = $phpbb_root_path . './language/' . $country_dir . '/' . 'lang_extend.' . $phpEx;
}
// process
$lang = array();
@include($file);
@reset($lang);
while ( list($key_main, $data) = @each($lang) )
{
$custom = ($pack_file == 'custom');
$first = !is_array($data);
while ( ( is_array($data) && (list($key_sub, $value) = @each($data)) ) || $first )
{
$first = false;
if ( !is_array($data) )
{
$key_sub = '';
$value = $data;
}
$pack = $pack_file;
$original = '';
if ( $custom && isset($entries['pack'][$key_main][$key_sub]) )
{
$pack = $entries['pack'][$key_main][$key_sub];
$original = $entries['pack'][$key_main][$key_sub][$country_dir];
}
$entries['pack'][$key_main][$key_sub] = $pack;
$entries['value'][$key_main][$key_sub][$country_dir] = $value;
$entries['original'][$key_main][$key_sub][$country_dir] = $original;
$entries['admin'][$key_main][$key_sub] = $lang_extend_admin;
// status : 0=original, 1=modified, 2=added
$entries['status'][$key_main][$key_sub][$country_dir] = ( !$custom ? 0 : ( ($pack != $pack_file) ? 1 : 2 ) );
}
}
}
}