7define(
"ILIAS_LANGUAGE_MODULE", 
"Services/Language");
 
    9require_once(
"./Services/Object/classes/class.ilObjectGUI.php");
 
   10require_once(
"Services/Language/classes/class.ilObjLanguageAccess.php");
 
   40    public function __construct($a_data, $a_id = 0, $a_call_by_reference = 
false)
 
   43        $ilClientIniFile = 
$DIC->clientIni();
 
   48        $lng->loadLanguageModule(
"administration");
 
   49        $lng->loadLanguageModule(
"meta");
 
   52        $ilCtrl->saveParameter($this, 
"view_mode");
 
   56        if (!$this->
id = 
$_GET[
'obj_id']) {
 
   61        parent::__construct($a_data, $this->
id, 
false, 
true);
 
   64        if (!is_array(
$_SESSION[
'lang_ext_maintenance'])) {
 
   65            $_SESSION[
'lang_ext_maintenance'] = array();
 
   67        $this->session = &
$_SESSION[
'lang_ext_maintenance'];
 
   71        $this->langmode = $ilClientIniFile->readVariable(
"system", 
"LANGMODE");
 
   83        require_once(
"Services/Language/classes/class.ilObjLanguageExt.php");
 
  102        $ilHelp = 
$DIC->help();
 
  105            $this->ilErr->raiseError($this->lng->txt(
"permission_denied"), $this->ilErr->MESSAGE);
 
  109        $cmd = $this->ctrl->getCmd(
"view") . 
"Object";
 
  112        $ilHelp->setScreenIdComponent(
"lng");
 
  132        include_once 
'./Services/Language/classes/class.ilLanguageExtTableGUI.php';
 
  134            'langmode' => $this->langmode,
 
  135            'lang_key' => $this->object->key,
 
  153        $comments = $this->
object->getAllRemarks();
 
  157        $compare = $table_gui->getFilterItemByPostVar(
'compare')->getValue();
 
  158        if ($compare == $this->object->key) {
 
  159            $compare_object = $this->
object->getGlobalLanguageFile();
 
  160            $compare_content = $compare_object->getAllValues();
 
  161            $compare_comments = $compare_object->getAllComments();
 
  172            if (
$_GET[
'reset_offset']) {
 
  173                $table_gui->resetOffset();
 
  176            if (!isset($compare_content)) {
 
  194            foreach ($translations as 
$name => $translation) {
 
  195                $keys = explode($this->lng->separator, 
$name);
 
  196                $db_found[] = 
$keys[1];
 
  198            $missing_entries = array_diff($topics, $db_found);
 
  203            $filter_mode = $table_gui->getFilterItemByPostVar(
'mode')->getValue();
 
  204            $filter_pattern = $table_gui->getFilterItemByPostVar(
'pattern')->getValue();
 
  205            $filter_module = $table_gui->getFilterItemByPostVar(
'module')->getValue();
 
  206            $filter_module = $filter_module == 
'all' ? 
'' : $filter_module;
 
  207            $filter_modules = $filter_module ? array($filter_module) : array();
 
  208            $filter_identifier = $table_gui->getFilterItemByPostVar(
'identifier')->getValue();
 
  209            $filter_topics = $filter_identifier ? array($filter_identifier) : array();
 
  211            if (!isset($compare_content)) {
 
  221            switch ($filter_mode) {
 
  223                    $translations = $this->
object->getChangedValues(
 
  231                    $translations = $this->
object->getAddedValues(
 
  239                    $translations = $this->
object->getUnchangedValues(
 
  247                    $translations = $this->
object->getCommentedValues(
 
  255                    $translations = $this->
object->getAllValues(
 
  261                    $translations = array_intersect_key($translations, $comments);
 
  265                    $translations = $this->
object->getAllValues(
 
  271                    $translations = array_intersect_assoc($translations, $compare_content);
 
  275                    $translations = $this->
object->getAllValues(
 
  281                    $translations = array_diff_assoc($translations, $compare_content);
 
  285                    $former_file = $this->
object->getDataPath() . 
'/ilias_' . $this->
object->key . 
'.lang';
 
  286                    if (!is_readable($former_file)) {
 
  288                                        . 
'<br />' . $this->lng->txt(
"language_former_file_description"), 
false);
 
  289                        $translations = array();
 
  292                    $global_file_obj = $this->
object->getGlobalLanguageFile();
 
  294                    $former_file_obj->read();
 
  295                    $global_changes = array_diff_assoc(
 
  296                        $global_file_obj->getAllValues(),
 
  297                        $former_file_obj->getAllValues()
 
  299                    if (!count($global_changes)) {
 
  300                        ilUtil::sendInfo(sprintf($this->lng->txt(
"language_former_file_equal"), $former_file)
 
  301                                        . 
'<br />' . $this->lng->txt(
"language_former_file_description"), 
false);
 
  302                        $translations = array();
 
  305                    $translations = $this->
object->getChangedValues(
 
  311                    $translations = array_intersect_key($translations, $global_changes);
 
  316                    $translations = $this->
object->getAllValues(
 
  326        foreach ($translations as 
$name => $translation) {
 
  327            $keys = explode($this->lng->separator, 
$name);
 
  333            $row[
"translation"] = $translation;
 
  335            $row[
"default"] = $compare_content[
$name];
 
  336            $row[
"default_comment"] = $compare_comments[
$name];
 
  342        $table_gui->setData(
$data);
 
  343        $tpl->setContent($table_gui->getHTML() .
 
  344            $this->buildMissingEntries($missing_entries));
 
  353        $table_gui->writeFilterToSession();    
 
  354        $table_gui->resetOffset();             
 
  364        $table_gui->resetOffset();                
 
  365        $table_gui->resetFilter();                
 
  375        $save_array = array();
 
  376        $remarks_array = array();
 
  380            $key = str_replace(
'_POSTDOT_', 
'.', 
$key);
 
  381            $key = str_replace(
'_POSTSPACE_', 
' ', 
$key);
 
  387            if (count(
$keys) == 2) {
 
  389                $value = preg_replace(
"/(\015\012)|(\015)|(\012)/", 
"<br />", $value);
 
  391                $save_array[
$key] = $value;
 
  394                $remarks_array[
$key] = 
$_POST[
$key . $this->lng->separator . 
"comment"];
 
  411        require_once(
"./Services/Form/classes/class.ilPropertyFormGUI.php");
 
  413        $form->setFormAction($this->ctrl->getFormAction($this));
 
  414        $form->setTitle($this->lng->txt(
"language_import_file"));
 
  415        $form->addCommandButton(
'upload', $this->lng->txt(
"upload"));
 
  421        $ro = 
new ilRadioOption($this->lng->txt(
"language_mode_existing_keepall"), 
"keepall");
 
  422        $ro->setInfo($this->lng->txt(
"language_mode_existing_keepall_info"));
 
  424        $ro = 
new ilRadioOption($this->lng->txt(
"language_mode_existing_keepnew"), 
"keepnew");
 
  425        $ro->setInfo($this->lng->txt(
"language_mode_existing_keepnew_info"));
 
  427        $ro = 
new ilRadioOption($this->lng->txt(
"language_mode_existing_replace"), 
"replace");
 
  428        $ro->setInfo($this->lng->txt(
"language_mode_existing_replace_info"));
 
  430        $ro = 
new ilRadioOption($this->lng->txt(
"language_mode_existing_delete"), 
"delete");
 
  431        $ro->setInfo($this->lng->txt(
"language_mode_existing_delete_info"));
 
  433        $rg->setValue($this->session[
"import"][
"mode_existing"] ? $this->session[
"import"][
"mode_existing"] : 
"keepall");
 
  436        $this->tpl->setContent(
$form->getHTML());
 
  451            $upload = 
$DIC->upload();
 
  454            if (!$upload->hasUploads()) {
 
  455                throw new ilException(
$DIC->language()->txt(
"upload_error_file_not_found"));
 
  457            $UploadResult = $upload->getResults()[$_FILES[
'userfile'][
'tmp_name']];
 
  459            $ProcessingStatus = $UploadResult->getStatus();
 
  460            if ($ProcessingStatus->getCode() === ProcessingStatus::REJECTED) {
 
  461                throw new ilException($ProcessingStatus->getMessage());
 
  466            $upload->moveOneFileTo($UploadResult, 
'', Location::TEMPORARY, basename($tempfile), 
true);
 
  467            $this->
object->importLanguageFile($tempfile, 
$_POST[
'mode_existing']);
 
  469            $tempfs = 
$DIC->filesystem()->temp();
 
  470            $tempfs->delete(basename($tempfile));
 
  471        } 
catch (Exception $e) {
 
  473            $this->ctrl->redirect($this, 
'import');
 
  476        ilUtil::sendSuccess(sprintf($this->lng->txt(
"language_file_imported"), $_FILES[
'userfile'][
'name']), 
true);
 
  477        $this->ctrl->redirect($this, 
'import');
 
  486        require_once(
"./Services/Form/classes/class.ilPropertyFormGUI.php");
 
  488        $form->setFormAction($this->ctrl->getFormAction($this));
 
  489        $form->setTitle($this->lng->txt(
"language_export_file"));
 
  490        $form->setPreventDoubleSubmission(
false);
 
  491        $form->addCommandButton(
'download', $this->lng->txt(
"download"));
 
  494        $ro = 
new ilRadioOption($this->lng->txt(
"language_scope_global"), 
"global");
 
  495        $ro->setInfo($this->lng->txt(
"language_scope_global_info"));
 
  497        $ro = 
new ilRadioOption($this->lng->txt(
"language_scope_local"), 
"local");
 
  498        $ro->setInfo($this->lng->txt(
"language_scope_local_info"));
 
  500        if ($this->langmode) {
 
  501            $ro = 
new ilRadioOption($this->lng->txt(
"language_scope_added"), 
"added");
 
  502            $ro->setInfo($this->lng->txt(
"language_scope_added_info"));
 
  505        $ro = 
new ilRadioOption($this->lng->txt(
"language_scope_unchanged"), 
"unchanged");
 
  506        $ro->setInfo($this->lng->txt(
"language_scope_unchanged_info"));
 
  508        if ($this->langmode) {
 
  509            $ro = 
new ilRadioOption($this->lng->txt(
"language_scope_merged"), 
"merged");
 
  510            $ro->setInfo($this->lng->txt(
"language_scope_merged_info"));
 
  514        $rg->setValue($this->session[
"export"][
"scope"] ? $this->session[
"export"][
"scope"] : 
"global");
 
  517        $this->tpl->setContent(
$form->getHTML());
 
  529        $filename = 
'ilias_' . $this->
object->key . 
'_' 
  531        . 
"-" . date(
'Y-m-d')
 
  532        . 
".lang." . $this->session[
"export"][
"scope"];
 
  534        $global_file_obj = $this->
object->getGlobalLanguageFile();
 
  537        if (
$_POST[
"scope"] == 
'global') {
 
  538            $local_file_obj->setParam(
"author", $global_file_obj->getParam(
'author'));
 
  539            $local_file_obj->setParam(
"version", $global_file_obj->getParam(
'version'));
 
  540            $local_file_obj->setAllValues($this->object->getAllValues());
 
  541            if ($this->langmode) {
 
  542                $local_file_obj->setAllComments($this->object->getAllRemarks());
 
  544        } elseif (
$_POST[
"scope"] == 
'local') {
 
  545            $local_file_obj->setParam(
"based_on", $global_file_obj->getParam(
'version'));
 
  546            $local_file_obj->setAllValues($this->object->getChangedValues());
 
  547            if ($this->langmode) {
 
  548                $local_file_obj->setAllComments($this->object->getAllRemarks());
 
  550        } elseif (
$_POST[
"scope"] == 
'added') { 
 
  551            $local_file_obj->setParam(
"author", $global_file_obj->getParam(
'author'));
 
  552            $local_file_obj->setParam(
"version", $global_file_obj->getParam(
'version'));
 
  553            $local_file_obj->setAllValues($this->object->getAddedValues());
 
  554            $local_file_obj->setAllComments($this->object->getAllRemarks());
 
  555        } elseif (
$_POST[
"scope"] == 
'unchanged') {
 
  556            $local_file_obj->setParam(
"author", $global_file_obj->getParam(
'author'));
 
  557            $local_file_obj->setParam(
"version", $global_file_obj->getParam(
'version'));
 
  558            $local_file_obj->setAllValues($this->object->getUnchangedValues());
 
  559            if ($this->langmode) {
 
  560                $local_file_obj->setAllComments($this->object->getAllRemarks());
 
  562        } elseif (
$_POST[
"scope"] == 
'merged') { 
 
  563            $local_file_obj->setParam(
"author", $global_file_obj->getParam(
'author'));
 
  564            $local_file_obj->setParam(
"version", $global_file_obj->getParam(
'version'));
 
  565            $local_file_obj->setAllValues($this->object->getMergedValues());
 
  566            $local_file_obj->setAllComments($this->object->getMergedRemarks());
 
  578        require_once(
"./Services/Form/classes/class.ilPropertyFormGUI.php");
 
  580        $form->setFormAction($this->ctrl->getFormAction($this));
 
  581        $form->setTitle($this->lng->txt(
"language_maintenance"));
 
  582        $form->setPreventDoubleSubmission(
false);
 
  583        $form->addCommandButton(
'maintainExecute', $this->lng->txt(
"language_process_maintenance"));
 
  586        $ro = 
new ilRadioOption($this->lng->txt(
"language_load_local_changes"), 
"load");
 
  587        $ro->setInfo(sprintf($this->lng->txt(
"language_load_local_changes_info"), $this->object->key));
 
  589        $ro = 
new ilRadioOption($this->lng->txt(
"language_clear_local_changes"), 
"clear");
 
  590        $ro->setInfo(sprintf($this->lng->txt(
"language_clear_local_changes_info"), $this->object->key));
 
  592        if ($this->langmode) {
 
  593            $ro = 
new ilRadioOption($this->lng->txt(
"language_delete_local_additions"), 
"delete_added");
 
  594            $ro->setInfo(sprintf($this->lng->txt(
"language_delete_local_additions_info"), $this->object->key));
 
  596            $ro = 
new ilRadioOption($this->lng->txt(
"language_remove_local_file"), 
"remove_local_file");
 
  597            $ro->setInfo(sprintf($this->lng->txt(
"language_remove_local_file_info"), $this->object->key));
 
  599            $ro = 
new ilRadioOption($this->lng->txt(
"language_merge_local_changes"), 
"merge");
 
  600            $ro->setInfo(sprintf($this->lng->txt(
"language_merge_local_changes_info"), $this->object->key));
 
  603        $ro = 
new ilRadioOption($this->lng->txt(
"language_save_dist"), 
"save_dist");
 
  604        $ro->setInfo(sprintf($this->lng->txt(
"language_save_dist_info"), $this->object->key));
 
  606        $rg->setValue($this->session[
"maintain"]);
 
  609        $this->tpl->setContent(
$form->getHTML());
 
  615        if (isset(
$_POST[
"maintain"])) {
 
  619        switch (
$_POST[
"maintain"]) {
 
  624                $orig_file = $this->
object->getLangPath() . 
'/ilias_' . $this->
object->key . 
'.lang';
 
  625                $copy_file = $this->
object->getDataPath() . 
'/ilias_' . $this->
object->key . 
'.lang';
 
  626                if (@copy($orig_file, $copy_file)) {
 
  627                    ilUtil::sendSuccess($this->lng->txt(
"language_saved_dist"), 
true);
 
  635                $lang_file = $this->
object->getCustLangPath() . 
'/ilias_' . $this->
object->key . 
'.lang.local';
 
  636                if (is_file($lang_file) and is_readable($lang_file)) {
 
  637                    $this->
object->importLanguageFile($lang_file, 
'replace');
 
  638                    $this->
object->setLocal(
true);
 
  639                    ilUtil::sendSuccess($this->lng->txt(
"language_loaded_local"), 
true);
 
  647                $lang_file = $this->
object->getLangPath() . 
'/ilias_' . $this->
object->key . 
'.lang';
 
  648                if (is_file($lang_file) and is_readable($lang_file)) {
 
  649                    $this->
object->importLanguageFile($lang_file, 
'delete');
 
  650                    $this->
object->setLocal(
false);
 
  651                    ilUtil::sendSuccess($this->lng->txt(
"language_cleared_local"), 
true);
 
  665                $orig_file = $this->
object->getLangPath() . 
'/ilias_' . $this->
object->key . 
'.lang';
 
  666                $copy_file = $this->
object->getCustLangPath() . 
'/ilias_' . $this->
object->key . 
'.lang';
 
  668                if (is_file($orig_file) and is_writable($orig_file)) {
 
  670                    @copy($orig_file, $copy_file);
 
  673                    $global_file_obj = $this->
object->getGlobalLanguageFile();
 
  674                    $global_file_obj->setAllValues($this->object->getMergedValues());
 
  675                    $global_file_obj->setAllComments($this->object->getMergedRemarks());
 
  676                    $global_file_obj->write();
 
  677                    ilUtil::sendSuccess($this->lng->txt(
"language_merged_global"), 
true);
 
  684            case "remove_local_file":
 
  685                $lang_file = $this->
object->getCustLangPath() . 
'/ilias_' . $this->
object->key . 
'.lang.local';
 
  687                if (!is_file($lang_file)) {
 
  688                    $this->
object->setLocal(
false);
 
  690                } elseif (@unlink($lang_file)) {
 
  691                    $this->
object->setLocal(
false);
 
  692                    ilUtil::sendSuccess($this->lng->txt(
"language_local_file_deleted"), 
true);
 
  699        $this->ctrl->redirect($this, 
"maintain");
 
  710        $translate_key = 
"lang_translate_" . $this->
object->key;
 
  715            ilUtil::sendSuccess($this->lng->txt(
"settings_saved"));
 
  717        $translate = 
$ilSetting->get($translate_key, 
false);
 
  719        require_once(
"./Services/Form/classes/class.ilPropertyFormGUI.php");
 
  721        $form->setFormAction($this->ctrl->getFormAction($this));
 
  722        $form->setTitle($this->lng->txt(
"language_settings"));
 
  723        $form->setPreventDoubleSubmission(
false);
 
  724        $form->addCommandButton(
'settings', $this->lng->txt(
"language_change_settings"));
 
  726        $ci = 
new ilCheckboxInputGUI($this->lng->txt(
"language_translation_enabled"), 
"translation");
 
  727        $ci->setChecked((
bool) $translate);
 
  728        $ci->setInfo($this->lng->txt(
"language_note_translation"));
 
  731        $this->tpl->setContent(
$form->getHTML());
 
  742        $total = array(
"module" => 
'',
"all" => 0,
"changed" => 0, 
"unchanged" => 0);
 
  743        foreach ($modules as 
$module) {
 
  746            $row[
'all'] = count($this->object->getAllValues(array(
$module)));
 
  747            $row[
'changed'] = count($this->object->getChangedValues(array(
$module)));
 
  754        $total[
'module'] = 
"<b>" . $this->lng->txt(
"language_all_modules") . 
"</b>";
 
  757        $total[
'unchanged'] = 
"<b>" . 
$total[
'unchanged'] . 
"</b>";
 
  761        include_once 
'Services/Table/classes/class.ilTable2GUI.php';
 
  763        $table_gui->setRowTemplate(
"tpl.lang_statistics_row.html", 
"Services/Language");
 
  764        $table_gui->setEnableTitle(
false);
 
  765        $table_gui->setEnableNumInfo(
false);
 
  766        $table_gui->setLimit(count(
$data));
 
  769        $table_gui->addColumn(ucfirst($this->lng->txt(
"module")), 
"", 
"25%");
 
  770        $table_gui->addColumn($this->lng->txt(
"language_scope_global"), 
"", 
"25%");
 
  771        $table_gui->addColumn($this->lng->txt(
"language_scope_local"), 
"", 
"25%");
 
  772        $table_gui->addColumn($this->lng->txt(
"language_scope_unchanged"), 
"", 
"25%");
 
  774        $table_gui->setData(
$data);
 
  776        $this->tpl->setContent($table_gui->getHTML());
 
  793            $this->tabs_gui->setBackTarget(
 
  794                $this->lng->txt(
'back'),
 
  795                $this->ctrl->getLinkTargetByClass(
'ilObjLanguageFolderGUI')
 
  798            $this->tabs_gui->addTab(
 
  800                $this->lng->txt(
"edit"),
 
  801                $this->ctrl->getLinkTarget($this, 
"view")
 
  804            $this->tabs_gui->addTab(
 
  806                $this->lng->txt(
'export'),
 
  807                $this->ctrl->getLinkTarget($this, 
"export")
 
  810            $this->tabs_gui->addTab(
 
  812                $this->lng->txt(
'import'),
 
  813                $this->ctrl->getLinkTarget($this, 
"import")
 
  816            $this->tabs_gui->addTab(
 
  818                $this->lng->txt(
'language_maintain'),
 
  819                $this->ctrl->getLinkTarget($this, 
"maintain")
 
  822            $this->tabs_gui->addTab(
 
  824                $this->lng->txt(
'settings'),
 
  825                $this->ctrl->getLinkTarget($this, 
"settings")
 
  828            $this->tabs_gui->addTab(
 
  830                $this->lng->txt(
"language_statistics"),
 
  831                $this->ctrl->getLinkTarget($this, 
"statistics")
 
  840                    $this->tabs_gui->activateTab(
'edit');
 
  843                    $this->tabs_gui->activateTab($cmd);
 
  856        $ilLocator = 
$DIC[
'ilLocator'];
 
  859            parent::addAdminLocatorItems(
true); 
 
  862                $this->lng->txt(
"languages"),
 
  863                $this->ctrl->getLinkTargetByClass(
"ilobjlanguagefoldergui", 
"")
 
  867                $this->lng->txt(
"meta_l_" . $this->object->getTitle()),
 
  868                $this->ctrl->getLinkTarget($this, 
"view")
 
  881            $this->tpl->setHeaderPageTitle($this->lng->txt(
"translation"));
 
  882            $this->tpl->setTitle($this->lng->txt(
"translation") . 
" " . $this->lng->txt(
"meta_l_" . $this->object->key));
 
  884            $this->tpl->setTitle($this->lng->txt(
"meta_l_" . $this->object->key));
 
  886        $this->tpl->setTitleIcon(
ilUtil::getImagePath(
"icon_lngf.svg"), $this->lng->txt(
"obj_" . $this->object->getType()));
 
  899        if (!is_array($a_missing) ||
 
  900            !
sizeof($a_missing)) {
 
  904        $res = array(
'<h3>' . $this->lng->txt(
"adm_missing_entries") . 
'</h3>', 
'<ul>');
 
  906        foreach ($a_missing as $entry) {
 
  907            $ilCtrl->setParameter($this, 
"eid", $entry);
 
  908            $res[] = 
'<li>' . $entry .
 
  909                ' <a href="' . 
$ilCtrl->getLinkTarget($this, 
"addNewEntry") .
 
  910                '">' . $this->lng->txt(
"adm_missing_entry_add_action") . 
'</a></li>';
 
  911            $ilCtrl->setParameter($this, 
"eid", 
"");
 
  916        return implode(
"\n", 
$res);
 
  930        $tpl->setContent($a_form->getHTML());
 
  944            $ilCtrl->redirect($this, 
"view");
 
  947        include_once 
"Services/Form/classes/class.ilPropertyFormGUI.php";
 
  949        $form->setFormAction(
$ilCtrl->getFormAction($this, 
"saveNewEntry"));
 
  950        $form->setTitle($this->lng->txt(
"adm_missing_entry_add"));
 
  953        $options = array_combine($mods, $mods);
 
  956        $mod->setOptions(array(
"" => $this->lng->txt(
"please_select")) + 
$options);
 
  957        $mod->setRequired(
true);
 
  958        $form->addItem($mod);
 
  961        $id->setValue($a_id);
 
  962        $id->setDisabled(
true);
 
  965        foreach ($this->lng->getInstalledLanguages() as $lang_key) {
 
  966            $trans = 
new ilTextInputGUI($this->lng->txt(
"meta_l_" . $lang_key), 
"trans_" . $lang_key);
 
  967            if (in_array($lang_key, array(
"de", 
"en"))) {
 
  968                $trans->setRequired(
true);
 
  970            $form->addItem($trans);
 
  973        $form->addCommandButton(
"saveNewEntry", $this->lng->txt(
"save"));
 
  974        $form->addCommandButton(
"view", $this->lng->txt(
"cancel"));
 
  987        if (
$form->checkInput()) {
 
  988            $mod = 
$form->getInput(
"mod");
 
  992            foreach ($this->lng->getInstalledLanguages() as $lang_key) {
 
  993                $trans = trim(
$form->getInput(
"trans_" . $lang_key));
 
 1001                        date(
"Y-m-d H:i:s"),
 
 1006                    $set = 
$ilDB->query(
"SELECT lang_array FROM lng_modules" .
 
 1007                        " WHERE lang_key = " . 
$ilDB->quote($lang_key, 
"text") .
 
 1008                        " AND module = " . 
$ilDB->quote($mod, 
"text"));
 
 1010                    $entries = unserialize(
$row[
"lang_array"]);
 
 1011                    if (is_array($entries)) {
 
 1012                        $entries[
$id] = $trans;
 
 1013                        ilObjLanguage::replaceLangModule($lang_key, $mod, $entries);
 
 1018            ilUtil::sendSuccess($this->lng->txt(
"settings_saved"), 
true);
 
 1019            $ilCtrl->redirect($this, 
"view");
 
 1022        $form->setValuesByPost();
 
An exception for terminatinating execution or to throw for unit testing.
Base class for ILIAS Exception handling.
static _getSavedTopics()
Get the stored topics from the user session.
static _lookupId($a_key)
Lookup the object ID for a language key.
static _getSavedModules()
Get the stored modules from the user session.
static _checkMaintenance()
Permission check for language maintenance (import/export)
static _isPageTranslation()
Check if the current request is a page translation.
Class ilObjLanguageExtGUI.
executeCommand()
execute command
setTitleAndDescription()
Set the Title and the description (Overwritten from ilObjectGUI, called by prepareOutput)
initAddNewEntryForm($a_id=null)
assignObject()
Assign the extended language object.
applyFilterObject()
Apply filter.
uploadObject()
Process an uploaded language file.
statisticsObject()
Print out statistics about the language.
getViewTable()
Get the table to view language entries.
__construct($a_data, $a_id=0, $a_call_by_reference=false)
Constructor.
buildMissingEntries(array $a_missing=null)
saveObject()
Save the changed translations.
cancelObject()
Cancel the current action.
maintainObject()
Process the language maintenance.
importObject()
Show the screen to import a language file.
exportObject()
Show the screen to export a language file.
addAdminLocatorItems($a_do_not_add_object=false)
Set the locator for admin mode (Overwritten from ilObjectGUI, called by prepareOutput)
downloadObject()
Download a language file.
getAdminTabs()
Get tabs for admin mode (Overwritten from ilObjectGUI, called by prepareOutput)
settingsObject()
Set the language settings.
getId()
get the language object id (needed for filter serialization)
resetFilterObject()
Reset filter.
addNewEntryObject(ilPropertyFormGUI $a_form=null)
viewObject()
Show the edit screen.
static _deleteValues($a_lang_key, $a_values=array())
Delete a set of translation in the database.
static _getModules($a_lang_key)
Get all modules of a language.
static _getRemarks($a_lang_key, $a_all_changed=false)
Get all remarks of a language.
static _saveValues($a_lang_key, $a_values=array(), $a_remarks=array())
Save a set of translation in the database.
static _getValues( $a_lang_key, $a_modules=array(), $a_topics=array(), $a_pattern='', $a_state='')
Get the translations of specified topics.
static replaceLangEntry( $a_module, $a_identifier, $a_lang_key, $a_value, $a_local_change=null, $a_remarks=null)
Replace lang entry.
Class ilObjectGUI Basic methods of all Output classes.
This class represents an option in a radio group.
This class represents a text property in a property form.
static sendFailure($a_info="", $a_keep=false)
Send Failure Message to Screen.
static deliverData($a_data, $a_filename, $mime="application/octet-stream", $charset="")
deliver data for download via browser.
static ilTempnam($a_temp_path=null)
Returns a unique and non existing Path for e temporary file or directory.
static stripSlashes($a_str, $a_strip_html=true, $a_allow="")
strip slashes if magic qoutes is enabled
static sendInfo($a_info="", $a_keep=false)
Send Info Message to Screen.
static getImagePath($img, $module_path="", $mode="output", $offline=false)
get image path (for images located in a template directory)
if(!array_key_exists('StateId', $_REQUEST)) $id
for($i=1; $i<=count($kw_cases_sel); $i+=1) $lang
if($modEnd===false) $module
if(isset($_POST['submit'])) $form
foreach($_POST as $key=> $value) $res