ILIAS  release_5-2 Revision v5.2.25-18-g3f80b828510
ilLanguage Class Reference

language handling More...

+ Inheritance diagram for ilLanguage:
+ Collaboration diagram for ilLanguage:

Public Member Functions

 __construct ($a_lang_key)
 Constructor read the single-language file and put this in an array text. More...
 
 getLangKey ()
 
 getDefaultLanguage ()
 
 txtlng ($a_module, $a_topic, $a_language)
 gets the text for a given topic in a given language if the topic is not in the list, the topic itself with "-" will be returned More...
 
 txt ($a_topic, $a_default_lang_fallback_mod="")
 gets the text for a given topic if the topic is not in the list, the topic itself with "-" will be returned More...
 
 exists ($a_topic)
 Check if language entry exists. More...
 
 loadLanguageModule ($a_module)
 
 getInstalledLanguages ()
 
 getUsedTopics ()
 
 getUsedModules ()
 
 getUserLanguage ()
 
 toJS ($a_lang_key, ilTemplate $a_tpl=null)
 
 toJSMap ($a_map, ilTemplate $a_tpl=null)
 Transfer text to Javascript. More...
 
 __destruct ()
 destructor saves all language usages to db if log is enabled and ilDB exists More...
 
 __construct ($a_lang_key)
 Constructor read the single-language file and put this in an array text. More...
 
 txt ($a_topic)
 gets the text for a given topic More...
 
 getLanguages ()
 get all setup languages in the system More...
 
 installLanguages ($a_lang_keys, $a_local_keys)
 install languages More...
 
 getInstalledLanguages ()
 get already installed languages (in db) More...
 
 getInstalledLocalLanguages ()
 get already installed local languages (in db) More...
 
 getAvailableLanguages ()
 get already registered languages (in db) More...
 
 checkLanguage ($a_lang_key, $scope='')
 validate the logical structure of a lang-file More...
 
 cut_header ($content)
 Remove *.lang header information from '$content'. More...
 
 flushLanguage ($a_lang_key, $a_mode='all')
 remove language data from database More...
 
 getLocalChanges ($a_lang_key, $a_min_date="", $a_max_date="")
 get locally changed language entries More...
 
 insertLanguage ($lang_key, $scope='')
 insert language data from file in database More...
 
 getLocalLanguages ()
 Searches for the existence of *.lang.local files. More...
 
 getInstallableLanguages ()
 
 setDbHandler ($a_db_handler)
 set db handler object object db handler More...
 
 loadLanguageModule ()
 

Static Public Member Functions

static _getInstalledLanguages ()
 
static _lookupEntry ($a_lang_key, $a_mod, $a_id)
 
static lookupId ($a_lang_key)
 Lookup obj_id of language ilDB $ilDB. More...
 
static _deleteLangData ($a_lang_key, $a_keep_local_change)
 Delete languge data. More...
 
static replaceLangModule ($a_key, $a_module, $a_array)
 Replace language module array. More...
 
static replaceLangEntry ($a_module, $a_identifier, $a_lang_key, $a_value, $a_local_change=null)
 Replace lang entry. More...
 
static updateLangEntry ($a_module, $a_identifier, $a_lang_key, $a_value, $a_local_change=null)
 Update lang entry. More...
 

Data Fields

 $ilias
 
 $text = array()
 
 $lang_default = "en"
 
 $lang_user
 
 $lang_path
 
 $lang_key
 
 $lang_name
 
 $separator = "#:#"
 
 $comment_separator = "###"
 
 $loaded_modules
 

Static Protected Member Functions

static logUsage ($a_module, $a_identifier)
 saves tupel of language module and identifier More...
 

Protected Attributes

 $cached_modules = array()
 
 $map_modules_txt = array()
 
 $usage_log_enabled = false
 

Static Protected Attributes

static $used_topics = array()
 
static $used_modules = array()
 
static $lng_log = array()
 

Detailed Description

language handling

language handling for setup

this class offers the language handling for an application. it works initially on one file: languages.txt from this file the class can generate many single language files. the constructor is called with a small language abbreviation e.g. $lng = new Language("en"); the constructor reads the single-languagefile en.lang and puts this into an array. with e.g. $lng->txt("user_updated"); you can translate a lang-topic into the actual language

Author
Peter Gabriel pgabr.nosp@m.iel@.nosp@m.datab.nosp@m.ay.d.nosp@m.e
Version
$Id$
Todo:
Das Datefeld wird bei Aenderungen einer Sprache (update, install, deinstall) nicht richtig gesetzt!!! Die Formatfunktionen gehoeren nicht in class.Language. Die sind auch woanders einsetzbar!!! Daher->besser in class.Format

this class offers the language handling for an application. the constructor is called with a small language abbreviation e.g. $lng = new Language("en"); the constructor reads the single-languagefile en.lang and puts this into an array. with e.g. $lng->txt("user_updated"); you can translate a lang-topic into the actual language

Author
Peter Gabriel pgabr.nosp@m.iel@.nosp@m.datab.nosp@m.ay.d.nosp@m.e
Version
$Id$
Todo:
The DATE field is not set correctly on changes of a language (update, install, your stable). The format functions do not belong in class.Language. Those are also applicable elsewhere. Therefore, they would be better placed in class.Format

Definition at line 26 of file class.ilLanguage.php.

Constructor & Destructor Documentation

◆ __construct() [1/2]

ilLanguage::__construct (   $a_lang_key)

Constructor read the single-language file and put this in an array text.

the text array is two-dimensional. First dimension is the language. Second dimension is the languagetopic. Content is the translation.

public

Parameters
stringlanguagecode (two characters), e.g. "de", "en", "in"
Returns
boolean false if reading failed

Definition at line 154 of file class.ilLanguage.php.

References $ilias, $ilIliasIniFile, $ilSetting, $ilUser, $lang_default, $log, array, getInstalledLanguages(), ilCachedLanguage\getInstance(), and loadLanguageModule().

