20 declare(strict_types=1);
58 public function __construct($a_data,
int $a_id = 0,
bool $a_call_by_reference =
false)
61 $ilClientIniFile = $DIC->clientIni();
62 $ilCtrl = $DIC->ctrl();
63 $lng = $DIC->language();
64 $this->
http = $DIC->http();
72 $ilCtrl->saveParameter($this,
"view_mode");
77 if ($this->
http->wrapper()->query()->has(
"obj_id")) {
78 $obj_id_get = $this->
http->wrapper()->query()->retrieve(
"obj_id", $this->
refinery->kindlyTo()->int());
79 } elseif ($this->
http->wrapper()->query()->has(
"language_folder_obj_ids")) {
80 $obj_id_get = $this->
http->wrapper()->query()->retrieve(
"language_folder_obj_ids", $this->
refinery->kindlyTo()->int());
82 if (!$this->
id = $obj_id_get) {
95 $this->langmode = $ilClientIniFile->readVariable(
"system",
"LANGMODE");
124 $ilHelp = $DIC->help();
127 $this->error->raiseError($this->
lng->txt(
"permission_denied"), $this->error->MESSAGE);
131 $cmd = $this->
ctrl->getCmd(
"view") .
"Object";
134 $ilHelp->setScreenIdComponent(
"lng");
152 "langmode" => $this->langmode,
153 "lang_key" => $this->
object->key,
162 public function viewObject(
int $changesSuccessBool = 0): void
171 $comments = $this->
object->getAllRemarks();
173 $compare_comments = [];
174 $missing_entries = [];
178 $compare = $table_gui->getFilterItemByPostVar(
"compare")->getValue();
179 if ($compare == $this->
object->key) {
180 $compare_object = $this->
object->getGlobalLanguageFile();
181 $compare_content = $compare_object->getAllValues();
182 $compare_comments = $compare_object->getAllComments();
192 $reset_offset_get =
false;
193 if ($this->
http->wrapper()->query()->has(
"reset_offset")) {
194 $reset_offset_get = $this->
http->wrapper()->query()->retrieve(
201 if ($reset_offset_get) {
202 $table_gui->resetOffset();
205 if (!isset($compare_content)) {
223 foreach ($translations as $name => $translation) {
224 $keys = explode($this->
lng->separator, $name);
225 $db_found[] = $keys[1];
227 $missing_entries = array_diff(
$topics, $db_found);
230 $filter_mode = $table_gui->getFilterItemByPostVar(
"mode")->getValue();
231 $filter_pattern = $table_gui->getFilterItemByPostVar(
"pattern")->getValue();
232 $filter_module = $table_gui->getFilterItemByPostVar(
"module")->getValue();
233 $filter_module = $filter_module ===
"all" ?
"" : $filter_module;
234 $filter_modules = $filter_module ? array($filter_module) : array();
235 $filter_identifier = $table_gui->getFilterItemByPostVar(
"identifier")->getValue();
236 $filter_topics = $filter_identifier ? array($filter_identifier) : array();
238 if (!isset($compare_content)) {
248 switch ($filter_mode) {
250 $translations = $this->
object->getChangedValues(
258 $translations = $this->
object->getAddedValues(
266 $translations = $this->
object->getUnchangedValues(
274 $translations = $this->
object->getCommentedValues(
282 $translations = $this->
object->getAllValues(
288 $translations = array_intersect_key($translations,
$comments);
292 $translations = $this->
object->getAllValues(
298 $translations = array_intersect_assoc($translations, $compare_content);
302 $translations = $this->
object->getAllValues(
308 $translations = array_diff_assoc($translations, $compare_content);
312 $former_file = $this->
object->getDataPath() .
"/ilias_" . $this->
object->key .
".lang";
313 if (!is_readable($former_file)) {
314 $this->tpl->setOnScreenMessage(
'failure', sprintf($this->
lng->txt(
"language_former_file_missing"), $former_file)
315 .
'<br />' . $this->
lng->txt(
"language_former_file_description"),
false);
316 $translations = array();
319 $global_file_obj = $this->
object->getGlobalLanguageFile();
321 $former_file_obj->read();
322 $global_changes = array_diff_assoc(
323 $global_file_obj->getAllValues(),
324 $former_file_obj->getAllValues()
326 if (!count($global_changes)) {
327 $this->tpl->setOnScreenMessage(
'info', sprintf($this->
lng->txt(
"language_former_file_equal"), $former_file)
328 .
'<br />' . $this->
lng->txt(
"language_former_file_description"),
false);
329 $translations = array();
332 $translations = $this->
object->getChangedValues(
338 $translations = array_intersect_key($translations, $global_changes);
343 $translations = $this->
object->getAllValues(
353 foreach ($translations as $name => $translation) {
354 $keys = explode($this->
lng->separator, $name);
357 $row[
"module"] = $keys[0];
358 $row[
"topic"] = $keys[1];
359 $row[
"name"] = $name;
360 $row[
"translation"] = $translation;
361 $row[
"comment"] =
$comments[$name] ??
"";
362 $row[
"default"] = $compare_content[$name] ??
"";
363 $row[
"default_comment"] = $compare_comments[$name] ??
"";
368 if ($changesSuccessBool) {
373 $table_gui->setData(
$data);
383 $table_gui->writeFilterToSession();
384 $table_gui->resetOffset();
394 $table_gui->resetOffset();
395 $table_gui->resetFilter();
405 $changesSuccessBool = 0;
407 $save_array = array();
408 $remarks_array = array();
409 $post = (array) ($this->
http->request()->getParsedBody() ?? []);
410 foreach (
$post as $key => $value) {
414 $key = str_replace([
"_POSTDOT_",
"_POSTSPACE_"], [
".",
" "], $key);
420 if (count($keys) === 2) {
422 $value = preg_replace(
"/(\015\012)|(\015)|(\012)/",
"<br />", $value);
423 $value = str_replace(
"<<",
"«", $value);
424 $value =
ilUtil::stripSlashes($value,
true,
"<strong><em><u><strike><ol><li><ul><p><div><i><b><code><sup><pre><gap><a><img><bdo><br><span>");
425 $save_array[$key] = $value;
428 $remarks_array[$key] =
$post[$orginal_key . $this->
lng->separator .
"comment"];
436 $changesSuccessBool = 1;
448 $this->tpl->setContent($form->getHTML());
454 $form->setFormAction($this->
ctrl->getFormAction($this));
455 $form->setTitle($this->
lng->txt(
"language_import_file"));
456 $form->addCommandButton(
"upload", $this->
lng->txt(
"upload"));
463 $ro =
new ilRadioOption($this->
lng->txt(
"language_mode_existing_keepall"),
"keepall");
464 $ro->
setInfo($this->
lng->txt(
"language_mode_existing_keepall_info"));
466 $ro =
new ilRadioOption($this->
lng->txt(
"language_mode_existing_keepnew"),
"keepnew");
467 $ro->
setInfo($this->
lng->txt(
"language_mode_existing_keepnew_info"));
469 $ro =
new ilRadioOption($this->
lng->txt(
"language_mode_existing_replace"),
"replace");
470 $ro->
setInfo($this->
lng->txt(
"language_mode_existing_replace_info"));
472 $ro =
new ilRadioOption($this->
lng->txt(
"language_mode_existing_delete"),
"delete");
473 $ro->
setInfo($this->
lng->txt(
"language_mode_existing_delete_info"));
475 $rg->setValue($this->
getSession()[
"import"][
"mode_existing"] ??
"keepall");
489 if ($form->checkInput()) {
490 $post_mode_existing = $this->
http->request()->getParsedBody()[
'mode_existing'] ??
"";
495 $upload = $DIC->upload();
497 if (!$upload->hasBeenProcessed()) {
502 if (!$upload->hasUploads()) {
503 throw new ilException($DIC->language()->txt(
"upload_error_file_not_found"));
505 $UploadResult = $upload->getResults()[$_FILES[
"userfile"][
"tmp_name"]];
507 $ProcessingStatus = $UploadResult->getStatus();
508 if ($ProcessingStatus->getCode() === ProcessingStatus::REJECTED) {
509 throw new ilException($ProcessingStatus->getMessage());
514 $upload->moveOneFileTo($UploadResult,
'', Location::TEMPORARY, basename($tempfile),
true);
515 $this->
object->importLanguageFile($tempfile, $post_mode_existing);
517 $tempfs = $DIC->filesystem()->temp();
518 $tempfs->delete(basename($tempfile));
520 $this->tpl->setOnScreenMessage(
'failure', $e->getMessage(),
true);
521 $this->
ctrl->redirect($this,
'import');
524 $this->tpl->setOnScreenMessage(
526 sprintf($this->
lng->txt(
"language_file_imported"), $_FILES[
"userfile"][
"name"]),
529 $this->
ctrl->redirect($this,
"import");
532 $form->setValuesByPost();
533 $this->tpl->setContent($form->getHTML());
542 $form->setFormAction($this->
ctrl->getFormAction($this));
543 $form->setTitle($this->
lng->txt(
"language_export_file"));
544 $form->setPreventDoubleSubmission(
false);
545 $form->addCommandButton(
"download", $this->
lng->txt(
"download"));
548 $ro =
new ilRadioOption($this->
lng->txt(
"language_scope_global"),
"global");
549 $ro->
setInfo($this->
lng->txt(
"language_scope_global_info"));
552 $ro->
setInfo($this->
lng->txt(
"language_scope_local_info"));
554 if ($this->langmode) {
556 $ro->
setInfo($this->
lng->txt(
"language_scope_added_info"));
559 $ro =
new ilRadioOption($this->
lng->txt(
"language_scope_unchanged"),
"unchanged");
560 $ro->
setInfo($this->
lng->txt(
"language_scope_unchanged_info"));
562 if ($this->langmode) {
563 $ro =
new ilRadioOption($this->
lng->txt(
"language_scope_merged"),
"merged");
564 $ro->
setInfo($this->
lng->txt(
"language_scope_merged_info"));
568 $rg->setValue($this->
getSession()[
"export"][
"scope"] ??
"global");
571 $this->tpl->setContent($form->getHTML());
579 $post_scope = $this->
http->request()->getParsedBody()[
'scope'] ??
"";
584 $filename =
"ilias_" . $this->
object->key .
'_' 586 .
"-" . gmdate(
"Y-m-d")
587 .
".lang." . $this->
getSession()[
"export"][
"scope"];
589 $global_file_obj = $this->
object->getGlobalLanguageFile();
592 if ($post_scope ===
"global") {
593 $local_file_obj->setParam(
"author", $global_file_obj->getParam(
"author"));
594 $local_file_obj->setParam(
"version", $global_file_obj->getParam(
"version"));
595 $local_file_obj->setAllValues($this->
object->getAllValues());
596 if ($this->langmode) {
597 $local_file_obj->setAllComments($this->
object->getAllRemarks());
599 } elseif ($post_scope ===
"local") {
600 $local_file_obj->setParam(
"based_on", $global_file_obj->getParam(
"version"));
601 $local_file_obj->setAllValues($this->
object->getChangedValues());
602 if ($this->langmode) {
603 $local_file_obj->setAllComments($this->
object->getAllRemarks());
605 } elseif ($post_scope ===
"added") {
606 $local_file_obj->setParam(
"author", $global_file_obj->getParam(
"author"));
607 $local_file_obj->setParam(
"version", $global_file_obj->getParam(
"version"));
608 $local_file_obj->setAllValues($this->
object->getAddedValues());
609 $local_file_obj->setAllComments($this->
object->getAllRemarks());
610 } elseif ($post_scope ===
"unchanged") {
611 $local_file_obj->setParam(
"author", $global_file_obj->getParam(
"author"));
612 $local_file_obj->setParam(
"version", $global_file_obj->getParam(
"version"));
613 $local_file_obj->setAllValues($this->
object->getUnchangedValues());
614 if ($this->langmode) {
615 $local_file_obj->setAllComments($this->
object->getAllRemarks());
617 } elseif ($post_scope ===
"merged") {
618 $local_file_obj->setParam(
"author", $global_file_obj->getParam(
"author"));
619 $local_file_obj->setParam(
"version", $global_file_obj->getParam(
"version"));
620 $local_file_obj->setAllValues($this->
object->getMergedValues());
621 $local_file_obj->setAllComments($this->
object->getMergedRemarks());
633 $form->setFormAction($this->
ctrl->getFormAction($this));
634 $form->setTitle($this->
lng->txt(
"language_maintenance"));
635 $form->setPreventDoubleSubmission(
false);
636 $form->addCommandButton(
"maintainExecute", $this->
lng->txt(
"language_process_maintenance"));
639 $ro =
new ilRadioOption($this->
lng->txt(
"language_load_local_changes"),
"load");
640 $ro->
setInfo(sprintf($this->
lng->txt(
"language_load_local_changes_info"), $this->
object->key));
642 $ro =
new ilRadioOption($this->
lng->txt(
"language_clear_local_changes"),
"clear");
643 $ro->
setInfo(sprintf($this->
lng->txt(
"language_clear_local_changes_info"), $this->
object->key));
645 if ($this->langmode) {
646 $ro =
new ilRadioOption($this->
lng->txt(
"language_delete_local_additions"),
"delete_added");
647 $ro->
setInfo(sprintf($this->
lng->txt(
"language_delete_local_additions_info"), $this->
object->key));
649 $ro =
new ilRadioOption($this->
lng->txt(
"language_remove_local_file"),
"remove_local_file");
650 $ro->
setInfo(sprintf($this->
lng->txt(
"language_remove_local_file_info"), $this->
object->key));
652 $ro =
new ilRadioOption($this->
lng->txt(
"language_merge_local_changes"),
"merge");
653 $ro->
setInfo(sprintf($this->
lng->txt(
"language_merge_local_changes_info"), $this->
object->key));
656 $ro =
new ilRadioOption($this->
lng->txt(
"language_save_dist"),
"save_dist");
657 $ro->
setInfo(sprintf($this->
lng->txt(
"language_save_dist_info"), $this->
object->key));
659 $rg->setValue($this->
getSession()[
"maintain"] ??
"load");
662 $this->tpl->setContent($form->getHTML());
667 $post_maintain = $this->
http->request()->getParsedBody()[
'maintain'] ??
"";
668 if (isset($post_maintain)) {
673 switch ($post_maintain) {
677 $orig_file = $this->
object->getLangPath() .
"/ilias_" . $this->
object->key .
".lang";
678 $copy_file = $this->
object->getDataPath() .
"/ilias_" . $this->
object->key .
".lang";
679 if (@copy($orig_file, $copy_file)) {
680 $this->tpl->setOnScreenMessage(
'success', $this->
lng->txt(
"language_saved_dist"),
true);
682 $this->tpl->setOnScreenMessage(
'failure', $this->
lng->txt(
"language_save_dist_failed"),
true);
688 $lang_file = $this->
object->getCustLangPath() .
"/ilias_" . $this->
object->key .
".lang.local";
689 if (is_file($lang_file) and is_readable($lang_file)) {
690 $this->
object->importLanguageFile($lang_file,
"replace");
691 $this->
object->setLocal(
true);
692 $this->tpl->setOnScreenMessage(
'success', $this->
lng->txt(
"language_loaded_local"),
true);
694 $this->tpl->setOnScreenMessage(
'failure', $this->
lng->txt(
"language_error_read_local"),
true);
700 $lang_file = $this->
object->getLangPath() .
"/ilias_" . $this->
object->key .
".lang";
701 if (is_file($lang_file) and is_readable($lang_file)) {
702 $this->
object->importLanguageFile($lang_file,
"replace");
703 $this->
object->setLocal(
false);
704 $this->tpl->setOnScreenMessage(
'success', $this->
lng->txt(
"language_cleared_local"),
true);
706 $this->tpl->setOnScreenMessage(
'failure', $this->
lng->txt(
"language_error_clear_local"),
true);
717 $orig_file = $this->
object->getLangPath() .
"/ilias_" . $this->
object->key .
".lang";
718 $copy_file = $this->
object->getCustLangPath() .
"/ilias_" . $this->
object->key .
".lang";
720 if (is_file($orig_file) and is_writable($orig_file)) {
722 @copy($orig_file, $copy_file);
725 $global_file_obj = $this->
object->getGlobalLanguageFile();
726 $global_file_obj->setAllValues($this->
object->getMergedValues());
727 $global_file_obj->setAllComments($this->
object->getMergedRemarks());
728 $global_file_obj->write();
729 $this->tpl->setOnScreenMessage(
'success', $this->
lng->txt(
"language_merged_global"),
true);
731 $this->tpl->setOnScreenMessage(
'failure', $this->
lng->txt(
"language_error_write_global"),
true);
736 case "remove_local_file":
737 $lang_file = $this->
object->getCustLangPath() .
"/ilias_" . $this->
object->key .
".lang.local";
739 if (!is_file($lang_file)) {
740 $this->
object->setLocal(
false);
741 $this->tpl->setOnScreenMessage(
'failure', $this->
lng->txt(
"language_error_local_missed"),
true);
742 } elseif (@unlink($lang_file)) {
743 $this->
object->setLocal(
false);
744 $this->tpl->setOnScreenMessage(
'success', $this->
lng->txt(
"language_local_file_deleted"),
true);
746 $this->tpl->setOnScreenMessage(
'failure', $this->
lng->txt(
"language_error_delete_local"),
true);
751 $this->
ctrl->redirect($this,
"maintain");
760 $this->tpl->setContent($form->getHTML());
771 $translate_key =
"lang_translate_" . $this->
object->key;
773 $post_translation = $this->
http->request()->getParsedBody()[
'translation'] ??
"";
775 $translate =
$ilSetting->get($translate_key,
'0');
776 if (!is_null($post_translation) && $post_translation != $translate) {
777 $ilSetting->set($translate_key, $post_translation);
778 $this->tpl->setOnScreenMessage(
'success', $this->
lng->txt(
"settings_saved"));
782 $this->tpl->setContent($form->getHTML());
789 $translate_key =
"lang_translate_" . $this->
object->key;
790 $translate = (bool)
$ilSetting->get($translate_key,
'0');
793 $form->setFormAction($this->
ctrl->getFormAction($this));
794 $form->setTitle($this->
lng->txt(
"language_settings"));
795 $form->setPreventDoubleSubmission(
false);
796 $form->addCommandButton(
'saveSettings', $this->
lng->txt(
"language_change_settings"));
799 $ci->setChecked($translate);
800 $ci->setInfo($this->
lng->txt(
"language_note_translation"));
817 $this->tpl->setContent($this->ui_renderer->render($statisticsTable->withRequest($this->request)));
827 $ilCtrl = $DIC->ctrl();
828 $cmd = $ilCtrl->getCmd();
831 $this->tabs_gui->setBackTarget(
832 $this->
lng->txt(
"back"),
833 $this->
ctrl->getLinkTargetByClass(
"ilObjLanguageFolderGUI")
836 $this->
ctrl->setParameter($this,
"obj_id", $this->
id);
837 $this->tabs_gui->addTab(
839 $this->
lng->txt(
"edit"),
840 $this->
ctrl->getLinkTarget($this,
"view")
843 $this->tabs_gui->addTab(
845 $this->
lng->txt(
'export'),
846 $this->
ctrl->getLinkTarget($this,
"export")
849 $this->tabs_gui->addTab(
851 $this->
lng->txt(
"import"),
852 $this->
ctrl->getLinkTarget($this,
"import")
855 $this->tabs_gui->addTab(
857 $this->
lng->txt(
"language_maintain"),
858 $this->
ctrl->getLinkTarget($this,
"maintain")
861 $this->tabs_gui->addTab(
863 $this->
lng->txt(
"settings"),
864 $this->
ctrl->getLinkTarget($this,
"settings")
867 $this->tabs_gui->addTab(
869 $this->
lng->txt(
"language_statistics"),
870 $this->
ctrl->getLinkTarget($this,
"statistics")
879 $this->tabs_gui->activateTab(
"edit");
882 $this->tabs_gui->activateTab($cmd);
894 $ilLocator = $DIC[
"ilLocator"];
897 parent::addAdminLocatorItems(
true);
900 $this->
lng->txt(
"languages"),
901 $this->
ctrl->getLinkTargetByClass(
"ilobjlanguagefoldergui",
"")
905 $this->
lng->txt(
"meta_l_" . $this->object->getTitle()),
906 $this->
ctrl->getLinkTarget($this,
"view")
918 $this->tpl->setHeaderPageTitle($this->
lng->txt(
"translation"));
919 $this->tpl->setTitle($this->
lng->txt(
"translation") .
" " . $this->
lng->txt(
"meta_l_" . $this->
object->key));
921 $this->tpl->setTitle($this->
lng->txt(
"meta_l_" . $this->object->key));
923 $this->tpl->setTitleIcon(
ilUtil::getImagePath(
"standard/icon_lngf.svg"), $this->
lng->txt(
"obj_" . $this->object->getType()));
934 $ilCtrl = $DIC->ctrl();
936 if (!count($a_missing)) {
940 $res = array(
"<h3>" . $this->
lng->txt(
"adm_missing_entries") .
"</h3>",
"<ul>");
942 foreach ($a_missing as $entry) {
943 $ilCtrl->setParameter($this,
"eid", $entry);
944 $res[] =
'<li>' . $entry .
945 ' <a href="' . $ilCtrl->getLinkTarget($this,
"addNewEntry") .
946 '">' . $this->
lng->txt(
"adm_missing_entry_add_action") .
'</a></li>';
947 $ilCtrl->setParameter($this,
"eid",
"");
952 return implode(
"\n",
$res);
961 if ($this->
http->wrapper()->query()->has(
"eid")) {
962 $id = trim($this->
http->wrapper()->query()->retrieve(
"eid", $this->
refinery->kindlyTo()->string()));
974 $ilCtrl = $DIC->ctrl();
977 $a_id = $this->
http->request()->getParsedBody()[
'id'] ??
"";
982 $ilCtrl->redirect($this,
"view");
986 $form->setFormAction($ilCtrl->getFormAction($this,
"saveNewEntry"));
987 $form->setTitle($this->
lng->txt(
"adm_missing_entry_add"));
990 $options = array_combine($mods, $mods);
993 $mod->setOptions(array(
"" => $this->
lng->txt(
"please_select")) + $options);
994 $mod->setRequired(
true);
995 $form->addItem($mod);
998 $id->setValue($a_id);
999 $id->setDisabled(
true);
1000 $form->addItem(
$id);
1002 foreach ($this->
lng->getInstalledLanguages() as $lang_key) {
1003 $trans =
new ilTextInputGUI($this->
lng->txt(
"meta_l_" . $lang_key),
"trans_" . $lang_key);
1004 if (in_array($lang_key, array(
"de",
"en"))) {
1005 $trans->setRequired(
true);
1007 $form->addItem($trans);
1010 $form->addCommandButton(
"saveNewEntry", $this->
lng->txt(
"save"));
1011 $form->addCommandButton(
"view", $this->
lng->txt(
"cancel"));
1019 $ilDB = $DIC->database();
1020 $ilCtrl = $DIC->ctrl();
1021 $ilUser = $DIC->user();
1024 if ($form->checkInput()) {
1025 $mod = $form->getInput(
"mod");
1026 $id = $form->getInput(
"id");
1029 foreach ($this->
lng->getInstalledLanguages() as $lang_key) {
1030 $trans = trim($form->getInput(
"trans_" . $lang_key));
1038 gmdate(
"Y-m-d H:i:s"),
1043 $set =
$ilDB->query(
"SELECT lang_array FROM lng_modules" .
1044 " WHERE lang_key = " .
$ilDB->quote($lang_key,
"text") .
1045 " AND module = " .
$ilDB->quote($mod,
"text"));
1046 $row =
$ilDB->fetchAssoc($set);
1047 $entries = unserialize($row[
"lang_array"], [
"allowed_classes" =>
false]);
1048 if (is_array($entries)) {
1049 $entries[
$id] = $trans;
1055 $this->tpl->setOnScreenMessage(
'success', $this->
lng->txt(
"settings_saved"),
true);
1056 $ilCtrl->redirect($this,
"view");
1059 $form->setValuesByPost();
1069 $f = $DIC->ui()->factory();
1072 return $renderer->render(
$f->messageBox()->success($this->
lng->txt(
"language_variables_saved")));
downloadObject()
Download a language file.
static get(string $a_var)
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
executeCommand()
execute command
assignObject()
Assign the extended language object.
getSuccessMessage()
Get success message after variables were saved.
uploadObject()
Process an uploaded language file.
applyFilterObject()
Apply filter.
getUserLanguage()
Return language of user.
static _isPageTranslation()
Check if the current request is a page translation.
static _getSavedModules()
Get the stored modules from the user session.
initAddNewEntryForm(string $a_id=null)
static stripSlashes(string $a_str, bool $a_strip_html=true, string $a_allow="")
getViewTable()
Get the table to view language entries.
static _lookupId(string $a_key)
Lookup the object ID for a language key.
cancelObject()
Cancel the current action.
loadLanguageModule(string $a_module)
Load language module.
viewObject()
viewObject container presentation for "administration -> repository, trash, permissions" ...
setVariable(string $variable, $value='')
Sets the given variable to the given value.
Class ilObjLanguageExtGUI.
resetFilterObject()
Reset filter.
static deliverData(string $a_data, string $a_filename, string $mime="application/octet-stream")
exportObject()
Show the screen to export a language file.
static _checkMaintenance()
Permission check for language maintenance (import/export)
const ILIAS_LANGUAGE_MODULE
saveSettingsObject()
Set the language settings.
addAdminLocatorItems(bool $do_not_add_object=false)
Set the locator for admin mode (Overwritten from ilObjectGUI, called by prepareOutput) ...
importObject()
Show the screen to import a language file.
static _getValues(string $a_lang_key, array $a_modules=array(), array $a_topics=array(), string $a_pattern='', string $a_state='')
Get the translations of specified topics.
static http()
Fetches the global http state from ILIAS.
ilGlobalTemplateInterface $tpl
__construct($a_data, int $a_id=0, bool $a_call_by_reference=false)
Constructor.
setContent(string $a_html)
Sets content for standard template.
Class ilObjectGUI Basic methods of all Output classes.
getAdminTabs()
Get tabs for admin mode (Overwritten from ilObjectGUI, called by prepareOutput)
static _deleteValues(string $a_lang_key, array $a_values=array())
Delete a set of translation in the database.
static getImagePath(string $image_name, string $module_path="", string $mode="output", bool $offline=false)
get image path (for images located in a template directory)
buildMissingEntries(array $a_missing=null)
statisticsObject()
Print out statistics about the language.
settingsObject()
View the language settings.
setTitleAndDescription()
Set the Title and the description (Overwritten from ilObjectGUI, called by prepareOutput) ...
static _getSavedTopics()
Get the stored topics from the user session.
saveObject()
Save the changed translations.
static replaceLangEntry(string $a_module, string $a_identifier, string $a_lang_key, string $a_value, string $a_local_change=null, string $a_remarks=null)
Replace lang entry.
static ilTempnam(?string $a_temp_path=null)
Returns a unique and non existing Path for e temporary file or directory.
__construct(Container $dic, ilPlugin $plugin)
static _getRemarks(string $a_lang_key, bool $a_all_changed=false)
Get all remarks of a language.
static replaceLangModule(string $a_key, string $a_module, array $a_array)
Replace language module array.
addNewEntryObject(ilPropertyFormGUI $a_form=null)
viewObject(int $changesSuccessBool=0)
Show the edit screen.
maintainObject()
Process the language maintenance.
getId()
get the language object id (needed for filter serialization) Return language object id ...
static set(string $a_var, $a_val)
Set a value.
static _saveValues(string $a_lang_key, array $a_values=array(), array $a_remarks=array())
Save a set of translation in the database.