4 define(
"ILIAS_LANGUAGE_MODULE",
"Services/Language");
6 require_once(
"classes/class.ilObjectGUI.php");
7 require_once(
"Services/Language/classes/class.ilObjLanguageAccess.php");
49 $lng->loadLanguageModule(
"administration");
50 $lng->loadLanguageModule(
"meta");
53 $ilCtrl->saveParameter($this,
"view_mode");
57 if (! $this->
id =
$_GET[
'obj_id'])
63 $this->
ilObjectGUI($a_data, $this->
id,
false,
true);
66 if (!is_array(
$_SESSION[get_class($this)]))
70 $this->session =&
$_SESSION[get_class($this)];
74 $this->langmode = $ilClientIniFile->readVariable(
"system",
"LANGMODE");
86 require_once(
"Services/Language/classes/class.ilObjLanguageExt.php");
98 $this->ilErr->raiseError($this->lng->txt(
"permission_denied"),$this->ilErr->MESSAGE);
102 $cmd = $this->ctrl->getCmd(
"view").
"Object";
123 $this->tpl->addBlockFile(
"ADM_CONTENT",
"adm_content",
"tpl.lang_edit_items.html",
"Services/Language");
126 $compare = $this->
getPar(
'compare', $this->lng->getDefaultLanguage());
129 if ($compare == $this->object->key)
131 $compare_object = $this->
object->getGlobalLanguageFile();
132 $compare_content = $compare_object->getAllValues();
133 $compare_comments = $compare_object->getAllComments();
134 $compare_note =
" ". $this->lng->txt(
"language_default_entries");
138 $remarks = $this->
object->getAllRemarks();
148 $modules = $this->
getPar(
"page_modules", array());
149 $topics = $this->
getPar(
"page_topics", array());
151 if (!isset($compare_content))
154 $compare, $modules, $topics);
160 $this->object->key, $modules, $topics);
168 $offset = $this->
getPar(
'offset',
'0');
169 $limit = $ilUser->getPref(
"hits_per_page");
171 $filter_mode = $this->
getPar(
'filter_mode',
'all');
172 $filter_pattern = $this->
getPar(
'filter_pattern',
'');
173 $filter_module = $this->
getPar(
'filter_module',
'administration');
174 $filter_modules = $filter_module ? array($filter_module) : array();
176 if (!isset($compare_content))
179 $compare, $filter_modules);
184 switch ($filter_mode)
187 $translations = $this->
object->getChangedValues(
188 $filter_modules, $filter_pattern);
192 $translations = $this->
object->getAddedValues(
193 $filter_modules, $filter_pattern);
197 $translations = $this->
object->getUnchangedValues(
198 $filter_modules, $filter_pattern);
202 $translations = $this->
object->getCommentedValues(
203 $filter_modules, $filter_pattern);
207 $translations = $this->
object->getAllValues(
208 $filter_modules, $filter_pattern);
210 $translations = array_intersect_key($translations, $remarks);
214 $translations = $this->
object->getAllValues(
215 $filter_modules, $filter_pattern);
217 $translations = array_intersect_assoc($translations, $compare_content);
221 $translations = $this->
object->getAllValues(
222 $filter_modules, $filter_pattern);
224 $translations = array_diff_assoc($translations, $compare_content);
228 $former_file = $this->
object->getCustLangPath() .
'/ilias_' . $this->
object->key .
'.lang';
229 if (!is_readable($former_file))
232 .
'<br />'. $this->lng->txt(
"language_former_file_description") ,
false);
233 $translations = array();
236 $global_file_obj = $this->
object->getGlobalLanguageFile();
238 $former_file_obj->read();
239 $global_changes = array_diff_assoc(
240 $global_file_obj->getAllValues(),
241 $former_file_obj->getAllValues());
242 if (!count($global_changes))
244 ilUtil::sendInfo(sprintf($this->lng->txt(
"language_former_file_equal"), $former_file)
245 .
'<br />'. $this->lng->txt(
"language_former_file_description") ,
false);
246 $translations = array();
249 $translations = $this->
object->getChangedValues(
250 $filter_modules, $filter_pattern);
252 $translations = array_intersect_key($translations, $global_changes);
257 $translations = $this->
object->getAllValues(
258 $filter_modules, $filter_pattern);
262 $this->tpl->setCurrentBlock(
"filter");
266 $options[
""] = $this->lng->txt(
"language_all_modules");
268 foreach ($modules as $mod)
270 $options[$mod] = $mod;
272 $this->tpl->setVariable(
"SELECT_MODULE",
277 $options[
"all"] = $this->lng->txt(
"language_scope_global");
278 $options[
"changed"] = $this->lng->txt(
"language_scope_local");
281 $options[
"added"] = $this->lng->txt(
"language_scope_added");
283 $options[
"unchanged"] = $this->lng->txt(
"language_scope_unchanged");
284 $options[
"equal"] = $this->lng->txt(
"language_scope_equal");
285 $options[
"different"] = $this->lng->txt(
"language_scope_different");
286 $options[
"commented"] = $this->lng->txt(
"language_scope_commented");
289 $options[
"dbremarks"] = $this->lng->txt(
"language_scope_dbremarks");
291 $options[
"conflicts"] = $this->lng->txt(
"language_scope_conflicts");
292 $this->tpl->setVariable(
"SELECT_MODE",
296 $this->tpl->setVariable(
"PATTERN_NAME",
"filter_pattern");
300 $this->tpl->setVariable(
"FILTER_ACTION", $this->ctrl->getFormAction($this));
301 $this->tpl->setVariable(
"TXT_FILTER", $this->lng->txt(
"filter"));
302 $this->tpl->setVariable(
"OFFSET_NAME",
"offset");
303 $this->tpl->setVariable(
"OFFSET_VALUE",
"0");
304 $this->tpl->setVariable(
"TXT_APPLY_FILTER", $this->lng->txt(
"apply_filter"));
305 $this->tpl->setVariable(
"CMD_FILTER",
"view");
306 $this->tpl->parseCurrentBlock();
310 $this->tpl->setCurrentBlock(
"compare");
311 $this->tpl->setVariable(
"COMPARE_ACTION", $this->ctrl->getFormAction($this));
312 $this->tpl->setVariable(
"TXT_COMPARE", $this->lng->txt(
"language_compare"));
313 $this->tpl->setVariable(
"TXT_CHANGE", $this->lng->txt(
"change"));
315 $langlist = $this->lng->getInstalledLanguages();
316 foreach ($langlist as $lang_key)
318 $options[$lang_key] = $this->lng->txt(
"meta_l_".$lang_key);
320 $this->tpl->setVariable(
"SELECT_COMPARE",
322 $this->tpl->setVariable(
"CMD_COMPARE",
"view");
323 $this->tpl->parseCurrentBlock();
326 $sort_by = $this->
getPar(
'sort_by',
'translation');
327 $sort_order = $this->
getPar(
'sort_order',
'asc');
330 foreach($translations as
$name => $translation)
332 $keys = explode($this->lng->separator,
$name);
335 $data[
"module"] = $keys[0];
336 $data[
"topic"] = $keys[1];
338 $data[
"translation"] = $translation;
340 $data[
"default_comment"] = $compare_comments[
$name];
347 $list = array_slice($list, $offset, $limit);
351 include_once
'Services/Table/classes/class.ilTableGUI.php';
354 $tbl->disable(
'title');
356 $tbl->setHeaderNames(array($this->lng->txt(
"module"),
357 $this->lng->txt(
"identifier"),
358 $this->lng->txt(
"meta_l_".$this->object->key),
359 $this->lng->txt(
"meta_l_".$compare).$compare_note));
361 $tbl->setHeaderVars(array(
"module",
365 $this->ctrl->getParameterArray($this));
368 $tbl->setColumnWidth(array(
"10%",
373 $tbl->setOrderColumn($sort_by);
374 $tbl->setOrderDirection($sort_order);
375 $tbl->setLimit($limit);
376 $tbl->setOffset($offset);
377 $tbl->setMaxCount(count($translations));
382 $tpl->setCurrentBlock(
"tbl_form_header");
383 $tpl->setVariable(
"FORMACTION",$this->ctrl->getFormAction($this));
384 $tpl->parseCurrentBlock();
386 $tpl->setCurrentBlock(
"tbl_action_btn");
387 $tpl->setVariable(
"BTN_NAME",
'save');
388 $tpl->setVariable(
"BTN_VALUE",$this->lng->txt(
'save'));
389 $tpl->parseCurrentBlock();
391 $tpl->setCurrentBlock(
"tbl_action_row");
392 $tpl->setVariable(
"COLUMN_COUNTS",
"4");
393 $tpl->parseCurrentBlock();
396 $tpl->addBlockfile(
"TBL_CONTENT",
"tbl_content",
"tpl.lang_items_row.html",
"Services/Language");
397 foreach ($list as
$data)
401 $tpl->setCurrentBlock(
'comment');
405 $tpl->setVariable(
"COM_SIZE", $this->commentsize);
406 $tpl->setVariable(
"COM_MAX", 250);
407 $tpl->setVariable(
"TXT_COMMENT", $this->lng->txt(
'comment'));
408 $tpl->parseCurrentBlock();
412 $tpl->setCurrentBlock(
'hidden_comment');
415 $tpl->parseCurrentBlock();
418 $tpl->setCurrentBlock(
"row");
419 $tpl->setVariable(
"T_ROWS", ceil(strlen($data[
"translation"]) / $this->inputsize));
420 $tpl->setVariable(
"T_SIZE", $this->inputsize);
428 $tpl->parseCurrentBlock();
432 $tbl->setTemplate(
$tpl);
434 $this->tpl->setVariable(
"TRANSLATION_TABLE",
$tpl->get());
445 $save_array = array();
446 $remarks_array = array();
447 foreach (
$_POST as $key => $value)
451 if (count($keys) == 2)
454 $value = preg_replace(
"/(\015\012)|(\015)|(\012)/",
"<br />",$value);
456 $save_array[$key] = $value;
458 $remarks_array[$key] =
$_POST[$key.$this->lng->separator.
"comment"];
475 $this->tpl->addBlockFile(
"ADM_CONTENT",
"adm_content",
"tpl.lang_file_import.html",
"Services/Language");
477 $this->tpl->setVariable(
"FORMACTION",$this->ctrl->getFormAction($this));
478 $this->tpl->setVariable(
"TXT_HEADER",$this->lng->txt(
"language_import_file"));
479 $this->tpl->setVariable(
"TXT_FILE",$this->lng->txt(
"file"));
481 $this->tpl->setVariable(
"TXT_MODE",$this->lng->txt(
"language_mode_existing"));
482 $this->tpl->setVariable(
"TXT_MODE_KEEPALL",$this->lng->txt(
"language_mode_existing_keepall"));
483 $this->tpl->setVariable(
"TXT_MODE_KEEPNEW",$this->lng->txt(
"language_mode_existing_keepnew"));
484 $this->tpl->setVariable(
"TXT_MODE_REPLACE",$this->lng->txt(
"language_mode_existing_replace"));
485 $this->tpl->setVariable(
"TXT_MODE_DELETE",$this->lng->txt(
"language_mode_existing_delete"));
487 $this->tpl->setVariable(
"TXT_UPLOAD",$this->lng->txt(
"upload"));
488 $this->tpl->setVariable(
"CMD_UPLOAD",
"upload");
498 if (
$_POST[
'cmd'][
'upload'])
500 $file = $_FILES[
'userfile'][
'tmp_name'].
'x';
503 $_FILES[
'userfile'][
'name'],
506 $this->
object->importLanguageFile(
$file,
$_POST[
'mode_existing']);
507 ilUtil::sendSuccess(sprintf($this->lng->txt(
"language_file_imported"), $_FILES[
'userfile'][
'name']) ,
false);
529 $this->tpl->addBlockFile(
"ADM_CONTENT",
"adm_content",
"tpl.lang_file_export.html",
"Services/Language");
531 $this->tpl->setVariable(
"FORMACTION",$this->ctrl->getFormAction($this));
532 $this->tpl->setVariable(
"TXT_HEADER",$this->lng->txt(
"language_export_file"));
534 $this->tpl->setVariable(
"TXT_SCOPE",$this->lng->txt(
"language_file_scope"));
535 $this->tpl->setVariable(
"TXT_SCOPE_GLOBAL",$this->lng->txt(
"language_scope_global"));
536 $this->tpl->setVariable(
"TXT_SCOPE_LOCAL",$this->lng->txt(
"language_scope_local"));
537 $this->tpl->setVariable(
"TXT_SCOPE_UNCHANGED",$this->lng->txt(
"language_scope_unchanged"));
539 $this->tpl->setVariable(
"CHECKED_GLOBAL",$scope ==
'global' ?
'checked="checked"' :
'');
540 $this->tpl->setVariable(
"CHECKED_LOCAL",$scope ==
'local' ?
'checked="checked"' :
'');
541 $this->tpl->setVariable(
"CHECKED_UNCHANGED",$scope ==
'unchanged' ?
'checked="checked"' :
'');
545 $this->tpl->setVariable(
"TXT_SCOPE_ADDED",$this->lng->txt(
"language_scope_added"));
546 $this->tpl->setVariable(
"CHECKED_ADDED",$scope ==
'added' ?
'checked="checked"' :
'');
548 $this->tpl->setVariable(
"TXT_SCOPE_MERGED",$this->lng->txt(
"language_scope_merged"));
549 $this->tpl->setVariable(
"CHECKED_MERGED",$scope ==
'merged' ?
'checked="checked"' :
'');
552 $this->tpl->setVariable(
"TXT_DOWNLOAD",$this->lng->txt(
"download"));
553 $this->tpl->setVariable(
"CMD_DOWNLOAD",
"download");
563 $filename =
'ilias_' . $this->
object->key .
'_'
565 .
"-" . date(
'Y-m-d')
566 .
".lang.".$_POST[
"scope"];
568 $global_file_obj = $this->
object->getGlobalLanguageFile();
571 if (
$_POST[
"scope"] ==
'global')
573 $local_file_obj->setParam(
"author", $global_file_obj->getParam(
'author'));
574 $local_file_obj->setParam(
"version", $global_file_obj->getParam(
'version'));
575 $local_file_obj->setAllValues($this->object->getAllValues());
578 $local_file_obj->setAllComments($this->object->getAllRemarks());
581 elseif (
$_POST[
"scope"] ==
'local')
583 $local_file_obj->setParam(
"based_on", $global_file_obj->getParam(
'version'));
584 $local_file_obj->setAllValues($this->object->getChangedValues());
587 $local_file_obj->setAllComments($this->object->getAllRemarks());
590 elseif (
$_POST[
"scope"] ==
'added')
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->getAddedValues());
595 $local_file_obj->setAllComments($this->object->getAllRemarks());
597 elseif (
$_POST[
"scope"] ==
'unchanged')
599 $local_file_obj->setParam(
"author", $global_file_obj->getParam(
'author'));
600 $local_file_obj->setParam(
"version", $global_file_obj->getParam(
'version'));
601 $local_file_obj->setAllValues($this->object->getUnchangedValues());
604 $local_file_obj->setAllComments($this->object->getAllRemarks());
607 elseif (
$_POST[
"scope"] ==
'merged')
609 $local_file_obj->setParam(
"author", $global_file_obj->getParam(
'author'));
610 $local_file_obj->setParam(
"version", $global_file_obj->getParam(
'version'));
611 $local_file_obj->setAllValues($this->object->getMergedValues());
612 $local_file_obj->setAllComments($this->object->getMergedRemarks());
626 switch (
$_POST[
"maintain"])
630 $lang_file = $this->
object->getCustLangPath() .
'/ilias_' . $this->
object->key .
'.lang.local';
632 if ((is_file($lang_file) and is_writable($lang_file))
633 or (!file_exists($lang_file) and is_writable($this->object->getCustLangPath())))
636 $orig_file = $this->
object->getLangPath() .
'/ilias_' . $this->
object->key .
'.lang';
637 $copy_file = $this->
object->getCustLangPath() .
'/ilias_' . $this->
object->key .
'.lang';
638 @copy($orig_file, $copy_file);
641 @rename($lang_file, $lang_file.
".bak");
644 $global_file_obj = $this->
object->getGlobalLanguageFile();
645 $local_file_obj =
new ilLanguageFile($lang_file, $this->object->key,
'local');
646 $local_file_obj->setParam(
'based_on', $global_file_obj->getParam(
'version'));
647 $local_file_obj->setAllValues($this->object->getChangedValues());
650 $local_file_obj->setAllComments($this->object->getAllRemarks());
652 $local_file_obj->write();
654 $this->
object->setLocal(
true);
665 $lang_file = $this->
object->getCustLangPath() .
'/ilias_' . $this->
object->key .
'.lang.local';
666 if (is_file($lang_file) and is_readable($lang_file))
668 $this->
object->importLanguageFile($lang_file,
'replace');
669 $this->
object->setLocal(
true);
680 $lang_file = $this->
object->getLangPath() .
'/ilias_' . $this->
object->key .
'.lang';
681 if (is_file($lang_file) and is_readable($lang_file))
683 $this->
object->importLanguageFile($lang_file,
'delete');
684 $this->
object->setLocal(
false);
701 $orig_file = $this->
object->getLangPath() .
'/ilias_' . $this->
object->key .
'.lang';
702 $copy_file = $this->
object->getCustLangPath() .
'/ilias_' . $this->
object->key .
'.lang';
704 if (is_file($orig_file) and is_writable($orig_file))
707 @copy($orig_file, $copy_file);
710 $global_file_obj = $this->
object->getGlobalLanguageFile();
711 $global_file_obj->setAllValues($this->object->getMergedValues());
712 $global_file_obj->setAllComments($this->object->getMergedRemarks());
713 $global_file_obj->write();
723 case "remove_local_file":
724 $lang_file = $this->
object->getCustLangPath() .
'/ilias_' . $this->
object->key .
'.lang.local';
726 if (!is_file($lang_file))
728 $this->
object->setLocal(
false);
731 elseif (@unlink($lang_file))
733 $this->
object->setLocal(
false);
744 $this->tpl->addBlockFile(
"ADM_CONTENT",
"adm_content",
"tpl.lang_maintenance.html",
"Services/Language");
745 $this->tpl->setVariable(
"FORMACTION",$this->ctrl->getFormAction($this));
746 $this->tpl->setVariable(
"TXT_MAINTENANCE",$this->lng->txt(
"language_maintenance"));
747 $this->tpl->setVariable(
"TXT_MAINTAIN_LOCAL",$this->lng->txt(
"language_maintain_local_changes"));
748 $this->tpl->setVariable(
"TXT_SELECT",$this->lng->txt(
"please_select"));
749 $this->tpl->setVariable(
"TXT_SAVE",$this->lng->txt(
"language_save_local_changes"));
750 $this->tpl->setVariable(
"TXT_LOAD",$this->lng->txt(
"language_load_local_changes"));
751 $this->tpl->setVariable(
"TXT_CLEAR",$this->lng->txt(
"language_clear_local_changes"));
754 $this->tpl->setVariable(
"TXT_DELETE_ADDED",$this->lng->txt(
"language_delete_local_additions"));
755 $this->tpl->setVariable(
"TXT_MERGE",$this->lng->txt(
"language_merge_local_changes"));
756 $this->tpl->setVariable(
"TXT_REMOVE_LOCAL_FILE",$this->lng->txt(
"language_remove_local_file"));
758 $this->tpl->setVariable(
"TXT_NOTE_SAVE",$this->lng->txt(
"language_note_save_local"));
759 $this->tpl->setVariable(
"TXT_MAINTAIN",$this->lng->txt(
"language_process_maintenance"));
760 $this->tpl->setVariable(
"VAR_MAINTAIN",
"maintain");
761 $this->tpl->setVariable(
"CMD_MAINTAIN",
"maintain");
772 $translate_key =
"lang_translate_". $this->
object->key;
775 switch (
$_POST[
"translation"])
778 $ilSetting->set($translate_key,
true);
781 $ilSetting->set($translate_key,
false);
783 $translate = $ilSetting->get($translate_key,
false);
785 $this->tpl->addBlockFile(
"ADM_CONTENT",
"adm_content",
"tpl.lang_settings.html",
"Services/Language");
787 $this->tpl->setVariable(
"FORMACTION",$this->ctrl->getFormAction($this));
788 $this->tpl->setVariable(
"TXT_SETTINGS",$this->lng->txt(
"language_settings"));
789 $this->tpl->setVariable(
"TXT_TRANSLATION",$this->lng->txt(
"language_translation_mode"));
790 $this->tpl->setVariable(
"TXT_TRANSLATION_ENABLED",$this->lng->txt(
"language_translation_enabled"));
791 $this->tpl->setVariable(
"TXT_TRANSLATION_DISABLED",$this->lng->txt(
"language_translation_disabled"));
792 $this->tpl->setVariable(
"CHECKED_ENABLE", $translate ?
'checked="checked"':
'');
793 $this->tpl->setVariable(
"CHECKED_DISABLE", $translate ?
'' :
'checked="checked"');
794 $this->tpl->setVariable(
"TXT_NOTE_TRANSLATION",$this->lng->txt(
"language_note_translation"));
795 $this->tpl->setVariable(
"TXT_CHANGE_SETTINGS",$this->lng->txt(
"language_change_settings"));
796 $this->tpl->setVariable(
"CMD_SETTINGS",
"settings");
809 foreach($modules as $module)
813 $row[1] = count($this->object->getAllValues(array($module)));
814 $row[2] = count($this->object->getChangedValues(array($module)));
815 $row[3] = $row[1]-$row[2];
821 $total[0] =
"<b>".$this->lng->txt(
"language_all_modules").
"</b>";
822 $total[1] =
"<b>".$total[1].
"</b>";
823 $total[2] =
"<b>".$total[2].
"</b>";
824 $total[3] =
"<b>".$total[3].
"</b>";
828 $this->tpl->addBlockFile(
"ADM_CONTENT",
"adm_content",
"tpl.lang_statistics.html",
"Services/Language");
829 $this->tpl->addBlockFile(
"TABLE_STATISTICS",
"table_statistics",
"tpl.table.html");
830 $this->tpl->addBlockFile(
"TBL_CONTENT",
"tbl_content",
"tpl.obj_tbl_rows.html");
833 include_once
'Services/Table/classes/class.ilTableGUI.php';
835 $tbl->disable(
'title');
836 $tbl->disable(
'sort');
837 $tbl->disable(
'numinfo');
839 $tbl->setHeaderNames(array($this->lng->txt(
"module"),
840 $this->lng->txt(
"language_scope_global"),
841 $this->lng->txt(
"language_scope_local"),
842 $this->lng->txt(
"language_scope_unchanged")));
843 $tbl->setColumnWidth(array(
"25%",
"25%",
"25%",
"25%"));
844 $tbl->setLimit(count(
$data));
845 $tbl->setData(
$data);
862 function getPar($a_request_name, $a_default_value)
865 if (isset(
$_GET[$a_request_name]))
867 $param =
$_GET[$a_request_name];
868 $from_request =
true;
870 elseif (isset(
$_POST[$a_request_name]))
872 $param =
$_POST[$a_request_name];
873 $from_request =
true;
875 elseif (isset($this->session[$a_request_name]))
877 $param = $this->session[$a_request_name];
878 $from_request =
false;
882 $param = $a_default_value;
883 $from_request =
false;
889 if (is_array($param))
891 foreach ($param as $key => $value)
903 $this->session[$a_request_name] = $param;
916 $tabs_gui->addTarget(
"edit",
917 $this->ctrl->getLinkTarget($this,
"view"),
918 array(
"",
"view",
"cancel",
"save"));
920 $tabs_gui->addTarget(
"export",
921 $this->ctrl->getLinkTarget($this,
"export"),
922 array(
"export",
"download"));
924 $tabs_gui->addTarget(
"import",
925 $this->ctrl->getLinkTarget($this,
"import"),
926 array(
"import",
"upload"));
928 $tabs_gui->addTarget(
"language_maintain",
929 $this->ctrl->getLinkTarget($this,
"maintain"),
932 $tabs_gui->addTarget(
"settings",
933 $this->ctrl->getLinkTarget($this,
"settings"),
936 $tabs_gui->addTarget(
"language_statistics",
937 $this->ctrl->getLinkTarget($this,
"statistics"),
938 array(
"statistics"));
951 $this->tpl->addBlockFile(
"CONTENT",
"content",
"tpl.adm_translate.html",
"Services/Language");
952 $this->tpl->setHeaderPageTitle($this->lng->txt(
"translation"));
953 $this->tpl->setTitle($this->lng->txt(
"translation").
" "
954 .$this->lng->txt(
"meta_l_".$this->object->key));
956 $this->lng->txt(
"obj_" . $this->object->getType()));
972 global $ilLocator,
$tpl;
974 $ilLocator->addItem($this->lng->txt(
"administration"),
975 $this->ctrl->getLinkTargetByClass(
"iladministrationgui",
"frameset"),
978 $ilLocator->addItem($this->lng->txt(
"languages"),
979 $this->ctrl->getLinkTargetByClass(
"ilobjlanguagefoldergui",
""));
981 $ilLocator->addItem($this->lng->txt(
"meta_l_". $this->object->getTitle()),
982 $this->ctrl->getLinkTarget($this,
"view"));
992 $this->tpl->setTitle($this->lng->txt(
"meta_l_".$this->object->getTitle()));
994 $this->tpl->setTitleIcon(
ilUtil::getImagePath(
"icon_".$this->object->getType().
"_b.gif"), $this->lng->txt(
"obj_" . $this->object->getType()));
1016 return (
$_GET[
'view_mode'] ==
"translate");
1034 if (self::_isPageTranslation()
1035 or !$ilSetting->get(
"lang_translate_".$lng->getLangKey()))
1042 $action =
"ilias.php"
1043 .
"?ref_id=".ilobjLanguageAccess::_lookupLangFolderRefId()
1044 .
"&baseClass=ilAdministrationGUI"
1045 .
"&cmdClass=ilobjlanguageextgui"
1046 .
"&view_mode=translate";
1048 $tpl =
new ilTemplate(
"tpl.translation_link.html",
true,
true,
"Services/Language");
1050 foreach($lng->getUsedModules() as $module => $dummy)
1052 $tpl->setCurrentBlock(
"hidden");
1053 $tpl->setVariable(
"NAME",
"page_modules[]");
1055 $tpl->parseCurrentBlock();
1058 foreach($lng->getUsedTopics() as $topic => $dummy)
1060 $tpl->setCurrentBlock(
"hidden");
1061 $tpl->setVariable(
"NAME",
"page_topics[]");
1063 $tpl->parseCurrentBlock();
1066 $tpl->setVariable(
"ACTION", $action);
1067 $tpl->setVariable(
"TXT_TRANSLATE",$lng->txt(
"translation"));