155  {
157 
158  $this->ilias = $ilias;
159 
160  if (!isset($log))
161  {
162  if (is_object($ilias))
163  {
164  require_once "./Services/Logging/classes/class.ilLog.php";
165  $this->log = new ilLog(ILIAS_LOG_DIR,ILIAS_LOG_FILE,$ilias->getClientId(),ILIAS_LOG_ENABLED);
166  }
167  }
168  else
169  {
170  $this->log =& $log;
171  }
172 
173  $this->lang_key = $a_lang_key;
174 
175  $this->text = array();
176  $this->loaded_modules = array();
177 
178  $this->usage_log_enabled = self::isUsageLogEnabled();
179 
180  //$this->lang_path = ILIAS_ABSOLUTE_PATH.substr($this->ilias->ini->readVariable("language","path"),1);
181 
182  // if no directory was found fall back to default lang dir
183  //if (!is_dir($this->lang_path))
184  //{
185  $this->lang_path = ILIAS_ABSOLUTE_PATH."/lang";
186  //}
187  $this->cust_lang_path = ILIAS_ABSOLUTE_PATH."/Customizing/global/lang";
188 
189  $this->lang_default = $ilIliasIniFile->readVariable("language","default");
190  if (is_object($ilSetting) && $ilSetting->get("language") != "")
191  {
192  $this->lang_default = $ilSetting->get("language");
193  }
194  $this->lang_user = $ilUser->prefs["language"];
195 
196  $langs = $this->getInstalledLanguages();
197 
198  if (!in_array($this->lang_key,$langs))
199  {
200  $this->lang_key = $this->lang_default;
201  }
202 
203  require_once('./Services/Language/classes/class.ilCachedLanguage.php');
204  $this->global_cache = ilCachedLanguage::getInstance($this->lang_key);
205  if ($this->global_cache->isActive()) {
206  $this->cached_modules = $this->global_cache->getTranslations();
207  }
208 
209  $this->loadLanguageModule("common");
210 
211  return true;
212  }
logging
Definition: class.ilLog.php:18
$ilUser
Definition: imgupload.php:18
redirection script todo: (a better solution should control the processing via a xml file) ...
Create styles array
The data for the language used.
global $ilSetting
Definition: privfeed.php:17
$ilIliasIniFile
+ Here is the call graph for this function:

◆ __destruct()

ilLanguage::__destruct ( )

destructor saves all language usages to db if log is enabled and ilDB exists

Definition at line 641 of file class.ilLanguage.php.

References $ilDB, $query, and array.

642  {
643  global $ilDB;
644 
645  //case $ilDB not existing should not happen but if something went wrong it shouldn't leads to any failures
646  if(!$this->usage_log_enabled || !(($ilDB instanceof ilDBMySQL) || ($ilDB instanceof ilDBPdoMySQLMyISAM)))
647  {
648  return;
649  }
650 
651  foreach((array)self::$lng_log as $identifier => $module)
652  {
653  $wave[] = '(' . $ilDB->quote($module, 'text'). ', ' . $ilDB->quote($identifier, 'text') . ')';
654  unset(self::$lng_log[$identifier]);
655 
656  if(count($wave) == 150 || (count(self::$lng_log) == 0 && count($wave) > 0))
657  {
658  $query = 'REPLACE INTO lng_log (module, identifier) VALUES ' . implode(', ', $wave);
659  $ilDB->manipulate($query);
660 
661  $wave = array();
662  }
663  }
664  }
Class ilDBPdoMySQLMyISAM.
MySQL Database Wrapper.
Create styles array
The data for the language used.
global $ilDB

◆ __construct() [2/2]

ilLanguage::__construct (   $a_lang_key)

Constructor read the single-language file and put this in an array text.

the text array is two-dimensional. First dimension is the language. Second dimension is the languagetopic. Content is the translation. public

Parameters
stringlanguagecode (two characters), e.g. "de", "en", "in"
Returns
boolean false if reading failed

Definition at line 100 of file class.ilLanguage.php.

References $row, $txt, and file.

101  {
102  $this->lang_key = ($a_lang_key) ? $a_lang_key : $this->lang_default;
103  $this->lang_path = ILIAS_ABSOLUTE_PATH."/lang";
104  $this->cust_lang_path = ILIAS_ABSOLUTE_PATH."/Customizing/global/lang";
105 
106  // set lang file...
107  $txt = file($this->lang_path."/setup_lang_sel_multi.lang");
108 
109  // ...and load langdata
110  if (is_array($txt))
111  {
112  foreach ($txt as $row)
113  {
114  if ($row[0] != "#")
115  {
116  $a = explode($this->separator,trim($row));
117  $this->text[trim($a[0])] = trim($a[1]);
118  }
119  }
120  }
121 
122  // set lang file...
123  $txt = file($this->lang_path."/setup_".$this->lang_key.".lang");
124 
125  // ...and load langdata
126  if (is_array($txt))
127  {
128  foreach ($txt as $row)
129  {
130  if ($row[0] != "#")
131  {
132  $a = explode($this->separator,trim($row));
133  $this->text[trim($a[0])] = trim($a[1]);
134  }
135  }
136 
137  return true;
138  }
139 
140  return false;
141  }
Reload workbook from saved file
$txt
Definition: error.php:12

Member Function Documentation

◆ _deleteLangData()

static ilLanguage::_deleteLangData (   $a_lang_key,
  $a_keep_local_change 
)
static

Delete languge data.

Parameters
stringlang key

Definition at line 517 of file class.ilLanguage.php.

References $ilDB.

Referenced by flushLanguage().

518  {
519  global $ilDB;
520 
521  if (!$a_keep_local_change)
522  {
523  $ilDB->manipulate("DELETE FROM lng_data WHERE lang_key = ".
524  $ilDB->quote($a_lang_key, "text"));
525  }
526  else
527  {
528  $ilDB->manipulate("DELETE FROM lng_data WHERE lang_key = ".
529  $ilDB->quote($a_lang_key, "text").
530  " AND local_change IS NULL");
531  }
532  }
global $ilDB
+ Here is the caller graph for this function:

◆ _getInstalledLanguages()

static ilLanguage::_getInstalledLanguages ( )
static

Definition at line 388 of file class.ilLanguage.php.

References $lang, $languages, ilObject\_getObjectsByType(), and array.

Referenced by ilLanguageDetection\__construct().

389  {
390  include_once("./Services/Object/classes/class.ilObject.php");
391  $langlist = ilObject::_getObjectsByType("lng");
392 
393  foreach ($langlist as $lang)
394  {
395  if (substr($lang["desc"], 0, 9) == "installed")
396  {
397  $languages[] = $lang["title"];
398  }
399 
400  }
401 
402  return $languages ? $languages : array();
403  }
static _getObjectsByType($a_obj_type="", $a_owner="")
Get objects by type.
Create styles array
The data for the language used.
for($i=1; $i<=count($kw_cases_sel); $i+=1) $lang
Definition: langwiz.php:349
$languages
Definition: cssgen2.php:34
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ _lookupEntry()

static ilLanguage::_lookupEntry (   $a_lang_key,
  $a_mod,
  $a_id 
)
static

