ILIAS  release_5-4 Revision v5.4.26-12-gabc799a52e6
ilLanguageFactory Class Reference
+ Collaboration diagram for ilLanguageFactory:

Static Public Member Functions

static _getLanguage ($a_lang_key='')
 Get langauge object. More...
 
static _getLanguageOfUser ($a_usr_id)
 Get language object of user. More...
 

Static Private Attributes

static $languages = array()
 

Detailed Description

Author
Stefan Meyer smeye.nosp@m.r.il.nosp@m.ias@g.nosp@m.mx.d.nosp@m.e
Version
$Id$

Definition at line 32 of file class.ilLanguageFactory.php.

Member Function Documentation

◆ _getLanguage()

static ilLanguageFactory::_getLanguage (   $a_lang_key = '')
static

Get langauge object.

public

Parameters
string$a_lang_key
Returns
ilLanguage

Definition at line 44 of file class.ilLanguageFactory.php.

References $DIC, $languages, and $lng.

Referenced by ilMailNotification\__construct(), ilMail\_getAutoGeneratedMessageString(), ilECSAppEventListener\_sendNotification(), ilConsultationHourUtils\bookAppointment(), ilMailTemplateContext\initLanguageByIso2Code(), ilMailNotification\initLanguageByIso2Code(), ilBuddySystemNotification\send(), ilCalendarMailNotification\send(), ilECSObjectSettings\sendNewContentNotification(), ilRemoteObjectBase\sendNewContentNotification(), and ilAuthContainerECS\sendNotification().

45  {
46  global $DIC;
47  $lng = $DIC->language();
48 
49  if (!$a_lang_key) {
50  if (is_object($lng)) {
51  $a_lang_key = $lng->getDefaultLanguage();
52  } else {
53  $a_lang_key = 'en';
54  }
55  }
56  if (isset(self::$languages[$a_lang_key])) {
57  return self::$languages[$a_lang_key];
58  }
59  return self::$languages[$a_lang_key] = new ilLanguage($a_lang_key);
60  }
global $DIC
Definition: saml.php:7
$lng
language handling
$languages
Definition: cssgen2.php:34
+ Here is the caller graph for this function:

◆ _getLanguageOfUser()

static ilLanguageFactory::_getLanguageOfUser (   $a_usr_id)
static

Get language object of user.

Parameters
int$a_usr_id
Returns
ilLanguage

Definition at line 68 of file class.ilLanguageFactory.php.

References ilObjUser\_lookupLanguage().

Referenced by ilObjSurvey\checkReminder(), ilExAssignmentReminder\checkReminders(), ilObjDataCollection\doUpdate(), ilMailNotification\getUserLanguage(), ilTimingsCronReminder\getUserLanguage(), ilChatroom\isOwnerOfPrivateRoom(), ilWikiUtil\sendNotification(), ilNote\sendNotifications(), and ilObjSurvey\sendTutorNotification().

69  {
70  return self::_getLanguage(ilObjUser::_lookupLanguage($a_usr_id));
71  }
static _lookupLanguage($a_usr_id)
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

Field Documentation

◆ $languages

ilLanguageFactory::$languages = array()
staticprivate

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


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