4 include_once(
"./Services/Table/classes/class.ilTable2GUI.php");
24 $this->folder = $a_folder;
31 $this->
addColumn($this->lng->txt(
"language"));
32 $this->
addColumn($this->lng->txt(
"status"));
33 $this->
addColumn($this->lng->txt(
"users"));
34 $this->
addColumn($this->lng->txt(
"last_refresh"));
35 if ($ilSetting->get(
"lang_ext_maintenance"))
37 $this->
addColumn($this->lng->txt(
"last_change"));
43 if ($ilSetting->get(
"lang_ext_maintenance"))
45 $this->
setRowTemplate(
"tpl.lang_list_row_extended.html",
"Services/Language");
49 $this->
setRowTemplate(
"tpl.lang_list_row.html",
"Services/Language");
54 if ($ilSetting->get(
"lang_ext_maintenance") ==
"1")
65 $this->
addMultiCommand(
"setSystemLanguage", $lng->txt(
"setSystemLanguage"));
66 $this->
addMultiCommand(
"setUserLanguage", $lng->txt(
"setUserLanguage"));
75 $languages = $this->folder->getLanguages();
77 foreach ($languages as $k => $l)
79 $data[] = array_merge($l, array(
"key" => $k));
100 $status =
"<span class=\"small\"> (".$lng->txt($a_set[
"status"]).
")</span>";
104 switch ($a_set[
"info"])
106 case "file_not_found":
107 $remark =
"<span class=\"smallred\"> ".$lng->txt($a_set[
"info"]).
"</span>";
118 if($ilSetting->get(
"lang_ext_maintenance")
119 and $ilSetting->get(
"lang_translate_". $a_set[
'key'],
false))
121 $remark .= $remark ?
'<br />' :
'';
122 $remark .=
"<span class=\"smallgreen\"> ".$lng->txt(
'language_translation_enabled').
"</span>";
126 if ($rbacsystem->checkAccess(
"write", $this->folder->getRefId()))
128 if ($ilSetting->get(
"lang_ext_maintenance") ==
"1")
130 if (substr($lang_data[
"description"],0,9) ==
"installed")
132 $ilCtrl->setParameterByClass(
"ilobjlanguageextgui",
"obj_id",$a_set[
"obj_id"]);
133 $url = $ilCtrl->getLinkTargetByClass(
"ilobjlanguageextgui",
"");
134 $a_set[
"name"] =
'<a href="'.$url.
'">'.$a_set[
"name"].
'</a>';
139 if ($a_set[
"desc"] !=
"not_installed")
141 $this->tpl->setVariable(
"LAST_REFRESH",
144 if ($ilSetting->get(
"lang_ext_maintenance"))
147 $this->tpl->setVariable(
"LAST_CHANGE",
155 if ($rbacsystem->checkAccess(
"write",$this->folder->getRefId()))
157 if ($ilSetting->get(
"lang_ext_maintenance") ==
"1")
159 if (substr($a_set[
"description"],0,9) ==
"installed")
161 $ilCtrl->setParameterByClass(
"ilobjlanguageextgui",
"obj_id", $a_set[
"obj_id"]);
162 $url = $ilCtrl->getLinkTargetByClass(
"ilobjlanguageextgui",
"");
163 $a_set[
"name"] =
'<a href="'.$url.
'">'.$a_set[
"name"].
'</a>';
168 $this->tpl->setVariable(
"VAL_LANGUAGE", $a_set[
"name"].$status);
169 $this->tpl->setVariable(
"VAL_STATUS", $lng->txt($a_set[
"desc"]).
"<br/>".$remark);
170 $this->tpl->setVariable(
"OBJ_ID", $a_set[
"obj_id"]);