Definition at line 405 of file class.ilLanguage.php.

References $ilDB.

Referenced by ilLinkChecker\__txt(), ilPersonalSettingsGUI\initGeneralSettingsForm(), ilAccountMail\replacePlaceholders(), ilUserCronCheckAccounts\txt(), txt(), and txtlng().

406  {
407  global $ilDB;
408 
409  $set = $ilDB->query($q = sprintf("SELECT * FROM lng_data WHERE module = %s ".
410  "AND lang_key = %s AND identifier = %s",
411  $ilDB->quote((string) $a_mod, "text"), $ilDB->quote((string) $a_lang_key, "text"),
412  $ilDB->quote((string) $a_id, "text")));
413  $rec = $ilDB->fetchAssoc($set);
414 
415  if ($rec["value"] != "")
416  {
417  // remember the used topics
418  self::$used_topics[$a_id] = $a_id;
419  self::$used_modules[$a_mod] = $a_mod;
420 
421  if(self::isUsageLogEnabled())
422  {
423  self::logUsage($a_mod, $a_id);
424  }
425 
426  return $rec["value"];
427  }
428 
429  return "-".$a_id."-";
430  }
global $ilDB
+ Here is the caller graph for this function:

◆ checkLanguage()

ilLanguage::checkLanguage (   $a_lang_key,
  $scope = '' 
)

validate the logical structure of a lang-file

This function checks if a lang-file of a given lang_key exists, the file has a header, and each lang-entry consists of exactly three elements (module, identifier, value).

Parameters
string$a_lang_keyinternational language key (2 digits)
string$scopeempty (global) or "local"
Returns
string $info_text message about results of check OR "1" if all checks successfully passed

Definition at line 411 of file class.ilLanguage.php.

References $lang_path, $path, cut_header(), and file.

Referenced by installLanguages().

412  {
413  if (!empty($scope))
414  {
415  if ($scope == 'global')
416  {
417  $scope = '';
418  }
419  else
420  {
421  $scopeExtension = '.' . $scope;
422  }
423  }
424 
426  if ($scope == "local")
427  {
428  $path = $this->cust_lang_path;
429  }
430 
431  $tmpPath = getcwd();
432  chdir($path);
433 
434  // compute lang-file name format
435  $lang_file = "ilias_" . $a_lang_key . ".lang" . $scopeExtension;
436 
437  // file check
438  if (!is_file($lang_file))
439  {
440  chdir($tmpPath);
441  return false;
442  }
443 
444  // header check
445  if (!$content = $this->cut_header(file($lang_file)))
446  {
447  chdir($tmpPath);
448  return false;
449  }
450 
451  // check (counting) elements of each lang-entry
452  foreach ($content as $key => $val)
453  {
454  $separated = explode($this->separator, trim($val));
455  $num = count($separated);
456 
457  if ($num != 3)
458  {
459  chdir($tmpPath);
460  return false;
461  }
462  }
463 
464  chdir($tmpPath);
465 
466  // no error occured
467  return true;
468  }
$path
Definition: aliased.php:25
cut_header($content)
Remove *.lang header information from &#39;$content&#39;.
Reload workbook from saved file
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ cut_header()

ilLanguage::cut_header (   $content)

Remove *.lang header information from '$content'.

This function seeks for a special keyword where the language information starts. If found it returns the plain language information; otherwise returns false.

Parameters
string$contentexpect an ILIAS lang-file
Returns
string $content content without header info OR false if no valid header was found private

Definition at line 480 of file class.ilLanguage.php.

Referenced by checkLanguage(), and insertLanguage().

481  {
482  foreach ($content as $key => $val)
483  {
484  if (trim($val) == "<!-- language file start -->")
485  {
486  return array_slice($content,$key +1);
487  }
488  }
489 
490  return false;
491  }
+ Here is the caller graph for this function:

◆ exists()

ilLanguage::exists (   $a_topic)

Check if language entry exists.

Parameters
object$a_topic
Returns

Definition at line 309 of file class.ilLanguage.php.

310  {
311  return isset($this->text[$a_topic]);
312  }

◆ flushLanguage()

ilLanguage::flushLanguage (   $a_lang_key,
  $a_mode = 'all' 
)

remove language data from database

Parameters
stringlanguage key
string"all" or "keep_local"

Definition at line 499 of file class.ilLanguage.php.

References $ilDB, and _deleteLangData().

Referenced by installLanguages().

500  {
501  $ilDB = $this->db;
502 
503  ilLanguage::_deleteLangData($a_lang_key, ($a_mode == 'keep_local'));
504 
505  if ($a_mode == 'all')
506  {
507  $ilDB->manipulate("DELETE FROM lng_modules WHERE lang_key = ".
508  $ilDB->quote($a_lang_key, "text"));
509  }
510  }
static _deleteLangData($a_lang_key, $a_keep_local_change)
Delete languge data.
global $ilDB
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ getAvailableLanguages()

ilLanguage::getAvailableLanguages ( )

get already registered languages (in db)

Returns
array array with information about languages that has been registered in db

Definition at line 381 of file class.ilLanguage.php.

References $ilDB, $query, $r, $row, and array.

Referenced by installLanguages().

382  {
383  global $ilDB;
384 
385  $arr = array();
386 
387  $query = "SELECT * FROM object_data ".
388  "WHERE type = ".$ilDB->quote("lng", "text");
389  $r = $ilDB->query($query);
390 
391  while ($row = $ilDB->fetchObject($r))
392  {
393  $arr[$row->title]["obj_id"] = $row->obj_id;
394  $arr[$row->title]["status"] = $row->description;
395  }
396 
397  return $arr;
398  }
$r
Definition: example_031.php:79
Create styles array
The data for the language used.
global $ilDB
+ Here is the caller graph for this function:

◆ getDefaultLanguage()

ilLanguage::getDefaultLanguage ( )

Definition at line 219 of file class.ilLanguage.php.

220  {
221  return $this->lang_default ? $this->lang_default : 'en';
222  }

◆ getInstallableLanguages()

ilLanguage::getInstallableLanguages ( )

Definition at line 789 of file class.ilLanguage.php.

References $d, $lang_key, and getLanguages().

790  {
791  $setup_langs = $this->getLanguages();
792 
793  $d = dir($this->lang_path);
794  $tmpPath = getcwd();
795  chdir ($this->lang_path);
796 
797  // get available lang-files
798  while ($entry = $d->read())
799  {
800  if (is_file($entry) && (preg_match("~(^ilias_.{2}\.lang$)~", $entry)))
801  {
802  $lang_key = substr($entry,6,2);
803  $languages1[] = $lang_key;
804  }
805  }
806 
807  //$languages = array_intersect($languages1,$setup_langs);
808 
809  chdir($tmpPath);
810 
811  return $languages1;
812  }
for($col=0; $col< 50; $col++) $d
getLanguages()
get all setup languages in the system
+ Here is the call graph for this function:

