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"));
44 if ($ilSetting->get(
"lang_ext_maintenance"))
46 $this->
setRowTemplate(
"tpl.lang_list_row_extended.html",
"Services/Language");
50 $this->
setRowTemplate(
"tpl.lang_list_row.html",
"Services/Language");
58 if ($ilSetting->get(
"lang_ext_maintenance") ==
"1")
66 $this->
addMultiCommand(
"setSystemLanguage", $lng->txt(
"setSystemLanguage"));
67 $this->
addMultiCommand(
"setUserLanguage", $lng->txt(
"setUserLanguage"));
76 $languages = $this->folder->getLanguages();
78 foreach ($languages as $k => $l)
80 $data[] = array_merge($l, array(
"key" => $k));
97 $status =
"<span class=\"small\"> (".$lng->txt($a_set[
"status"]).
")</span>";
101 switch ($a_set[
"info"])
103 case "file_not_found":
104 $remark =
"<span class=\"smallred\"> ".$lng->txt($a_set[
"info"]).
"</span>";
115 if($ilSetting->get(
"lang_ext_maintenance")
116 and $ilSetting->get(
"lang_translate_". $a_set[
'key'],
false))
118 $remark .= $remark ?
'<br />' :
'';
119 $remark .=
"<span class=\"smallgreen\"> ".$lng->txt(
'language_translation_enabled').
"</span>";
123 if ($rbacsystem->checkAccess(
"write", $this->folder->getRefId()))
125 if ($ilSetting->get(
"lang_ext_maintenance") ==
"1")
127 if (substr($lang_data[
"description"],0,9) ==
"installed")
129 $ilCtrl->setParameterByClass(
"ilobjlanguageextgui",
"obj_id",$a_set[
"obj_id"]);
130 $url = $ilCtrl->getLinkTargetByClass(
"ilobjlanguageextgui",
"");
131 $a_set[
"name"] =
'<a href="'.$url.
'">'.$a_set[
"name"].
'</a>';
136 if ($a_set[
"desc"] !=
"not_installed")
138 $this->tpl->setVariable(
"LAST_REFRESH",
141 if ($ilSetting->get(
"lang_ext_maintenance"))
144 $this->tpl->setVariable(
"LAST_CHANGE",
152 if ($rbacsystem->checkAccess(
"write",$this->folder->getRefId()))
154 if ($ilSetting->get(
"lang_ext_maintenance") ==
"1")
156 if (substr($a_set[
"description"],0,9) ==
"installed")
158 $ilCtrl->setParameterByClass(
"ilobjlanguageextgui",
"obj_id", $a_set[
"obj_id"]);
159 $url = $ilCtrl->getLinkTargetByClass(
"ilobjlanguageextgui",
"");
160 $a_set[
"name"] =
'<a href="'.$url.
'">'.$a_set[
"name"].
'</a>';
165 $this->tpl->setVariable(
"VAL_LANGUAGE", $a_set[
"name"].$status);
166 $this->tpl->setVariable(
"VAL_STATUS", $lng->txt($a_set[
"desc"]).
"<br/>".$remark);
167 $this->tpl->setVariable(
"OBJ_ID", $a_set[
"obj_id"]);