output($output); unset($output); output("Now extracting phrases from the folders!\n"); exec('php ./lang_extract.php ../conf ../cron ../framework ../install ../themes', $output); output($output); unset($output); //Update each language file based on default language and then attempt to translate // Initialize the exponent environment and language subsystem include_once '../exponent_bootstrap.php'; expLang::loadLang(); global $default_lang, $cur_lang; if (empty($default_lang)) { $default_lang = (include BASE . "framework/core/lang/English - US.php"); } $orig_lang = LANG; $lang_list = expLang::langList(); foreach ($lang_list as $key => $value) { if ($key != "English - US") { output("Now attempting to translate new " . $key . " phrases\n"); expSettings::change('LANGUAGE', $key); exec('php ./lang_translate.php', $output); output($output); unset($output); } } expSettings::change('LANGUAGE', $orig_lang); print "\nCompleted Updating the Exponent Language System!\n"; function output($text) { if (!is_array($text)) { $text = array($text);
<?php if (!defined('LANGUAGE')) { if (empty($_POST['sc']['LANGUAGE'])) { $_POST['sc']['LANGUAGE'] = 'English - US'; } define('LANGUAGE', $_POST['sc']['LANGUAGE']); } ?> <form method="post" action="index.php"> <!-- send us to the next page --> <input type="hidden" name="page" value="install-1" /> <div class="control"> <select name="lang" onChange="Refresh(this.value)"> <?php foreach (expLang::langList() as $currid => $currlang) { ?> <option value="<?php echo $currid; ?> "<?php if ($currid == LANGUAGE) { echo " selected"; } ?> ><?php echo $currlang; ?> </option> <?php }
public function configure_site() { expHistory::set('manageable', $this->params); // TYPES OF ANTISPAM CONTROLS... CURRENTLY ONLY ReCAPTCHA $as_types = array('0' => '-- ' . gt('Please Select an Anti-Spam Control') . ' --', "recaptcha" => 'reCAPTCHA'); //THEMES FOR RECAPTCHA $as_themes = array("red" => gt('DEFAULT RED'), "white" => gt('White'), "blackglass" => gt('Black Glass'), "clean" => gt('Clean (very generic)')); // Available Themes $themes = array(); if (is_readable(BASE . 'themes')) { $theme_dh = opendir(BASE . 'themes'); while (($theme_file = readdir($theme_dh)) !== false) { if (is_readable(BASE . 'themes/' . $theme_file . '/class.php')) { // Need to avoid the duplicate theme problem. if (!class_exists($theme_file)) { include_once BASE . 'themes/' . $theme_file . '/class.php'; } if (class_exists($theme_file)) { // Need to avoid instantiating non-existent classes. $t = new $theme_file(); $themes[$theme_file] = $t->name(); } } } } uasort($themes, 'strnatcmp'); // Available Languages $langs = expLang::langList(); // ksort($langs); // smtp protocol $protocol = array('ssl' => 'SSL', 'tls' => 'TLS'); // attribution $attribution = array('firstlast' => 'John Doe', 'lastfirst' => 'Doe, John', 'first' => 'John', 'username' => 'jdoe'); // These funcs need to be moved up in to new subsystems // Date/Time Format $datetime_format = expSettings::dropdownData('datetime_format'); // Date Format $date_format = expSettings::dropdownData('date_format'); // Time Format $time_format = expSettings::dropdownData('time_format'); // Start of Week $start_of_week = expSettings::dropdownData('start_of_week'); // File Permissions $file_permisions = expSettings::dropdownData('file_permissions'); // File Permissions $dir_permissions = expSettings::dropdownData('dir_permissions'); // Homepage Dropdown $section_dropdown = navigationmodule::levelDropDownControlArray(0); // Timezone Dropdown $list = DateTimeZone::listAbbreviations(); $idents = DateTimeZone::listIdentifiers(); $data = $offset = $added = array(); foreach ($list as $abbr => $info) { foreach ($info as $zone) { if (!empty($zone['timezone_id']) and !in_array($zone['timezone_id'], $added) and in_array($zone['timezone_id'], $idents)) { $z = new DateTimeZone($zone['timezone_id']); $c = new DateTime(null, $z); $zone['time'] = $c->format('H:i a'); $data[] = $zone; $offset[] = $z->getOffset($c); $added[] = $zone['timezone_id']; } } } array_multisort($offset, SORT_ASC, $data); $tzoptions = array(); foreach ($data as $key => $row) { $tzoptions[$row['timezone_id']] = self::formatOffset($row['offset']) . ' ' . $row['timezone_id']; } assign_to_template(array('as_types' => $as_types, 'as_themes' => $as_themes, 'themes' => $themes, 'langs' => $langs, 'protocol' => $protocol, 'attribution' => $attribution, 'datetime_format' => $datetime_format, 'date_format' => $date_format, 'time_format' => $time_format, 'start_of_week' => $start_of_week, 'timezones' => $tzoptions, 'file_permisions' => $file_permisions, 'dir_permissions' => $dir_permissions, 'section_dropdown' => $section_dropdown)); }