◆ getInstalledLanguages() [1/2]

ilLanguage::getInstalledLanguages ( )

get already installed languages (in db)

Returns
array array with inforamtion about each installed language

Definition at line 334 of file class.ilLanguage.php.

References $ilDB, $query, $r, $row, and array.

335  {
336  global $ilDB;
337 
338  $arr = array();
339 
340  $query = "SELECT * FROM object_data ".
341  "WHERE type = ".$ilDB->quote("lng", "text")." ".
342  "AND ".$ilDB->like("description", "text", 'installed%');
343  $r = $ilDB->query($query);
344 
345  while ($row = $ilDB->fetchObject($r))
346  {
347  $arr[] = $row->title;
348  }
349 
350  return $arr;
351  }
$r
Definition: example_031.php:79
Create styles array
The data for the language used.
global $ilDB

◆ getInstalledLanguages() [2/2]

ilLanguage::getInstalledLanguages ( )

Definition at line 383 of file class.ilLanguage.php.

Referenced by __construct().

384  {
385  return self::_getInstalledLanguages();
386  }
+ Here is the caller graph for this function:

◆ getInstalledLocalLanguages()

ilLanguage::getInstalledLocalLanguages ( )

get already installed local languages (in db)

Returns
array array with inforamtion about each installed language

Definition at line 358 of file class.ilLanguage.php.

References $ilDB, $query, $r, $row, and array.

359  {
360  global $ilDB;
361 
362  $arr = array();
363 
364  $query = "SELECT * FROM object_data ".
365  "WHERE type = ".$ilDB->quote("lng", "text")." ".
366  "AND description = ".$ilDB->quote('installed_local', "text");
367  $r = $ilDB->query($query);
368 
369  while ($row = $ilDB->fetchObject($r))
370  {
371  $arr[] = $row->title;
372  }
373 
374  return $arr;
375  }
$r
Definition: example_031.php:79
Create styles array
The data for the language used.
global $ilDB

◆ getLangKey()

ilLanguage::getLangKey ( )

Definition at line 214 of file class.ilLanguage.php.

References $lang_key.

Referenced by ilForumCronNotificationDataProvider\getAuthorInformation().

215  {
216  return $this->lang_key;
217  }
+ Here is the caller graph for this function:

◆ getLanguages()

ilLanguage::getLanguages ( )

get all setup languages in the system

the functions looks for setup*.lang-files in the languagedirectory public

Returns
array langs

Definition at line 189 of file class.ilLanguage.php.

References $d, $lang_key, and $languages.

Referenced by getInstallableLanguages().

190  {
191  $d = dir($this->lang_path);
192  $tmpPath = getcwd();
193  chdir ($this->lang_path);
194 
195  // get available setup-files
196  while ($entry = $d->read())
197  {
198  if (is_file($entry) && (preg_match ('/(^setup_.{2}\.lang$)/', $entry)))
199  {
200  $lang_key = substr($entry,6,2);
201  $languages[] = $lang_key;
202  }
203  }
204 
205  chdir($tmpPath);
206 
207  return $languages;
208  }
for($col=0; $col< 50; $col++) $d
$languages
Definition: cssgen2.php:34
+ Here is the caller graph for this function:

◆ getLocalChanges()

ilLanguage::getLocalChanges (   $a_lang_key,
  $a_min_date = "",
  $a_max_date = "" 
)

get locally changed language entries

Parameters
stringlanguage key
stringminimum change date "yyyy-mm-dd hh:mm:ss"
stringmaximum change date "yyyy-mm-dd hh:mm:ss"
Returns
array [module][identifier] => value

Definition at line 541 of file class.ilLanguage.php.

References $ilDB, $result, $row, array, and ilDBConstants\FETCHMODE_ASSOC.

Referenced by insertLanguage().

542  {
543  $ilDB = $this->db;
544 
545  if ($a_min_date == "")
546  {
547  $a_min_date = "1980-01-01 00:00:00";
548  }
549  if ($a_max_date == "")
550  {
551  $a_max_date = "2200-01-01 00:00:00";
552  }
553 
554  $q = sprintf("SELECT * FROM lng_data WHERE lang_key = %s ".
555  "AND local_change >= %s AND local_change <= %s",
556  $ilDB->quote($a_lang_key, "text"), $ilDB->quote($a_min_date, "timestamp"),
557  $ilDB->quote($a_max_date, "timestamp"));
558  $result = $ilDB->query($q);
559 
560  $changes = array();
561  while ($row = $result->fetchRow(ilDBConstants::FETCHMODE_ASSOC))
562  {
563  $changes[$row["module"]][$row["identifier"]] = $row["value"];
564  }
565  return $changes;
566  }
$result
Create styles array
The data for the language used.
global $ilDB
+ Here is the caller graph for this function:

◆ getLocalLanguages()

ilLanguage::getLocalLanguages ( )

Searches for the existence of *.lang.local files.

return $local_langs array of language keys

Definition at line 764 of file class.ilLanguage.php.

References $d, $lang_key, and array.

765  {
766  $local_langs = array();
767  if (is_dir($this->cust_lang_path))
768  {
769  $d = dir($this->cust_lang_path);
770  $tmpPath = getcwd();
771  chdir ($this->cust_lang_path);
772 
773  // get available .lang.local files
774  while ($entry = $d->read())
775  {
776  if (is_file($entry) && (preg_match("~(^ilias_.{2}\.lang.local$)~", $entry)))
777  {
778  $lang_key = substr($entry,6,2);
779  $local_langs[] = $lang_key;
780  }
781  }
782 
783  chdir($tmpPath);
784  }
785 
786  return $local_langs;
787  }
for($col=0; $col< 50; $col++) $d
Create styles array
The data for the language used.

◆ getUsedModules()

ilLanguage::getUsedModules ( )

Definition at line 461 of file class.ilLanguage.php.

462  {
463  asort(self::$used_modules);
464  return self::$used_modules;
465  }

◆ getUsedTopics()

ilLanguage::getUsedTopics ( )

Definition at line 455 of file class.ilLanguage.php.

456  {
457  asort(self::$used_topics);
458  return self::$used_topics;
459  }

◆ getUserLanguage()

ilLanguage::getUserLanguage ( )

