19declare(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();
68 $ilCtrl->saveParameter($this,
"view_mode");
74 if (!$this->
id = $obj_id_get) {
81 if ($this->
http->wrapper()->query()->has(
"obj_id")) {
82 $obj_id_get = $this->
http->wrapper()->query()->retrieve(
"obj_id", $this->
refinery->kindlyTo()->int());
83 } elseif ($this->
http->wrapper()->query()->has(
"language_folder_obj_ids")) {
84 $obj_id_get = $this->
http->wrapper()->query()->retrieve(
"language_folder_obj_ids", $this->
refinery->kindlyTo()->int());
94 $this->langmode = $ilClientIniFile->readVariable(
"system",
"LANGMODE");
123 $ilHelp =
$DIC->help();
126 $this->
error->raiseError($this->
lng->txt(
"permission_denied"), $this->error->MESSAGE);
130 $cmd = $this->
ctrl->getCmd(
"view") .
"Object";
133 $ilHelp->setScreenIdComponent(
"lng");
151 "langmode" => $this->langmode,
152 "lang_key" => $this->
object->key,
161 public function viewObject(
int $changesSuccessBool = 0): void
170 $comments = $this->
object->getAllRemarks();
172 $compare_comments = [];
173 $missing_entries = [];
177 $compare = $table_gui->getFilterItemByPostVar(
"compare")->getValue();
178 if ($compare == $this->
object->key) {
179 $compare_object = $this->
object->getGlobalLanguageFile();
180 $compare_content = $compare_object->getAllValues();
181 $compare_comments = $compare_object->getAllComments();
191 $reset_offset_get =
false;
192 if ($this->
http->wrapper()->query()->has(
"reset_offset")) {
193 $reset_offset_get = $this->
http->wrapper()->query()->retrieve(
200 if ($reset_offset_get) {
201 $table_gui->resetOffset();
204 if (!isset($compare_content)) {
222 foreach ($translations as $name => $translation) {
223 $keys = explode($this->
lng->separator, $name);
224 $db_found[] = $keys[1];
226 $missing_entries = array_diff(
$topics, $db_found);
229 $filter_mode = $table_gui->getFilterItemByPostVar(
"mode")->getValue();
230 $filter_pattern = $table_gui->getFilterItemByPostVar(
"pattern")->getValue();
231 $filter_module = $table_gui->getFilterItemByPostVar(
"module")->getValue();
232 $filter_module = $filter_module ===
"all" ?
"" : $filter_module;
233 $filter_modules = $filter_module ? array($filter_module) : array();
234 $filter_identifier = $table_gui->getFilterItemByPostVar(
"identifier")->getValue();
235 $filter_topics = $filter_identifier ? array($filter_identifier) : array();
237 if (!isset($compare_content)) {
247 switch ($filter_mode) {
249 $translations = $this->
object->getChangedValues(
257 $translations = $this->
object->getAddedValues(
265 $translations = $this->
object->getUnchangedValues(
273 $translations = $this->
object->getCommentedValues(
281 $translations = $this->
object->getAllValues(
287 $translations = array_intersect_key($translations,
$comments);
291 $translations = $this->
object->getAllValues(
297 $translations = array_intersect_assoc($translations, $compare_content);
301 $translations = $this->
object->getAllValues(
307 $translations = array_diff_assoc($translations, $compare_content);
311 $former_file = $this->
object->getDataPath() .
"/ilias_" . $this->
object->key .
".lang";
312 if (!is_readable($former_file)) {
313 $this->tpl->setOnScreenMessage(
'failure', sprintf($this->
lng->txt(
"language_former_file_missing"), $former_file)
314 .
'<br />' . $this->lng->txt(
"language_former_file_description"),
false);
315 $translations = array();
318 $global_file_obj = $this->
object->getGlobalLanguageFile();
320 $former_file_obj->read();
321 $global_changes = array_diff_assoc(
322 $global_file_obj->getAllValues(),
323 $former_file_obj->getAllValues()
325 if (!count($global_changes)) {
326 $this->tpl->setOnScreenMessage(
'info', sprintf($this->
lng->txt(
"language_former_file_equal"), $former_file)
327 .
'<br />' . $this->lng->txt(
"language_former_file_description"),
false);
328 $translations = array();
331 $translations = $this->
object->getChangedValues(
337 $translations = array_intersect_key($translations, $global_changes);
342 $translations = $this->
object->getAllValues(
352 foreach ($translations as $name => $translation) {
353 $keys = explode($this->
lng->separator, $name);
356 $row[
"module"] = $keys[0];
357 $row[
"topic"] = $keys[1];
358 $row[
"name"] = $name;
359 $row[
"translation"] = $translation;
360 $row[
"comment"] =
$comments[$name] ??
"";
361 $row[
"default"] = $compare_content[$name] ??
"";
362 $row[
"default_comment"] = $compare_comments[$name] ??
"";
367 if ($changesSuccessBool) {
372 $table_gui->setData(
$data);
373 $tpl->
setContent($table_gui->getHTML() . $this->buildMissingEntries($missing_entries));
382 $table_gui->writeFilterToSession();
383 $table_gui->resetOffset();
393 $table_gui->resetOffset();
394 $table_gui->resetFilter();
404 $changesSuccessBool = 0;
406 $save_array = array();
407 $remarks_array = array();
408 $post = (array) ($this->
http->request()->getParsedBody() ?? []);
409 foreach (
$post as $key => $value) {
413 $key = str_replace([
"_POSTDOT_",
"_POSTSPACE_"], [
".",
" "], $key);
419 if (count($keys) === 2) {
421 $value = preg_replace(
"/(\015\012)|(\015)|(\012)/",
"<br />", $value);
422 $value = str_replace(
"<<",
"«", $value);
423 $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>");
424 $save_array[$key] = $value;
427 $remarks_array[$key] =
$post[$orginal_key . $this->
lng->separator .
"comment"];
435 $changesSuccessBool = 1;
447 $this->tpl->setContent($form->getHTML());
453 $form->setFormAction($this->
ctrl->getFormAction($this));
454 $form->setTitle($this->
lng->txt(
"language_import_file"));
455 $form->addCommandButton(
"upload", $this->
lng->txt(
"upload"));
458 $fu->setRequired(
true);
462 $ro =
new ilRadioOption($this->
lng->txt(
"language_mode_existing_keepall"),
"keepall");
463 $ro->setInfo($this->
lng->txt(
"language_mode_existing_keepall_info"));
465 $ro =
new ilRadioOption($this->
lng->txt(
"language_mode_existing_keepnew"),
"keepnew");
466 $ro->setInfo($this->
lng->txt(
"language_mode_existing_keepnew_info"));
468 $ro =
new ilRadioOption($this->
lng->txt(
"language_mode_existing_replace"),
"replace");
469 $ro->setInfo($this->
lng->txt(
"language_mode_existing_replace_info"));
471 $ro =
new ilRadioOption($this->
lng->txt(
"language_mode_existing_delete"),
"delete");
472 $ro->setInfo($this->
lng->txt(
"language_mode_existing_delete_info"));
474 $rg->setValue($this->
getSession()[
"import"][
"mode_existing"] ??
"keepall");
488 if ($form->checkInput()) {
489 $post_mode_existing = $this->
http->request()->getParsedBody()[
'mode_existing'] ??
"";
494 $upload =
$DIC->upload();
496 if (!$upload->hasBeenProcessed()) {
501 if (!$upload->hasUploads()) {
502 throw new ilException(
$DIC->language()->txt(
"upload_error_file_not_found"));
504 $UploadResult = $upload->getResults()[$_FILES[
"userfile"][
"tmp_name"]];
506 $ProcessingStatus = $UploadResult->getStatus();
507 if ($ProcessingStatus->getCode() === ProcessingStatus::REJECTED) {
508 throw new ilException($ProcessingStatus->getMessage());
513 $upload->moveOneFileTo($UploadResult,
'', Location::TEMPORARY, basename($tempfile),
true);
514 $this->
object->importLanguageFile($tempfile, $post_mode_existing);
516 $tempfs =
$DIC->filesystem()->temp();
517 $tempfs->delete(basename($tempfile));
518 }
catch (Exception
$e) {
519 $this->tpl->setOnScreenMessage(
'failure',
$e->getMessage(),
true);
520 $this->
ctrl->redirect($this,
'import');
523 $this->tpl->setOnScreenMessage(
525 sprintf($this->
lng->txt(
"language_file_imported"), $_FILES[
"userfile"][
"name"]),
528 $this->
ctrl->redirect($this,
"import");
531 $form->setValuesByPost();
532 $this->tpl->setContent($form->getHTML());
541 $form->setFormAction($this->
ctrl->getFormAction($this));
542 $form->setTitle($this->
lng->txt(
"language_export_file"));
543 $form->setPreventDoubleSubmission(
false);
544 $form->addCommandButton(
"download", $this->
lng->txt(
"download"));
547 $ro =
new ilRadioOption($this->
lng->txt(
"language_scope_global"),
"global");
548 $ro->setInfo($this->
lng->txt(
"language_scope_global_info"));
551 $ro->setInfo($this->
lng->txt(
"language_scope_local_info"));
553 if ($this->langmode) {
555 $ro->setInfo($this->
lng->txt(
"language_scope_added_info"));
558 $ro =
new ilRadioOption($this->
lng->txt(
"language_scope_unchanged"),
"unchanged");
559 $ro->setInfo($this->
lng->txt(
"language_scope_unchanged_info"));
561 if ($this->langmode) {
562 $ro =
new ilRadioOption($this->
lng->txt(
"language_scope_merged"),
"merged");
563 $ro->setInfo($this->
lng->txt(
"language_scope_merged_info"));
567 $rg->setValue($this->
getSession()[
"export"][
"scope"] ??
"global");
570 $this->tpl->setContent($form->getHTML());
578 $post_scope = $this->
http->request()->getParsedBody()[
'scope'] ??
"";
583 $filename =
"ilias_" . $this->
object->key .
'_'
585 .
"-" . gmdate(
"Y-m-d")
586 .
".lang." . $this->
getSession()[
"export"][
"scope"];
588 $global_file_obj = $this->
object->getGlobalLanguageFile();
591 if ($post_scope ===
"global") {
592 $local_file_obj->setParam(
"author", $global_file_obj->getParam(
"author"));
593 $local_file_obj->setParam(
"version", $global_file_obj->getParam(
"version"));
594 $local_file_obj->setAllValues($this->
object->getAllValues());
595 if ($this->langmode) {
596 $local_file_obj->setAllComments($this->
object->getAllRemarks());
598 } elseif ($post_scope ===
"local") {
599 $local_file_obj->setParam(
"based_on", $global_file_obj->getParam(
"version"));
600 $local_file_obj->setAllValues($this->
object->getChangedValues());
601 if ($this->langmode) {
602 $local_file_obj->setAllComments($this->
object->getAllRemarks());
604 } elseif ($post_scope ===
"added") {
605 $local_file_obj->setParam(
"author", $global_file_obj->getParam(
"author"));
606 $local_file_obj->setParam(
"version", $global_file_obj->getParam(
"version"));
607 $local_file_obj->setAllValues($this->
object->getAddedValues());
608 $local_file_obj->setAllComments($this->
object->getAllRemarks());
609 } elseif ($post_scope ===
"unchanged") {
610 $local_file_obj->setParam(
"author", $global_file_obj->getParam(
"author"));
611 $local_file_obj->setParam(
"version", $global_file_obj->getParam(
"version"));
612 $local_file_obj->setAllValues($this->
object->getUnchangedValues());
613 if ($this->langmode) {
614 $local_file_obj->setAllComments($this->
object->getAllRemarks());
616 } elseif ($post_scope ===
"merged") {
617 $local_file_obj->setParam(
"author", $global_file_obj->getParam(
"author"));
618 $local_file_obj->setParam(
"version", $global_file_obj->getParam(
"version"));
619 $local_file_obj->setAllValues($this->
object->getMergedValues());
620 $local_file_obj->setAllComments($this->
object->getMergedRemarks());
632 $form->setFormAction($this->
ctrl->getFormAction($this));
633 $form->setTitle($this->
lng->txt(
"language_maintenance"));
634 $form->setPreventDoubleSubmission(
false);
635 $form->addCommandButton(
"maintainExecute", $this->
lng->txt(
"language_process_maintenance"));
638 $ro =
new ilRadioOption($this->
lng->txt(
"language_load_local_changes"),
"load");
639 $ro->setInfo(sprintf($this->
lng->txt(
"language_load_local_changes_info"), $this->object->key));
641 $ro =
new ilRadioOption($this->
lng->txt(
"language_clear_local_changes"),
"clear");
642 $ro->setInfo(sprintf($this->
lng->txt(
"language_clear_local_changes_info"), $this->object->key));
644 if ($this->langmode) {
645 $ro =
new ilRadioOption($this->
lng->txt(
"language_delete_local_additions"),
"delete_added");
646 $ro->setInfo(sprintf($this->
lng->txt(
"language_delete_local_additions_info"), $this->object->key));
648 $ro =
new ilRadioOption($this->
lng->txt(
"language_remove_local_file"),
"remove_local_file");
649 $ro->setInfo(sprintf($this->
lng->txt(
"language_remove_local_file_info"), $this->object->key));
651 $ro =
new ilRadioOption($this->
lng->txt(
"language_merge_local_changes"),
"merge");
652 $ro->setInfo(sprintf($this->
lng->txt(
"language_merge_local_changes_info"), $this->object->key));
655 $ro =
new ilRadioOption($this->
lng->txt(
"language_save_dist"),
"save_dist");
656 $ro->setInfo(sprintf($this->
lng->txt(
"language_save_dist_info"), $this->object->key));
658 $rg->setValue($this->
getSession()[
"maintain"] ??
"load");
661 $this->tpl->setContent($form->getHTML());
666 $post_maintain = $this->
http->request()->getParsedBody()[
'maintain'] ??
"";
667 if (isset($post_maintain)) {
672 switch ($post_maintain) {
676 $orig_file = $this->
object->getLangPath() .
"/ilias_" . $this->
object->key .
".lang";
677 $copy_file = $this->
object->getDataPath() .
"/ilias_" . $this->
object->key .
".lang";
678 if (@copy($orig_file, $copy_file)) {
679 $this->tpl->setOnScreenMessage(
'success', $this->
lng->txt(
"language_saved_dist"),
true);
681 $this->tpl->setOnScreenMessage(
'failure', $this->
lng->txt(
"language_save_dist_failed"),
true);
687 $lang_file = $this->
object->getCustLangPath() .
"/ilias_" . $this->
object->key .
".lang.local";
688 if (is_file($lang_file) and is_readable($lang_file)) {
689 $this->
object->importLanguageFile($lang_file,
"replace");
690 $this->
object->setLocal(
true);
691 $this->tpl->setOnScreenMessage(
'success', $this->
lng->txt(
"language_loaded_local"),
true);
693 $this->tpl->setOnScreenMessage(
'failure', $this->
lng->txt(
"language_error_read_local"),
true);
699 $lang_file = $this->
object->getLangPath() .
"/ilias_" . $this->
object->key .
".lang";
700 if (is_file($lang_file) and is_readable($lang_file)) {
701 $this->
object->importLanguageFile($lang_file,
"replace");
702 $this->
object->setLocal(
false);
703 $this->tpl->setOnScreenMessage(
'success', $this->
lng->txt(
"language_cleared_local"),
true);
705 $this->tpl->setOnScreenMessage(
'failure', $this->
lng->txt(
"language_error_clear_local"),
true);
716 $orig_file = $this->
object->getLangPath() .
"/ilias_" . $this->
object->key .
".lang";
717 $copy_file = $this->
object->getCustLangPath() .
"/ilias_" . $this->
object->key .
".lang";
719 if (is_file($orig_file) and is_writable($orig_file)) {
721 @copy($orig_file, $copy_file);
724 $global_file_obj = $this->
object->getGlobalLanguageFile();
725 $global_file_obj->setAllValues($this->
object->getMergedValues());
726 $global_file_obj->setAllComments($this->
object->getMergedRemarks());
727 $global_file_obj->write();
728 $this->tpl->setOnScreenMessage(
'success', $this->
lng->txt(
"language_merged_global"),
true);
730 $this->tpl->setOnScreenMessage(
'failure', $this->
lng->txt(
"language_error_write_global"),
true);
735 case "remove_local_file":
736 $lang_file = $this->
object->getCustLangPath() .
"/ilias_" . $this->
object->key .
".lang.local";
738 if (!is_file($lang_file)) {
739 $this->
object->setLocal(
false);
740 $this->tpl->setOnScreenMessage(
'failure', $this->
lng->txt(
"language_error_local_missed"),
true);
741 } elseif (@unlink($lang_file)) {
742 $this->
object->setLocal(
false);
743 $this->tpl->setOnScreenMessage(
'success', $this->
lng->txt(
"language_local_file_deleted"),
true);
745 $this->tpl->setOnScreenMessage(
'failure', $this->
lng->txt(
"language_error_delete_local"),
true);
750 $this->
ctrl->redirect($this,
"maintain");
759 $this->tpl->setContent($form->getHTML());
770 $translate_key =
"lang_translate_" . $this->
object->key;
772 $post_translation = $this->
http->request()->getParsedBody()[
'translation'] ??
"";
774 $translate =
$ilSetting->get($translate_key,
'0');
775 if (!is_null($post_translation) && $post_translation != $translate) {
776 $ilSetting->set($translate_key, $post_translation);
777 $this->tpl->setOnScreenMessage(
'success', $this->
lng->txt(
"settings_saved"));
781 $this->tpl->setContent($form->getHTML());
788 $translate_key =
"lang_translate_" . $this->
object->key;
789 $translate = (bool)
$ilSetting->get($translate_key,
'0');
792 $form->setFormAction($this->
ctrl->getFormAction($this));
793 $form->setTitle($this->
lng->txt(
"language_settings"));
794 $form->setPreventDoubleSubmission(
false);
795 $form->addCommandButton(
'saveSettings', $this->
lng->txt(
"language_change_settings"));
798 $ci->setChecked($translate);
799 $ci->setInfo($this->
lng->txt(
"language_note_translation"));
816 $this->tpl->setContent($this->ui_renderer->render($statisticsTable->withRequest($this->request)));
826 $ilCtrl =
$DIC->ctrl();
827 $cmd = $ilCtrl->getCmd();
830 $this->tabs_gui->setBackTarget(
831 $this->
lng->txt(
"back"),
832 $this->ctrl->getLinkTargetByClass(
"ilObjLanguageFolderGUI")
835 $this->
ctrl->setParameter($this,
"obj_id", $this->
id);
836 $this->tabs_gui->addTab(
838 $this->
lng->txt(
"edit"),
839 $this->ctrl->getLinkTarget($this,
"view")
842 $this->tabs_gui->addTab(
844 $this->
lng->txt(
'export'),
845 $this->ctrl->getLinkTarget($this,
"export")
848 $this->tabs_gui->addTab(
850 $this->
lng->txt(
"import"),
851 $this->ctrl->getLinkTarget($this,
"import")
854 $this->tabs_gui->addTab(
856 $this->
lng->txt(
"language_maintain"),
857 $this->ctrl->getLinkTarget($this,
"maintain")
860 $this->tabs_gui->addTab(
862 $this->
lng->txt(
"settings"),
863 $this->ctrl->getLinkTarget($this,
"settings")
866 $this->tabs_gui->addTab(
868 $this->
lng->txt(
"language_statistics"),
869 $this->ctrl->getLinkTarget($this,
"statistics")
878 $this->tabs_gui->activateTab(
"edit");
881 $this->tabs_gui->activateTab($cmd);
893 $ilLocator =
$DIC[
"ilLocator"];
896 parent::addAdminLocatorItems(
true);
899 $this->
lng->txt(
"languages"),
900 $this->ctrl->getLinkTargetByClass(
"ilobjlanguagefoldergui",
"")
904 $this->
lng->txt(
"meta_l_" . $this->object->getTitle()),
905 $this->ctrl->getLinkTarget($this,
"view")
917 $this->tpl->setHeaderPageTitle($this->
lng->txt(
"translation"));
918 $this->tpl->setTitle($this->
lng->txt(
"translation") .
" " . $this->lng->txt(
"meta_l_" . $this->object->key));
920 $this->tpl->setTitle($this->
lng->txt(
"meta_l_" . $this->object->key));
922 $this->tpl->setTitleIcon(
ilUtil::getImagePath(
"standard/icon_lngf.svg"), $this->
lng->txt(
"obj_" . $this->object->getType()));
933 $ilCtrl =
$DIC->ctrl();
935 if (!count($a_missing)) {
939 $res = array(
"<h3>" . $this->
lng->txt(
"adm_missing_entries") .
"</h3>",
"<ul>");
941 foreach ($a_missing as $entry) {
942 $ilCtrl->setParameter($this,
"eid", $entry);
943 $res[] =
'<li>' . $entry .
944 ' <a href="' . $ilCtrl->getLinkTarget($this,
"addNewEntry") .
945 '">' . $this->
lng->txt(
"adm_missing_entry_add_action") .
'</a></li>';
946 $ilCtrl->setParameter($this,
"eid",
"");
951 return implode(
"\n",
$res);
960 if ($this->
http->wrapper()->query()->has(
"eid")) {
961 $id = trim($this->
http->wrapper()->query()->retrieve(
"eid", $this->refinery->kindlyTo()->string()));
973 $ilCtrl =
$DIC->ctrl();
976 $a_id = $this->
http->request()->getParsedBody()[
'id'] ??
"";
981 $ilCtrl->redirect($this,
"view");
985 $form->setFormAction($ilCtrl->getFormAction($this,
"saveNewEntry"));
986 $form->setTitle($this->
lng->txt(
"adm_missing_entry_add"));
989 $options = array_combine($mods, $mods);
992 $mod->setOptions(array(
"" => $this->
lng->txt(
"please_select")) +
$options);
993 $mod->setRequired(
true);
994 $form->addItem($mod);
997 $id->setValue($a_id);
998 $id->setDisabled(
true);
1001 foreach ($this->
lng->getInstalledLanguages() as $lang_key) {
1002 $trans =
new ilTextInputGUI($this->
lng->txt(
"meta_l_" . $lang_key),
"trans_" . $lang_key);
1003 if (in_array($lang_key, array(
"de",
"en"))) {
1004 $trans->setRequired(
true);
1006 $form->addItem($trans);
1009 $form->addCommandButton(
"saveNewEntry", $this->
lng->txt(
"save"));
1010 $form->addCommandButton(
"view", $this->
lng->txt(
"cancel"));
1019 $ilCtrl =
$DIC->ctrl();
1020 $ilUser =
$DIC->user();
1023 if ($form->checkInput()) {
1024 $mod = $form->getInput(
"mod");
1025 $id = $form->getInput(
"id");
1028 foreach ($this->
lng->getInstalledLanguages() as $lang_key) {
1029 $trans = trim($form->getInput(
"trans_" . $lang_key));
1037 gmdate(
"Y-m-d H:i:s"),
1042 $set =
$ilDB->query(
"SELECT lang_array FROM lng_modules" .
1043 " WHERE lang_key = " .
$ilDB->quote($lang_key,
"text") .
1044 " AND module = " .
$ilDB->quote($mod,
"text"));
1045 $row =
$ilDB->fetchAssoc($set);
1046 $entries = unserialize($row[
"lang_array"], [
"allowed_classes" =>
false]);
1047 if (is_array($entries)) {
1048 $entries[
$id] = $trans;
1054 $this->tpl->setOnScreenMessage(
'success', $this->
lng->txt(
"settings_saved"),
true);
1055 $ilCtrl->redirect($this,
"view");
1058 $form->setValuesByPost();
1068 $f =
$DIC->ui()->factory();
1071 return $renderer->render(
$f->messageBox()->success($this->lng->txt(
"language_variables_saved")));
Base class for ILIAS Exception handling.
static ilTempnam(?string $a_temp_path=null)
Returns a unique and non existing Path for e temporary file or directory.
loadLanguageModule(string $a_module)
Load language module.
getUserLanguage()
Return language of user.
static _lookupId(string $a_key)
Lookup the object ID for a language key.
static _getSavedTopics()
Get the stored topics from the user session.
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
addNewEntryObject(?ilPropertyFormGUI $a_form=null)
setTitleAndDescription()
Set the Title and the description (Overwritten from ilObjectGUI, called by prepareOutput)
initAddNewEntryForm(?string $a_id=null)
assignObject()
Assign the extended language object.
addAdminLocatorItems(bool $do_not_add_object=false)
Set the locator for admin mode (Overwritten from ilObjectGUI, called by prepareOutput)
applyFilterObject()
Apply filter.
uploadObject()
Process an uploaded language file.
statisticsObject()
Print out statistics about the language.
getViewTable()
Get the table to view language entries.
saveObject()
Save the changed translations.
const ILIAS_LANGUAGE_MODULE
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.
downloadObject()
Download a language file.
getAdminTabs()
Get tabs for admin mode (Overwritten from ilObjectGUI, called by prepareOutput)
settingsObject()
View the language settings.
viewObject(int $changesSuccessBool=0)
Show the edit screen.
getId()
get the language object id (needed for filter serialization) Return language object id
resetFilterObject()
Reset filter.
getSuccessMessage()
Get success message after variables were saved.
__construct($a_data, int $a_id=0, bool $a_call_by_reference=false)
Constructor.
buildMissingEntries(?array $a_missing=null)
saveSettingsObject()
Set the language settings.
static _deleteValues(string $a_lang_key, array $a_values=array())
Delete a set of translation in the database.
static _saveValues(string $a_lang_key, array $a_values=array(), array $a_remarks=array())
Save a set of translation in the database.
static _getRemarks(string $a_lang_key, bool $a_all_changed=false)
Get all remarks of a language.
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 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 replaceLangModule(string $a_key, string $a_module, array $a_array)
Replace language module array.
Class ilObjectGUI Basic methods of all Output classes.
ilGlobalTemplateInterface $tpl
viewObject()
viewObject container presentation for "administration -> repository, trash, permissions"
This class represents an option in a radio group.
static get(string $a_var)
static set(string $a_var, $a_val)
Set a value.
This class represents a text property in a property form.
static getImagePath(string $image_name, string $module_path="", string $mode="output", bool $offline=false)
get image path (for images located in a template directory)
static stripSlashes(string $a_str, bool $a_strip_html=true, string $a_allow="")
static deliverData(string $a_data, string $a_filename, string $mime="application/octet-stream")
setVariable(string $variable, $value='')
Sets the given variable to the given value.
setContent(string $a_html)
Sets content for standard template.
static http()
Fetches the global http state from ILIAS.
__construct(Container $dic, ilPlugin $plugin)
@inheritDoc