ILIAS  trunk Revision v11.0_alpha-1846-g895b5f47236
All Data Structures Namespaces Files Functions Variables Enumerations Enumerator Modules Pages
ilLanguageFactory Class Reference
+ Collaboration diagram for ilLanguageFactory:

Static Public Member Functions

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

Static Private Attributes

static array $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 29 of file class.ilLanguageFactory.php.

Member Function Documentation

◆ _getLanguage()

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

Get language object.

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

References $DIC, and $lng.

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

36  : ilLanguage
37  {
38  global $DIC;
39  $lng = $DIC->language();
40 
41  if (!$a_lang_key) {
42  if (is_object($lng)) {
43  $a_lang_key = $lng->getDefaultLanguage();
44  } else {
45  $a_lang_key = "en";
46  }
47  }
48 
49  return self::$languages[$a_lang_key] ?? (self::$languages[$a_lang_key] = new ilLanguage($a_lang_key));
50  }
global $DIC
Definition: shib_login.php:22
global $lng
Definition: privfeed.php:31
+ Here is the caller graph for this function:

◆ _getLanguageOfUser()

Field Documentation

◆ $languages

array ilLanguageFactory::$languages = array()
staticprivate

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


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