Definition at line 467 of file class.ilLanguage.php.

References $_GET, $_POST, $ilSetting, $ilUser, $lang_user, $lng, ilSetting\get(), ilSession\get(), ilSession\set(), and ilUtil\stripSlashes().

468  {
469  return $this->lang_user;
470  }
+ Here is the call graph for this function:

◆ insertLanguage()

ilLanguage::insertLanguage (   $lang_key,
  $scope = '' 
)

insert language data from file in database

Parameters
string$lang_keyinternational language key (2 digits)
string$scopeempty (global) or "local"
Returns
void

Definition at line 577 of file class.ilLanguage.php.

References $ilDB, $lang_path, $path, $row, array, cut_header(), date, file, getLocalChanges(), replaceLangEntry(), replaceLangModule(), time, and updateLangEntry().

Referenced by installLanguages().

578  {
579  $ilDB =& $this->db;
580 
581  $lang_array = array();
582 
583  if (!empty($scope))
584  {
585  if ($scope == 'global')
586  {
587  $scope = '';
588  }
589  else
590  {
591  $scopeExtension = '.' . $scope;
592  }
593  }
594 
596  if ($scope == "local")
597  {
598  $path = $this->cust_lang_path;
599  }
600 
601  $tmpPath = getcwd();
602  chdir($path);
603 
604  $lang_file = "ilias_" . $lang_key . ".lang" . $scopeExtension;
605 
606  if ($lang_file)
607  {
608  // initialize the array for updating lng_modules below
609  $lang_array = array();
610  $lang_array["common"] = array();
611 
612  // remove header first
613  if ($content = $this->cut_header(file($lang_file)))
614  {
615  // get the local changes from the database
616  if (empty($scope))
617  {
618  $local_changes = $this->getLocalChanges($lang_key);
619  }
620  else if ($scope == 'local')
621  {
622  $change_date = date("Y-m-d H:i:s",time());
623  $min_date = date("Y-m-d H:i:s", filemtime($lang_file));
624  $local_changes = $this->getLocalChanges($lang_key, $min_date);
625  }
626 
627  foreach ($content as $key => $val)
628  {
629  $separated = explode($this->separator,trim($val));
630 
631  //get position of the comment_separator
632  $pos = strpos($separated[2], $this->comment_separator);
633 
634  if ($pos !== false)
635  {
636  //cut comment of
637  $separated[2] = substr($separated[2] , 0 , $pos);
638  }
639 
640  // check if the value has a local change
641  $local_value = $local_changes[$separated[0]][$separated[1]];
642 
643  if (empty($scope))
644  {
645  if ($local_value != "" and $local_value != $separated[2])
646  {
647  // keep the locally changed value
648  $lang_array[$separated[0]][$separated[1]] = $local_value;
649  }
650  else
651  {
652  // insert a new value if no local value exists
653  // reset local_change if the values are equal
654  ilLanguage::replaceLangEntry($separated[0], $separated[1],
655  $lang_key, $separated[2]);
656 
657  $lang_array[$separated[0]][$separated[1]] = $separated[2];
658  }
659  }
660  else if ($scope == 'local')
661  {
662  if ($local_value != "")
663  {
664  // keep a locally changed value that is newer than the local file
665  $lang_array[$separated[0]][$separated[1]] = $local_value;
666  }
667  else
668  {
669  // UPDATE because the global values have already been INSERTed
670  ilLanguage::updateLangEntry($separated[0], $separated[1],
671  $lang_key, $separated[2], $change_date);
672  $lang_array[$separated[0]][$separated[1]] = $separated[2];
673  }
674  }
675  }
676  }
677 
678  foreach($lang_array as $module => $lang_arr)
679  {
680  if ($scope == "local")
681  {
682  $q = "SELECT * FROM lng_modules WHERE ".
683  " lang_key = ".$ilDB->quote($this->key, "text").
684  " AND module = ".$ilDB->quote($module, "text");
685  $set = $ilDB->query($q);
686  $row = $ilDB->fetchAssoc($set);
687  $arr2 = unserialize($row["lang_array"]);
688  if (is_array($arr2))
689  {
690  $lang_arr = array_merge($arr2, $lang_arr);
691  }
692  }
693  ilLanguage::replaceLangModule($lang_key, $module, $lang_arr);
694  }
695  }
696 
697  chdir($tmpPath);
698  }
static replaceLangModule($a_key, $a_module, $a_array)
Replace language module array.
$path
Definition: aliased.php:25
static updateLangEntry($a_module, $a_identifier, $a_lang_key, $a_value, $a_local_change=null)
Update lang entry.
cut_header($content)
Remove *.lang header information from &#39;$content&#39;.
getLocalChanges($a_lang_key, $a_min_date="", $a_max_date="")
get locally changed language entries
date( 'd-M-Y', $objPHPExcel->getProperties() ->getCreated())
static replaceLangEntry($a_module, $a_identifier, $a_lang_key, $a_value, $a_local_change=null)
Replace lang entry.
Reload workbook from saved file
Create styles array
The data for the language used.
global $ilDB
Add data(end) time
Method that wraps PHPs time in order to allow simulations with the workflow.
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ installLanguages()

ilLanguage::installLanguages (   $a_lang_keys,
  $a_local_keys 
)

install languages

Parameters
arrayarray with lang_keys of languages to install
Returns
boolean true on success

Definition at line 216 of file class.ilLanguage.php.

References $ilDB, $lang_key, $ld, $query, array, checkLanguage(), flushLanguage(), getAvailableLanguages(), and insertLanguage().

