getURL() . '#plugins' : $_REQUEST['redir']; # -- Get settings -- $core->blog->settings->addNamespace('translater'); $s = $core->blog->settings->translater; $translater = new dcTranslater($core); $combo_backup_limit = [ 5 => 5, 10 => 10, 15 => 15, 20 => 20, 40 => 40, 60 => 60 ]; $combo_backup_folder = [ 'module' => __('locales folders of each module'), 'plugin' => __('plugins folder root'), 'public' => __('public folder root'), 'cache' => __('cache folder of Dotclear'), 'translater' =>__('locales folder of translater') ]; $combo_start_page = [ 'modules_plugin' => __('Plugins'), 'modules_theme' => __('Themes'), 'pack' => __('Import/Export') ]; # -- Set settings -- if (!empty($_POST['save'])) { try { if (empty($_POST['translater_write_po']) && empty($_POST['translater_write_langphp'])) { throw new Exception('You must choose one file format at least'); } foreach($translater->getDefaultSettings() as $k => $v) { $translater->setSetting($k, (isset($_POST['translater_' . $k]) ? $_POST['translater_' . $k] : '')); } foreach($translater->proposal->getTools() AS $k => $v) { $v->save(); } dcPage::addSuccessNotice( __('Configuration has been successfully updated.') ); http::redirect( $list->getURL('module=translater&conf=1&redir=' . $list->getRedir()) ); } catch (Exception $e) { $core->error->add(sprintf($errors[$action], $e->getMessage())); } } # -- Display form -- echo '

' . __('Translation') . '


' . form::field('translater_parse_userinfo', 65, 255, $translater->parse_userinfo) . '

' . __('Tools') . '

' . __('Select and configure the tool to use to translate strings:') . '

'; foreach($translater->proposal->getTools() AS $k => $v) { $form = $v->form(); echo '
' . (empty($form) ? '

' . sprintf(__('Nothing to configure for %s tool . '), $v->getName()) . '

' : $form ) . '
'; } echo '

' . __('Import/Export') . '

' . __('Backups') . '

' . __('Behaviors') . '

';