19 declare(strict_types=1);
56 public function __construct($a_data,
int $a_id = 0,
bool $a_call_by_reference =
false)
59 $ilClientIniFile = $DIC->clientIni();
60 $ilCtrl = $DIC->ctrl();
61 $lng = $DIC->language();
68 $ilCtrl->saveParameter($this,
"view_mode");
73 if ($this->
http->wrapper()->query()->has(
"obj_id")) {
74 $obj_id_get = $this->
http->wrapper()->query()->retrieve(
"obj_id", $this->
refinery->kindlyTo()->int());
75 } elseif ($this->
http->wrapper()->query()->has(
"language_folder_obj_ids")) {
76 $obj_id_get = $this->
http->wrapper()->query()->retrieve(
"language_folder_obj_ids", $this->
refinery->kindlyTo()->int());
78 if (!$this->
id = $obj_id_get) {
91 $this->langmode = $ilClientIniFile->readVariable(
"system",
"LANGMODE");
120 $ilHelp = $DIC->help();
123 $this->error->raiseError($this->
lng->txt(
"permission_denied"), $this->error->MESSAGE);
127 $cmd = $this->
ctrl->getCmd(
"view") .
"Object";
130 $ilHelp->setScreenIdComponent(
"lng");
148 "langmode" => $this->langmode,
149 "lang_key" => $this->
object->key,
158 public function viewObject(
int $changesSuccessBool = 0): void
167 $comments = $this->
object->getAllRemarks();
169 $compare_comments = [];
170 $missing_entries = [];
174 $compare = $table_gui->getFilterItemByPostVar(
"compare")->getValue();
175 if ($compare == $this->
object->key) {
176 $compare_object = $this->
object->getGlobalLanguageFile();
177 $compare_content = $compare_object->getAllValues();
178 $compare_comments = $compare_object->getAllComments();
188 $reset_offset_get =
false;
189 if ($this->
http->wrapper()->query()->has(
"reset_offset")) {
190 $reset_offset_get = $this->
http->wrapper()->query()->retrieve(
197 if ($reset_offset_get) {
198 $table_gui->resetOffset();
201 if (!isset($compare_content)) {
219 foreach ($translations as $name => $translation) {
220 $keys = explode($this->
lng->separator, $name);
221 $db_found[] = $keys[1];
223 $missing_entries = array_diff(
$topics, $db_found);
226 $filter_mode = $table_gui->getFilterItemByPostVar(
"mode")->getValue();
227 $filter_pattern = $table_gui->getFilterItemByPostVar(
"pattern")->getValue();
228 $filter_module = $table_gui->getFilterItemByPostVar(
"module")->getValue();
229 $filter_module = $filter_module ===
"all" ?
"" : $filter_module;
230 $filter_modules = $filter_module ? array($filter_module) : array();
231 $filter_identifier = $table_gui->getFilterItemByPostVar(
"identifier")->getValue();
232 $filter_topics = $filter_identifier ? array($filter_identifier) : array();
234 if (!isset($compare_content)) {
244 switch ($filter_mode) {
246 $translations = $this->
object->getChangedValues(
254 $translations = $this->
object->getAddedValues(
262 $translations = $this->
object->getUnchangedValues(
270 $translations = $this->
object->getCommentedValues(
278 $translations = $this->
object->getAllValues(
284 $translations = array_intersect_key($translations,
$comments);
288 $translations = $this->
object->getAllValues(
294 $translations = array_intersect_assoc($translations, $compare_content);
298 $translations = $this->
object->getAllValues(
304 $translations = array_diff_assoc($translations, $compare_content);
308 $former_file = $this->
object->getDataPath() .
"/ilias_" . $this->
object->key .
".lang";
309 if (!is_readable($former_file)) {
310 $this->tpl->setOnScreenMessage(
'failure', sprintf($this->
lng->txt(
"language_former_file_missing"), $former_file)
311 .
'<br />' . $this->
lng->txt(
"language_former_file_description"),
false);
312 $translations = array();
315 $global_file_obj = $this->
object->getGlobalLanguageFile();
317 $former_file_obj->read();
318 $global_changes = array_diff_assoc(
319 $global_file_obj->getAllValues(),
320 $former_file_obj->getAllValues()
322 if (!count($global_changes)) {
323 $this->tpl->setOnScreenMessage(
'info', sprintf($this->
lng->txt(
"language_former_file_equal"), $former_file)
324 .
'<br />' . $this->
lng->txt(
"language_former_file_description"),
false);
325 $translations = array();
328 $translations = $this->
object->getChangedValues(
334 $translations = array_intersect_key($translations, $global_changes);
339 $translations = $this->
object->getAllValues(
349 foreach ($translations as $name => $translation) {
350 $keys = explode($this->
lng->separator, $name);
353 $row[
"module"] = $keys[0];
354 $row[
"topic"] = $keys[1];
355 $row[
"name"] = $name;
356 $row[
"translation"] = $translation;
357 $row[
"comment"] =
$comments[$name] ??
"";
358 $row[
"default"] = $compare_content[$name] ??
"";
359 $row[
"default_comment"] = $compare_comments[$name] ??
"";
364 if ($changesSuccessBool) {
369 $table_gui->setData(
$data);
379 $table_gui->writeFilterToSession();
380 $table_gui->resetOffset();
390 $table_gui->resetOffset();
391 $table_gui->resetFilter();
401 $changesSuccessBool = 0;
403 $save_array = array();
404 $remarks_array = array();
405 $post = (array) ($this->
http->request()->getParsedBody() ?? []);
406 foreach (
$post as $key => $value) {
410 $key = str_replace([
"_POSTDOT_",
"_POSTSPACE_"], [
".",
" "], $key);
416 if (count($keys) === 2) {
418 $value = preg_replace(
"/(\015\012)|(\015)|(\012)/",
"<br />", $value);
419 $value = str_replace(
"<<",
"«", $value);
420 $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>");
421 $save_array[$key] = $value;
424 $remarks_array[$key] =
$post[$orginal_key . $this->
lng->separator .
"comment"];
432 $changesSuccessBool = 1;
444 $this->tpl->setContent($form->getHTML());
450 $form->setFormAction($this->
ctrl->getFormAction($this));
451 $form->setTitle($this->
lng->txt(
"language_import_file"));
452 $form->addCommandButton(
"upload", $this->
lng->txt(
"upload"));
459 $ro =
new ilRadioOption($this->
lng->txt(
"language_mode_existing_keepall"),
"keepall");
460 $ro->
setInfo($this->
lng->txt(
"language_mode_existing_keepall_info"));
462 $ro =
new ilRadioOption($this->
lng->txt(
"language_mode_existing_keepnew"),
"keepnew");
463 $ro->
setInfo($this->
lng->txt(
"language_mode_existing_keepnew_info"));
465 $ro =
new ilRadioOption($this->
lng->txt(
"language_mode_existing_replace"),
"replace");
466 $ro->
setInfo($this->
lng->txt(
"language_mode_existing_replace_info"));
468 $ro =
new ilRadioOption($this->
lng->txt(
"language_mode_existing_delete"),
"delete");
469 $ro->
setInfo($this->
lng->txt(
"language_mode_existing_delete_info"));
471 $rg->setValue($this->
getSession()[
"import"][
"mode_existing"] ??
"keepall");
485 if ($form->checkInput()) {
486 $post_mode_existing = $this->
http->request()->getParsedBody()[
'mode_existing'] ??
"";
491 $upload = $DIC->upload();
493 if (!$upload->hasBeenProcessed()) {
498 if (!$upload->hasUploads()) {
499 throw new ilException($DIC->language()->txt(
"upload_error_file_not_found"));
501 $UploadResult = $upload->getResults()[$_FILES[
"userfile"][
"tmp_name"]];
503 $ProcessingStatus = $UploadResult->getStatus();
504 if ($ProcessingStatus->getCode() === ProcessingStatus::REJECTED) {
505 throw new ilException($ProcessingStatus->getMessage());
510 $upload->moveOneFileTo($UploadResult,
'', Location::TEMPORARY, basename($tempfile),
true);
511 $this->
object->importLanguageFile($tempfile, $post_mode_existing);
513 $tempfs = $DIC->filesystem()->temp();
514 $tempfs->delete(basename($tempfile));
516 $this->tpl->setOnScreenMessage(
'failure', $e->getMessage(),
true);
517 $this->
ctrl->redirect($this,
'import');
520 $this->tpl->setOnScreenMessage(
522 sprintf($this->
lng->txt(
"language_file_imported"), $_FILES[
"userfile"][
"name"]),
525 $this->
ctrl->redirect($this,
"import");
528 $form->setValuesByPost();
529 $this->tpl->setContent($form->getHTML());
538 $form->setFormAction($this->
ctrl->getFormAction($this));
539 $form->setTitle($this->
lng->txt(
"language_export_file"));
540 $form->setPreventDoubleSubmission(
false);
541 $form->addCommandButton(
"download", $this->
lng->txt(
"download"));
544 $ro =
new ilRadioOption($this->
lng->txt(
"language_scope_global"),
"global");
545 $ro->
setInfo($this->
lng->txt(
"language_scope_global_info"));
548 $ro->
setInfo($this->
lng->txt(
"language_scope_local_info"));
550 if ($this->langmode) {
552 $ro->
setInfo($this->
lng->txt(
"language_scope_added_info"));
555 $ro =
new ilRadioOption($this->
lng->txt(
"language_scope_unchanged"),
"unchanged");
556 $ro->
setInfo($this->
lng->txt(
"language_scope_unchanged_info"));
558 if ($this->langmode) {
559 $ro =
new ilRadioOption($this->
lng->txt(
"language_scope_merged"),
"merged");
560 $ro->
setInfo($this->
lng->txt(
"language_scope_merged_info"));
564 $rg->setValue($this->
getSession()[
"export"][
"scope"] ??
"global");
567 $this->tpl->setContent($form->getHTML());
575 $post_scope = $this->
http->request()->getParsedBody()[
'scope'] ??
"";
580 $filename =
"ilias_" . $this->
object->key .
'_' 582 .
"-" . gmdate(
"Y-m-d")
583 .
".lang." . $this->
getSession()[
"export"][
"scope"];
585 $global_file_obj = $this->
object->getGlobalLanguageFile();
588 if ($post_scope ===
"global") {
589 $local_file_obj->setParam(
"author", $global_file_obj->getParam(
"author"));
590 $local_file_obj->setParam(
"version", $global_file_obj->getParam(
"version"));
591 $local_file_obj->setAllValues($this->
object->getAllValues());
592 if ($this->langmode) {
593 $local_file_obj->setAllComments($this->
object->getAllRemarks());
595 } elseif ($post_scope ===
"local") {
596 $local_file_obj->setParam(
"based_on", $global_file_obj->getParam(
"version"));
597 $local_file_obj->setAllValues($this->
object->getChangedValues());
598 if ($this->langmode) {
599 $local_file_obj->setAllComments($this->
object->getAllRemarks());
601 } elseif ($post_scope ===
"added") {
602 $local_file_obj->setParam(
"author", $global_file_obj->getParam(
"author"));
603 $local_file_obj->setParam(
"version", $global_file_obj->getParam(
"version"));
604 $local_file_obj->setAllValues($this->
object->getAddedValues());
605 $local_file_obj->setAllComments($this->
object->getAllRemarks());
606 } elseif ($post_scope ===
"unchanged") {
607 $local_file_obj->setParam(
"author", $global_file_obj->getParam(
"author"));
608 $local_file_obj->setParam(
"version", $global_file_obj->getParam(
"version"));
609 $local_file_obj->setAllValues($this->
object->getUnchangedValues());
610 if ($this->langmode) {
611 $local_file_obj->setAllComments($this->
object->getAllRemarks());
613 } elseif ($post_scope ===
"merged") {
614 $local_file_obj->setParam(
"author", $global_file_obj->getParam(
"author"));
615 $local_file_obj->setParam(
"version", $global_file_obj->getParam(
"version"));
616 $local_file_obj->setAllValues($this->
object->getMergedValues());
617 $local_file_obj->setAllComments($this->
object->getMergedRemarks());
629 $form->setFormAction($this->
ctrl->getFormAction($this));
630 $form->setTitle($this->
lng->txt(
"language_maintenance"));
631 $form->setPreventDoubleSubmission(
false);
632 $form->addCommandButton(
"maintainExecute", $this->
lng->txt(
"language_process_maintenance"));
635 $ro =
new ilRadioOption($this->
lng->txt(
"language_load_local_changes"),
"load");
636 $ro->
setInfo(sprintf($this->
lng->txt(
"language_load_local_changes_info"), $this->
object->key));
638 $ro =
new ilRadioOption($this->
lng->txt(
"language_clear_local_changes"),
"clear");
639 $ro->
setInfo(sprintf($this->
lng->txt(
"language_clear_local_changes_info"), $this->
object->key));
641 if ($this->langmode) {
642 $ro =
new ilRadioOption($this->
lng->txt(
"language_delete_local_additions"),
"delete_added");
643 $ro->
setInfo(sprintf($this->
lng->txt(
"language_delete_local_additions_info"), $this->
object->key));
645 $ro =
new ilRadioOption($this->
lng->txt(
"language_remove_local_file"),
"remove_local_file");
646 $ro->
setInfo(sprintf($this->
lng->txt(
"language_remove_local_file_info"), $this->
object->key));
648 $ro =
new ilRadioOption($this->
lng->txt(
"language_merge_local_changes"),
"merge");
649 $ro->
setInfo(sprintf($this->
lng->txt(
"language_merge_local_changes_info"), $this->
object->key));
652 $ro =
new ilRadioOption($this->
lng->txt(
"language_save_dist"),
"save_dist");
653 $ro->
setInfo(sprintf($this->
lng->txt(
"language_save_dist_info"), $this->
object->key));
655 $rg->setValue($this->
getSession()[
"maintain"] ??
"load");
658 $this->tpl->setContent($form->getHTML());
663 $post_maintain = $this->
http->request()->getParsedBody()[
'maintain'] ??
"";
664 if (isset($post_maintain)) {
669 switch ($post_maintain) {
673 $orig_file = $this->
object->getLangPath() .
"/ilias_" . $this->
object->key .
".lang";
674 $copy_file = $this->
object->getDataPath() .
"/ilias_" . $this->
object->key .
".lang";
675 if (@copy($orig_file, $copy_file)) {
676 $this->tpl->setOnScreenMessage(
'success', $this->
lng->txt(
"language_saved_dist"),
true);
678 $this->tpl->setOnScreenMessage(
'failure', $this->
lng->txt(
"language_save_dist_failed"),
true);
684 $lang_file = $this->
object->getCustLangPath() .
"/ilias_" . $this->
object->key .
".lang.local";
685 if (is_file($lang_file) and is_readable($lang_file)) {
686 $this->
object->importLanguageFile($lang_file,
"replace");
687 $this->
object->setLocal(
true);
688 $this->tpl->setOnScreenMessage(
'success', $this->
lng->txt(
"language_loaded_local"),
true);
690 $this->tpl->setOnScreenMessage(
'failure', $this->
lng->txt(
"language_error_read_local"),
true);
696 $lang_file = $this->
object->getLangPath() .
"/ilias_" . $this->
object->key .
".lang";
697 if (is_file($lang_file) and is_readable($lang_file)) {
698 $this->
object->importLanguageFile($lang_file,
"replace");
699 $this->
object->setLocal(
false);
700 $this->tpl->setOnScreenMessage(
'success', $this->
lng->txt(
"language_cleared_local"),
true);
702 $this->tpl->setOnScreenMessage(
'failure', $this->
lng->txt(
"language_error_clear_local"),
true);
713 $orig_file = $this->
object->getLangPath() .
"/ilias_" . $this->
object->key .
".lang";
714 $copy_file = $this->
object->getCustLangPath() .
"/ilias_" . $this->
object->key .
".lang";
716 if (is_file($orig_file) and is_writable($orig_file)) {
718 @copy($orig_file, $copy_file);
721 $global_file_obj = $this->
object->getGlobalLanguageFile();
722 $global_file_obj->setAllValues($this->
object->getMergedValues());
723 $global_file_obj->setAllComments($this->
object->getMergedRemarks());
724 $global_file_obj->write();
725 $this->tpl->setOnScreenMessage(
'success', $this->
lng->txt(
"language_merged_global"),
true);
727 $this->tpl->setOnScreenMessage(
'failure', $this->
lng->txt(
"language_error_write_global"),
true);
732 case "remove_local_file":
733 $lang_file = $this->
object->getCustLangPath() .
"/ilias_" . $this->
object->key .
".lang.local";
735 if (!is_file($lang_file)) {
736 $this->
object->setLocal(
false);
737 $this->tpl->setOnScreenMessage(
'failure', $this->
lng->txt(
"language_error_local_missed"),
true);
738 } elseif (@unlink($lang_file)) {
739 $this->
object->setLocal(
false);
740 $this->tpl->setOnScreenMessage(
'success', $this->
lng->txt(
"language_local_file_deleted"),
true);
742 $this->tpl->setOnScreenMessage(
'failure', $this->
lng->txt(
"language_error_delete_local"),
true);
747 $this->
ctrl->redirect($this,
"maintain");
756 $this->tpl->setContent($form->getHTML());
767 $translate_key =
"lang_translate_" . $this->
object->key;
769 $post_translation = $this->
http->request()->getParsedBody()[
'translation'] ??
"";
771 $translate =
$ilSetting->get($translate_key,
'0');
772 if (!is_null($post_translation) && $post_translation != $translate) {
773 $ilSetting->set($translate_key, $post_translation);
774 $this->tpl->setOnScreenMessage(
'success', $this->
lng->txt(
"settings_saved"));
778 $this->tpl->setContent($form->getHTML());
785 $translate_key =
"lang_translate_" . $this->
object->key;
786 $translate = (bool)
$ilSetting->get($translate_key,
'0');
789 $form->setFormAction($this->
ctrl->getFormAction($this));
790 $form->setTitle($this->
lng->txt(
"language_settings"));
791 $form->setPreventDoubleSubmission(
false);
792 $form->addCommandButton(
'saveSettings', $this->
lng->txt(
"language_change_settings"));
795 $ci->setChecked($translate);
796 $ci->setInfo($this->
lng->txt(
"language_note_translation"));
813 $this->tpl->setContent($this->ui_renderer->render($statisticsTable->withRequest($this->request)));
823 $ilCtrl = $DIC->ctrl();
824 $cmd = $ilCtrl->getCmd();
827 $this->tabs_gui->setBackTarget(
828 $this->
lng->txt(
"back"),
829 $this->
ctrl->getLinkTargetByClass(
"ilObjLanguageFolderGUI")
832 $this->
ctrl->setParameter($this,
"obj_id", $this->
id);
833 $this->tabs_gui->addTab(
835 $this->
lng->txt(
"edit"),
836 $this->
ctrl->getLinkTarget($this,
"view")
839 $this->tabs_gui->addTab(
841 $this->
lng->txt(
'export'),
842 $this->
ctrl->getLinkTarget($this,
"export")
845 $this->tabs_gui->addTab(
847 $this->
lng->txt(
"import"),
848 $this->
ctrl->getLinkTarget($this,
"import")
851 $this->tabs_gui->addTab(
853 $this->
lng->txt(
"language_maintain"),
854 $this->
ctrl->getLinkTarget($this,
"maintain")
857 $this->tabs_gui->addTab(
859 $this->
lng->txt(
"settings"),
860 $this->
ctrl->getLinkTarget($this,
"settings")
863 $this->tabs_gui->addTab(
865 $this->
lng->txt(
"language_statistics"),
866 $this->
ctrl->getLinkTarget($this,
"statistics")
875 $this->tabs_gui->activateTab(
"edit");
878 $this->tabs_gui->activateTab($cmd);
890 $ilLocator = $DIC[
"ilLocator"];
893 parent::addAdminLocatorItems(
true);
896 $this->
lng->txt(
"languages"),
897 $this->
ctrl->getLinkTargetByClass(
"ilobjlanguagefoldergui",
"")
901 $this->
lng->txt(
"meta_l_" . $this->object->getTitle()),
902 $this->
ctrl->getLinkTarget($this,
"view")
914 $this->tpl->setHeaderPageTitle($this->
lng->txt(
"translation"));
915 $this->tpl->setTitle($this->
lng->txt(
"translation") .
" " . $this->
lng->txt(
"meta_l_" . $this->
object->key));
917 $this->tpl->setTitle($this->
lng->txt(
"meta_l_" . $this->object->key));
919 $this->tpl->setTitleIcon(
ilUtil::getImagePath(
"standard/icon_lngf.svg"), $this->
lng->txt(
"obj_" . $this->object->getType()));
930 $ilCtrl = $DIC->ctrl();
932 if (!count($a_missing)) {
936 $res = array(
"<h3>" . $this->
lng->txt(
"adm_missing_entries") .
"</h3>",
"<ul>");
938 foreach ($a_missing as $entry) {
939 $ilCtrl->setParameter($this,
"eid", $entry);
940 $res[] =
'<li>' . $entry .
941 ' <a href="' . $ilCtrl->getLinkTarget($this,
"addNewEntry") .
942 '">' . $this->
lng->txt(
"adm_missing_entry_add_action") .
'</a></li>';
943 $ilCtrl->setParameter($this,
"eid",
"");
948 return implode(
"\n",
$res);
957 if ($this->
http->wrapper()->query()->has(
"eid")) {
958 $id = trim($this->
http->wrapper()->query()->retrieve(
"eid", $this->
refinery->kindlyTo()->string()));
970 $ilCtrl = $DIC->ctrl();
973 $a_id = $this->
http->request()->getParsedBody()[
'id'] ??
"";
978 $ilCtrl->redirect($this,
"view");
982 $form->setFormAction($ilCtrl->getFormAction($this,
"saveNewEntry"));
983 $form->setTitle($this->
lng->txt(
"adm_missing_entry_add"));
986 $options = array_combine($mods, $mods);
989 $mod->setOptions(array(
"" => $this->
lng->txt(
"please_select")) + $options);
990 $mod->setRequired(
true);
991 $form->addItem($mod);
994 $id->setValue($a_id);
995 $id->setDisabled(
true);
998 foreach ($this->
lng->getInstalledLanguages() as $lang_key) {
999 $trans =
new ilTextInputGUI($this->
lng->txt(
"meta_l_" . $lang_key),
"trans_" . $lang_key);
1000 if (in_array($lang_key, array(
"de",
"en"))) {
1001 $trans->setRequired(
true);
1003 $form->addItem($trans);
1006 $form->addCommandButton(
"saveNewEntry", $this->
lng->txt(
"save"));
1007 $form->addCommandButton(
"view", $this->
lng->txt(
"cancel"));
1015 $ilDB = $DIC->database();
1016 $ilCtrl = $DIC->ctrl();
1017 $ilUser = $DIC->user();
1020 if ($form->checkInput()) {
1021 $mod = $form->getInput(
"mod");
1022 $id = $form->getInput(
"id");
1025 foreach ($this->
lng->getInstalledLanguages() as $lang_key) {
1026 $trans = trim($form->getInput(
"trans_" . $lang_key));
1034 gmdate(
"Y-m-d H:i:s"),
1039 $set =
$ilDB->query(
"SELECT lang_array FROM lng_modules" .
1040 " WHERE lang_key = " .
$ilDB->quote($lang_key,
"text") .
1041 " AND module = " .
$ilDB->quote($mod,
"text"));
1042 $row =
$ilDB->fetchAssoc($set);
1043 $entries = unserialize($row[
"lang_array"], [
"allowed_classes" =>
false]);
1044 if (is_array($entries)) {
1045 $entries[
$id] = $trans;
1051 $this->tpl->setOnScreenMessage(
'success', $this->
lng->txt(
"settings_saved"),
true);
1052 $ilCtrl->redirect($this,
"view");
1055 $form->setValuesByPost();
1065 $f = $DIC->ui()->factory();
1068 return $renderer->render(
$f->messageBox()->success($this->
lng->txt(
"language_variables_saved")));
downloadObject()
Download a language file.
static get(string $a_var)
This class represents an option in a radio group.
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.
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.
setContent(string $a_html)
Sets content for standard template.
loadLanguageModule(string $a_module)
Load language module.
viewObject()
viewObject container presentation for "administration -> repository, trash, permissions" ...
Class ilObjLanguageExtGUI.
resetFilterObject()
Reset filter.
static deliverData(string $a_data, string $a_filename, string $mime="application/octet-stream")
addNewEntryObject(?ilPropertyFormGUI $a_form=null)
exportObject()
Show the screen to export a language file.
static _checkMaintenance()
Permission check for language maintenance (import/export)
setVariable(string $variable, $value='')
Sets the given variable to the given value.
initAddNewEntryForm(?string $a_id=null)
const ILIAS_LANGUAGE_MODULE
saveSettingsObject()
Set the language settings.
while($session_entry=$r->fetchRow(ilDBConstants::FETCHMODE_ASSOC)) return null
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.
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)
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.
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.
saveObject()
Save the changed translations.
static ilTempnam(?string $a_temp_path=null)
Returns a unique and non existing Path for e temporary file or directory.
buildMissingEntries(?array $a_missing=null)
__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.
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.