217  {
218  global $ilDB;
219 
220  if (empty($a_lang_keys))
221  {
222  $a_lang_keys = array();
223  }
224 
225  if (empty($a_local_keys))
226  {
227  $a_local_keys = array();
228  }
229 
230  $err_lang = array();
231 
232  $db_langs = $this->getAvailableLanguages();
233 
234  foreach ($a_lang_keys as $lang_key)
235  {
236  if ($this->checkLanguage($lang_key))
237  {
238  $this->flushLanguage($lang_key, 'keep_local');
239  $this->insertLanguage($lang_key);
240 
241  if (in_array($lang_key, $a_local_keys))
242  {
243  if ($this->checkLanguage($lang_key, "local"))
244  {
245  $this->insertLanguage($lang_key, "local");
246  }
247  else
248  {
249  $err_lang[] = $lang_key;
250  }
251  }
252 
253  // register language first time install
254  if (!array_key_exists($lang_key,$db_langs))
255  {
256  if (in_array($lang_key, $a_local_keys))
257  {
258  $itype = 'installed_local';
259  }
260  else
261  {
262  $itype = 'installed';
263  }
264  $lid = $ilDB->nextId("object_data");
265  $query = "INSERT INTO object_data ".
266  "(obj_id,type,title,description,owner,create_date,last_update) ".
267  "VALUES ".
268  "(".
269  $ilDB->quote($lid, "integer").",".
270  $ilDB->quote("lng", "text").",".
271  $ilDB->quote($lang_key, "text").",".
272  $ilDB->quote($itype, "text").",".
273  $ilDB->quote('-1',"integer").",".
274  $ilDB->now().",".
275  $ilDB->now().
276  ")";
277  $this->db->manipulate($query);
278  }
279  }
280  else
281  {
282  $err_lang[] = $lang_key;
283  }
284  }
285 
286  foreach ($db_langs as $key => $val)
287  {
288  if (!in_array($key,$err_lang))
289  {
290  if (in_array($key,$a_lang_keys))
291  {
292  if (in_array($key, $a_local_keys))
293  {
294  $ld = 'installed_local';
295  }
296  else
297  {
298  $ld = 'installed';
299  }
300  $query = "UPDATE object_data SET " .
301  "description = ".$ilDB->quote($ld, "text").", " .
302  "last_update = ".$ilDB->now()." " .
303  "WHERE obj_id = ".$ilDB->quote($val["obj_id"], "integer")." " .
304  "AND type = ".$ilDB->quote("lng", "text");
305  $ilDB->manipulate($query);
306  }
307  else
308  {
309  $this->flushLanguage($key, "all");
310 
311  if (substr($val["status"], 0, 9) == "installed")
312  {
313  $query = "UPDATE object_data SET " .
314  "description = ".$ilDB->quote("not_installed", "text").", " .
315  "last_update = ".$ilDB->now()." " .
316  "WHERE obj_id = ".$ilDB->quote($val["obj_id"], "integer")." " .
317  "AND type = ".$ilDB->quote("lng", "text");
318  $ilDB->manipulate($query);
319  }
320  }
321  }
322  }
323 
324  return ($err_lang) ? $err_lang : true;
325  }
getAvailableLanguages()
get already registered languages (in db)
checkLanguage($a_lang_key, $scope='')
validate the logical structure of a lang-file
$ld
Definition: langwiz.php:244
flushLanguage($a_lang_key, $a_mode='all')
remove language data from database
Create styles array
The data for the language used.
insertLanguage($lang_key, $scope='')
insert language data from file in database
global $ilDB
+ Here is the call graph for this function:

◆ loadLanguageModule() [1/2]

ilLanguage::loadLanguageModule (   $a_module)

Definition at line 314 of file class.ilLanguage.php.

References $ilDB, $lang_key, $lang_user, $r, $row, and ilDBConstants\FETCHMODE_ASSOC.

Referenced by ilObjUserGUI\__sendProfileMail().

315  {
316  global $ilDB;
317 
318  if (in_array($a_module, $this->loaded_modules))
319  {
320  return;
321  }
322 
323  $this->loaded_modules[] = $a_module;
324 
325  // remember the used modules globally
326  self::$used_modules[$a_module] = $a_module;
327 
329 
330  if (empty($this->lang_key))
331  {
333  }
334 
335  if(is_array($this->cached_modules[$a_module])) {
336  $this->text = array_merge($this->text, $this->cached_modules[$a_module]);
337 
338  if($this->usage_log_enabled)
339  {
340  foreach (array_keys($this->cached_modules[$a_module]) as $key)
341  {
342  $this->map_modules_txt[$key] = $a_module;
343  }
344  }
345 
346  return;
347  }
348 
349 /*
350  $query = "SELECT identifier,value FROM lng_data " .
351  "WHERE lang_key = '" . $lang_key."' " .
352  "AND module = '$a_module'";
353  $r = $this->ilias->db->query($query);
354 
355  while ($row = $r->fetchRow(ilDBConstants::FETCHMODE_OBJECT))
356  {
357  $this->text[$row->identifier] = $row->value;
358  }
359 */
360 
361  $q = "SELECT * FROM lng_modules " .
362  "WHERE lang_key = ".$ilDB->quote($lang_key, "text")." AND module = ".
363  $ilDB->quote($a_module, "text");
364  $r = $ilDB->query($q);
366 
367  $new_text = unserialize($row["lang_array"]);
368  if (is_array($new_text))
369  {
370  $this->text = array_merge($this->text, $new_text);
371 
372  if($this->usage_log_enabled)
373  {
374  foreach (array_keys($new_text) as $key)
375  {
376  $this->map_modules_txt[$key] = $a_module;
377  }
378  }
379  }
380  }
$r
Definition: example_031.php:79
global $ilDB
+ Here is the caller graph for this function:

◆ loadLanguageModule() [2/2]

ilLanguage::loadLanguageModule ( )

Definition at line 831 of file class.ilLanguage.php.

Referenced by __construct().

832  {
833  }
+ Here is the caller graph for this function:

◆ logUsage()

static ilLanguage::logUsage (   $a_module,
  $a_identifier 
)
staticprotected

saves tupel of language module and identifier

Parameters
string$a_module
string$a_identifier

Definition at line 599 of file class.ilLanguage.php.

References $ilDB.

600  {
601  if($a_module != "" && $a_identifier != "")
602  {
603  self::$lng_log[$a_identifier] = $a_module;
604  }
605  }

◆ lookupId()

static ilLanguage::lookupId (   $a_lang_key)
static

Lookup obj_id of language ilDB $ilDB.

Parameters
string$a_lang_key
Returns
int

Definition at line 438 of file class.ilLanguage.php.

References $ilDB, $query, $res, $row, and ilDBConstants\FETCHMODE_OBJECT.

Referenced by ilStartUpGUI\getLoginPageEditorHTML(), and ilAuthLoginPageEditorTableGUI\parse().

439  {
440  global $ilDB;
441 
442  $query = 'SELECT obj_id FROM object_data '.' '.
443  'WHERE title = '.$ilDB->quote($a_lang_key, 'text').' '.
444  'AND type = '.$ilDB->quote('lng','text');
445 
446  $res = $ilDB->query($query);
447  while($row = $res->fetchRow(ilDBConstants::FETCHMODE_OBJECT))
448  {
449  return $row->obj_id;
450  }
451  return 0;
452  }
global $ilDB
+ Here is the caller graph for this function:

◆ replaceLangEntry()

static ilLanguage::replaceLangEntry (   $a_module,
  $a_identifier,
  $a_lang_key,
  $a_value,
  $a_local_change = null 
)
staticfinal

