while (($data = fgetcsv($handle, 1000, ';')) !== FALSE) { if (!isset($data[0]) || !isset($data[1])) { var_dump($data); } $conversion_list[$data[0]] = $data[1]; } fclose($handle); } else { exit('Cannot open conversion file (conversion_18_to_19.csv).'); } echo '<ol>' . "\n"; foreach ($languageToBuild as $language) { $nb_update = 0; echo '<li>' . $language; // open and parse old language file $language_list = load_array_translation($language); // convert file echo '<ol>' . "\n"; foreach ($conversion_list as $old_value => $new_value) { if (isset($language_list[$old_value])) { $language_list[$new_value] = $language_list[$old_value]; unset($language_list[$old_value]); echo '<li>Rename ' . $old_value . ' to ' . $new_value . '</li>' . "\n"; $nb_update++; } else { echo '<li><em>Not found :</em> ' . $old_value . '</li>' . "\n"; } } echo '</ol>' . "\n"; // Write new file if ($nb_update > 0) {
// Authors: see 'credits' file //---------------------------------------------------------------------- /** * This stupid script just display all translation for a language. * This used to be copy paste into a checkspeller */ $cleanInput = array(); require '../../../../inc/claro_init_global.inc.php'; // Security check if (!$_uid) { claro_disp_auth_form(); } if (!$is_platformAdmin) { claro_die(get_lang('Not allowed')); } /* * This script displays all the variables * with the same content and a different name. */ // include configuration and library file include 'language.conf.php'; require_once 'language.lib.php'; // get start time $starttime = get_time(); $cleanInput['lang'] = $_REQUEST['lang']; if (false !== $cleanInput['lang']) { $cleanInput['translation'] = load_array_translation($cleanInput['lang']); foreach ($cleanInput['translation'] as $translation) { echo $translation . '<hr />' . "\n"; } }