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"));
39 $this->
addColumn($this->lng->txt(
"usr_agreement"));
45 if ($ilSetting->get(
"lang_ext_maintenance"))
47 $this->
setRowTemplate(
"tpl.lang_list_row_extended.html",
"Services/Language");
51 $this->
setRowTemplate(
"tpl.lang_list_row.html",
"Services/Language");
59 if ($ilSetting->get(
"lang_ext_maintenance") ==
"1")
67 $this->
addMultiCommand(
"setSystemLanguage", $lng->txt(
"setSystemLanguage"));
68 $this->
addMultiCommand(
"setUserLanguage", $lng->txt(
"setUserLanguage"));
77 $languages = $this->folder->getLanguages();
79 foreach ($languages as $k =>
$l)
81 $data[] = array_merge(
$l, array(
"key" => $k));
98 $status =
"<span class=\"small\"> (".$lng->txt($a_set[
"status"]).
")</span>";
102 switch ($a_set[
"info"])
104 case "file_not_found":
105 $remark =
"<span class=\"smallred\"> ".$lng->txt($a_set[
"info"]).
"</span>";
116 if($ilSetting->get(
"lang_ext_maintenance")
117 and $ilSetting->get(
"lang_translate_". $a_set[
'key'],
false))
119 $remark .= $remark ?
'<br />' :
'';
120 $remark .=
"<span class=\"smallgreen\"> ".$lng->txt(
'language_translation_enabled').
"</span>";
123 if (file_exists(
"./Customizing/clients/".CLIENT_ID.
"/agreement/".
124 "agreement_".$a_set[
"key"].
".html"))
126 $agreement_exists_str = $lng->txt(
"available").
" (".$lng->txt(
"client").
")";
128 else if (file_exists(
"./Customizing/global/agreement/".
129 "agreement_".$a_set[
"key"].
".html"))
131 $agreement_exists_str = $lng->txt(
"available");
135 if ($a_set[
"status"] ==
"system_language")
137 $agreement_exists_str =
"<b>".$lng->txt(
"missing").
"</b>";
141 $agreement_exists_str = $lng->txt(
"missing");
146 if ($rbacsystem->checkAccess(
"write", $this->folder->getRefId()))
148 if ($ilSetting->get(
"lang_ext_maintenance") ==
"1")
150 if (substr($lang_data[
"description"],0,9) ==
"installed")
152 $ilCtrl->setParameterByClass(
"ilobjlanguageextgui",
"obj_id",$a_set[
"obj_id"]);
153 $url = $ilCtrl->getLinkTargetByClass(
"ilobjlanguageextgui",
"");
154 $a_set[
"name"] =
'<a href="'.$url.
'">'.$a_set[
"name"].
'</a>';
159 if ($a_set[
"desc"] !=
"not_installed")
161 $this->tpl->setVariable(
"LAST_REFRESH",
164 if ($ilSetting->get(
"lang_ext_maintenance"))
167 $this->tpl->setVariable(
"LAST_CHANGE",
175 if ($rbacsystem->checkAccess(
"write",$this->folder->getRefId()))
177 if ($ilSetting->get(
"lang_ext_maintenance") ==
"1")
179 if (substr($a_set[
"description"],0,9) ==
"installed")
181 $ilCtrl->setParameterByClass(
"ilobjlanguageextgui",
"obj_id", $a_set[
"obj_id"]);
182 $url = $ilCtrl->getLinkTargetByClass(
"ilobjlanguageextgui",
"");
183 $a_set[
"name"] =
'<a href="'.$url.
'">'.$a_set[
"name"].
'</a>';
188 $this->tpl->setVariable(
"VAL_LANGUAGE", $a_set[
"name"].$status);
189 $this->tpl->setVariable(
"VAL_STATUS", $lng->txt($a_set[
"desc"]).
"<br/>".$remark);
190 $this->tpl->setVariable(
"VAL_USER_AGREEMENT", $agreement_exists_str);
191 $this->tpl->setVariable(
"OBJ_ID", $a_set[
"obj_id"]);