Replace lang entry.

Definition at line 723 of file class.ilLanguage.php.

References $ilDB.

Referenced by insertLanguage().

725  {
726  global $ilDB;
727 
728  $ilDB->manipulate(sprintf("DELETE FROM lng_data WHERE module = %s AND ".
729  "identifier = %s AND lang_key = %s",
730  $ilDB->quote($a_module, "text"), $ilDB->quote($a_identifier, "text"),
731  $ilDB->quote($a_lang_key, "text")));
732 
733  // insert a new value if no local value exists
734  // reset local_change if the values are equal
735  $ilDB->manipulate(sprintf("INSERT INTO lng_data " .
736  "(module, identifier, lang_key, value, local_change) " .
737  "VALUES (%s,%s,%s,%s,%s)",
738  $ilDB->quote($a_module, "text"), $ilDB->quote($a_identifier, "text"),
739  $ilDB->quote($a_lang_key, "text"), $ilDB->quote($a_value, "text"),
740  $ilDB->quote($a_local_change, "timestamp")));
741  }
global $ilDB
+ Here is the caller graph for this function:

◆ replaceLangModule()

static ilLanguage::replaceLangModule (   $a_key,
  $a_module,
  $a_array 
)
staticfinal

Replace language module array.

Definition at line 703 of file class.ilLanguage.php.

References $ilDB, and array.

Referenced by insertLanguage().

704  {
705  global $ilDB;
706 
707  $ilDB->manipulate(sprintf("DELETE FROM lng_modules WHERE lang_key = %s AND module = %s",
708  $ilDB->quote($a_key, "text"), $ilDB->quote($a_module, "text")));
709  /*$ilDB->manipulate(sprintf("INSERT INTO lng_modules (lang_key, module, lang_array) VALUES ".
710  "(%s,%s,%s)", $ilDB->quote($a_key, "text"),
711  $ilDB->quote($a_module, "text"),
712  $ilDB->quote(serialize($a_array), "clob")));*/
713  $ilDB->insert("lng_modules", array(
714  "lang_key" => array("text", $a_key),
715  "module" => array("text", $a_module),
716  "lang_array" => array("clob", serialize($a_array))
717  ));
718  }
Create styles array
The data for the language used.
global $ilDB
+ Here is the caller graph for this function:

◆ setDbHandler()

ilLanguage::setDbHandler (   $a_db_handler)

set db handler object object db handler

Returns
boolean true on success

Definition at line 819 of file class.ilLanguage.php.

820  {
821  if (empty($a_db_handler) or !is_object($a_db_handler))
822  {
823  return false;
824  }
825 
826  $this->db =& $a_db_handler;
827 
828  return true;
829  }

◆ toJS()

ilLanguage::toJS (   $a_lang_key,
ilTemplate  $a_tpl = null 
)

Definition at line 541 of file class.ilLanguage.php.

References $tpl, array, toJSMap(), and txt().

542  {
543  global $tpl;
544 
545  if (!is_object($a_tpl))
546  {
547  $a_tpl = $tpl;
548  }
549 
550  if (!is_array($a_lang_key))
551  {
552  $a_lang_key = array($a_lang_key);
553  }
554 
555  $map = array();
556  foreach ($a_lang_key as $lk)
557  {
558  $map[$lk] = $this->txt($lk);
559  }
560  $this->toJSMap($map, $a_tpl);
561  }
toJSMap($a_map, ilTemplate $a_tpl=null)
Transfer text to Javascript.
global $tpl
Definition: ilias.php:8
Create styles array
The data for the language used.
txt($a_topic, $a_default_lang_fallback_mod="")
gets the text for a given topic if the topic is not in the list, the topic itself with "-" will be re...
+ Here is the call graph for this function:

◆ toJSMap()

ilLanguage::toJSMap (   $a_map,
ilTemplate  $a_tpl = null 
)

Transfer text to Javascript.

Parameters
array$a_maparray of key value pairs (key is text string, value is content)
ilTemplate$a_tpltemplate

Definition at line 569 of file class.ilLanguage.php.

References $tpl, and ilJsonUtil\encode().

Referenced by toJS().

570  {
571  global $tpl;
572 
573  if (!is_object($a_tpl))
574  {
575  $a_tpl = $tpl;
576  }
577 
578  if (!is_array($a_map))
579  {
580  return;
581  }
582 
583  foreach ($a_map as $k => $v)
584  {
585  if ($v != "")
586  {
587  include_once("./Services/JSON/classes/class.ilJsonUtil.php");
588  $a_tpl->addOnloadCode("il.Language.setLangVar('".$k."', ".ilJsonUtil::encode($v).");");
589  }
590  }
591  }
global $tpl
Definition: ilias.php:8
static encode($mixed, $suppress_native=false)
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ txt() [1/2]

ilLanguage::txt (   $a_topic)

gets the text for a given topic

if the topic is not in the list, the topic itself with "-" will be returned public

Parameters
stringtopic
Returns
string text clear-text

Definition at line 151 of file class.ilLanguage.php.

References $log.

152  {
153  global $log;
154 
155  if (empty($a_topic))
156  {
157  return "";
158  }
159 
160  $translation = $this->text[$a_topic];
161 
162  //get position of the comment_separator
163  $pos = strpos($translation, $this->comment_separator);
164 
165  if ($pos !== false)
166  {
167  // remove comment
168  $translation = substr($translation,0,$pos);
169  }
170 
171  if ($translation == "")
172  {
173  $log->writeLanguageLog($a_topic,$this->lang_key);
174  return "-".$a_topic."-";
175  }
176  else
177  {
178  return $translation;
179  }
180  }

◆ txt() [2/2]

ilLanguage::txt (   $a_topic,
  $a_default_lang_fallback_mod = "" 
)

gets the text for a given topic if the topic is not in the list, the topic itself with "-" will be returned

public

Parameters
stringtopic
Returns
string text clear-text

Definition at line 253 of file class.ilLanguage.php.

References _lookupEntry().

