ILIAS  release_8 Revision v8.19-1-g4e8f2f9140c
All Data Structures Namespaces Files Functions Variables Modules Pages
ilLanguageFactory Class Reference

This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Learning e.V. More...

+ 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

This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Learning e.V.

ILIAS is licensed with the GPL-3.0, see https://www.gnu.org/licenses/gpl-3.0.en.html You should have received a copy of said license along with the source code, too.

If this is not the case or you just want to try ILIAS, you'll find us at: https://www.ilias.de https://github.com/ILIAS-eLearning

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

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

Member Function Documentation

◆ _getLanguage()

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

Get language object.

Definition at line 37 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().

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

◆ _getLanguageOfUser()

static ilLanguageFactory::_getLanguageOfUser ( int  $a_usr_id)
static

Field Documentation

◆ $languages

array ilLanguageFactory::$languages = array()
staticprivate

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


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