39 $lng = $DIC->language();
42 $rbacsystem = $DIC->rbac()->system();
44 if (isset(self::$cached_check_translate)) {
45 return self::$cached_check_translate;
49 self::$cached_check_translate =
false;
50 return self::$cached_check_translate;
54 $ref_id = self::_lookupLangFolderRefId();
55 self::$cached_check_translate = $rbacsystem->checkAccess(
"read,write", (
int) $ref_id);
58 self::$cached_check_translate =
false;
61 return self::$cached_check_translate;
77 $rbacsystem = $DIC->rbac()->system();
80 $ref_id = self::_lookupLangFolderRefId();
81 return $rbacsystem->checkAccess(
"read,write", (
int) $ref_id);
95 $ilDB = $DIC->database();
97 $q =
"SELECT ref_id FROM object_reference r, object_data d" .
98 " WHERE r.obj_id = d.obj_id AND d.type = " .
$ilDB->quote(
"lngf",
"text");
99 $set =
$ilDB->query($q);
100 $row =
$ilDB->fetchAssoc($set);
101 return $row[
'ref_id'];
114 $ilDB = $DIC->database();
116 $q =
"SELECT obj_id FROM object_data " .
117 " WHERE type = " .
$ilDB->quote(
"lng",
"text") .
118 " AND title = " .
$ilDB->quote($a_key,
"text");
119 $set =
$ilDB->query($q);
120 $row =
$ilDB->fetchAssoc($set);
121 return $row[
'obj_id'];
134 .
"?ref_id=" . self::_lookupLangFolderRefId()
135 .
"&baseClass=ilAdministrationGUI" 136 .
"&cmdClass=ilobjlanguageextgui" 137 .
"&view_mode=translate" 138 .
"&reset_offset=true";
153 return (strtolower(
$_GET[
'cmdClass'] ==
'ilobjlanguageextgui') and
$_GET[
'view_mode'] ==
"translate");
164 $lng = $DIC->language();
166 if (self::_checkTranslate() and !self::_isPageTranslation()) {
167 $_SESSION[
'lang_ext_maintenance'][
'used_modules'] = array_keys(
$lng->getUsedModules());
168 $_SESSION[
'lang_ext_maintenance'][
'used_topics'] = array_keys(
$lng->getUsedTopics());
179 $saved =
$_SESSION[
'lang_ext_maintenance'][
'used_modules'];
180 return is_array($saved) ? $saved : array();
190 $saved =
$_SESSION[
'lang_ext_maintenance'][
'used_topics'];
191 return is_array($saved) ? $saved : array();
static _isPageTranslation()
Check if the current request is a page translation.
static _getSavedModules()
Get the stored modules from the user session.
static $cached_check_translate
static _checkMaintenance()
Permission check for language maintenance (import/export)
static _lookupId($a_key)
Lookup the object ID for a language key.
static _getTranslationLink()
Get the link to translate the current page.
static _lookupLangFolderRefId()
Lookup the ref_id of the global language folder.
static _getSavedTopics()
Get the stored topics from the user session.
static _saveUsages()
Store the collected language variable usages in the user session This should be called as late as pos...
static _checkTranslate()
Permission check for translations.