Referenced by assKprimChoice\getAnswerTypeSelectOptions(), ilObjTestDynamicQuestionSetConfig\getDepenciesBrokenMessage(), ilTestRandomQuestionSetConfig\getDepenciesBrokenMessage(), ilObjTestDynamicQuestionSetConfig\getDepenciesInVulnerableStateMessage(), ilTestSkillLevelThresholdImportFails\getFailedImportsMessage(), ilAssQuestionSkillAssignmentImportFails\getFailedImportsMessage(), assKprimChoice\getFalseOptionLabelTranslation(), ilAssLacConditionParserException\getFormAlert(), ilAssLacUnsupportedOperation\getFormAlert(), ilAssLacDuplicateElement\getFormAlert(), ilAssLacMissingBracket\getFormAlert(), ilAssLacQuestionNotExist\getFormAlert(), ilAssLacQuestionNotReachable\getFormAlert(), ilAssLacUnsupportedExpression\getFormAlert(), ilAssLacUnableToParseCondition\getFormAlert(), ilAssLacOperatorNotSupportedByExpression\getFormAlert(), ilAssLacAnswerIndexNotExist\getFormAlert(), ilAssLacExpressionNotSupportedByQuestion\getFormAlert(), ilAssLacAnswerValueNotExist\getFormAlert(), ilAssQuestionHint\getHintIndexLabel(), assKprimChoice\getInstructionTextTranslation(), ilTestRandomQuestionSetSourcePoolDefinition\getPoolInfoLabel(), ilObjTest\getQuestionSetTypeTranslation(), ilObjTestDynamicQuestionSetConfig\getSourceQuestionPoolSummaryString(), assKprimChoice\getTrueOptionLabelTranslation(), assKprimChoice\getValidOptionLabelsTranslated(), ilTestToplistGUI\manageTabs(), toJS(), and txtlng().

254  {
255  if (empty($a_topic))
256  {
257  return "";
258  }
259 
260  // remember the used topics
261  self::$used_topics[$a_topic] = $a_topic;
262 
263  $translation = "";
264  if (isset($this->text[$a_topic]))
265  {
266  $translation = $this->text[$a_topic];
267  }
268 
269  if ($translation == "" && $a_default_lang_fallback_mod != "")
270  {
271  // #13467 - try current language first (could be missing module)
272  if($this->lang_key != $this->lang_default)
273  {
274  $translation = ilLanguage::_lookupEntry($this->lang_key,
275  $a_default_lang_fallback_mod, $a_topic);
276  }
277  // try default language last
278  if($translation == "" || $translation == "-".$a_topic."-")
279  {
280  $translation = ilLanguage::_lookupEntry($this->lang_default,
281  $a_default_lang_fallback_mod, $a_topic);
282  }
283  }
284 
285 
286  if ($translation == "")
287  {
288  if (ILIAS_LOG_ENABLED && is_object($this->log))
289  {
290  $this->log->writeLanguageLog($a_topic,$this->lang_key);
291  }
292  return "-".$a_topic."-";
293  }
294  else
295  {
296  if($this->usage_log_enabled)
297  {
298  self::logUsage($this->map_modules_txt[$a_topic], $a_topic);
299  }
300  return $translation;
301  }
302  }
static _lookupEntry($a_lang_key, $a_mod, $a_id)
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ txtlng()

ilLanguage::txtlng (   $a_module,
  $a_topic,
  $a_language 
)

gets the text for a given topic in a given language if the topic is not in the list, the topic itself with "-" will be returned

public

Parameters
stringtopic
string$a_languageThe language of the output string
Returns
string text clear-text

Definition at line 233 of file class.ilLanguage.php.

References _lookupEntry(), and txt().

234  {
235  if (strcmp($a_language, $this->lang_key) == 0)
236  {
237  return $this->txt($a_topic);
238  }
239  else
240  {
241  return ilLanguage::_lookupEntry($a_language, $a_module, $a_topic);
242  }
243  }
static _lookupEntry($a_lang_key, $a_mod, $a_id)
txt($a_topic, $a_default_lang_fallback_mod="")
gets the text for a given topic if the topic is not in the list, the topic itself with "-" will be re...
+ Here is the call graph for this function:

◆ updateLangEntry()

static ilLanguage::updateLangEntry (   $a_module,
  $a_identifier,
  $a_lang_key,
  $a_value,
  $a_local_change = null 
)
staticfinal

Update lang entry.

Definition at line 746 of file class.ilLanguage.php.

References $ilDB.

Referenced by insertLanguage().

748  {
749  global $ilDB;
750 
751  $ilDB->manipulate(sprintf("UPDATE lng_data " .
752  "SET value = %s, local_change = %s ".
753  "WHERE module = %s AND identifier = %s AND lang_key = %s ",
754  $ilDB->quote($a_value, "text"), $ilDB->quote($a_local_change, "timestamp"),
755  $ilDB->quote($a_module, "text"), $ilDB->quote($a_identifier, "text"),
756  $ilDB->quote($a_lang_key, "text")));
757  }
global $ilDB
+ Here is the caller graph for this function:

Field Documentation

◆ $cached_modules

ilLanguage::$cached_modules = array()
protected

Definition at line 127 of file class.ilLanguage.php.

◆ $comment_separator

ilLanguage::$comment_separator = "###"

Definition at line 103 of file class.ilLanguage.php.

◆ $ilias

ilLanguage::$ilias

Definition at line 34 of file class.ilLanguage.php.

Referenced by __construct().

◆ $lang_default

ilLanguage::$lang_default = "en"

Definition at line 51 of file class.ilLanguage.php.

Referenced by __construct().

◆ $lang_key

◆ $lang_name

ilLanguage::$lang_name

Definition at line 87 of file class.ilLanguage.php.

◆ $lang_path

ilLanguage::$lang_path

Definition at line 71 of file class.ilLanguage.php.

Referenced by checkLanguage(), and insertLanguage().

◆ $lang_user

ilLanguage::$lang_user

Definition at line 61 of file class.ilLanguage.php.

Referenced by getUserLanguage(), and loadLanguageModule().

◆ $lng_log

ilLanguage::$lng_log = array()
staticprotected

Definition at line 142 of file class.ilLanguage.php.

◆ $loaded_modules

ilLanguage::$loaded_modules

Definition at line 111 of file class.ilLanguage.php.

◆ $map_modules_txt

ilLanguage::$map_modules_txt = array()
protected

Definition at line 132 of file class.ilLanguage.php.

◆ $separator

ilLanguage::$separator = "#:#"

Definition at line 95 of file class.ilLanguage.php.

◆ $text

ilLanguage::$text = array()

Definition at line 42 of file class.ilLanguage.php.

◆ $usage_log_enabled

ilLanguage::$usage_log_enabled = false
protected

Definition at line 137 of file class.ilLanguage.php.

◆ $used_modules

ilLanguage::$used_modules = array()
staticprotected

Definition at line 123 of file class.ilLanguage.php.

◆ $used_topics

ilLanguage::$used_topics = array()
staticprotected

Definition at line 117 of file class.ilLanguage.php.


The documentation for this class was generated from the following file: