ILIAS  release_8 Revision v8.24
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.

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 }
language handling
global $DIC
Definition: feed.php:28
$lng

References $DIC, and $lng.

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

+ Here is the caller graph for this function:

◆ _getLanguageOfUser()

static ilLanguageFactory::_getLanguageOfUser ( int  $a_usr_id)
static

Get language object of user.

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

58 {
60 }
static _getLanguage(string $a_lang_key='')
Get language object.
static _lookupLanguage(int $a_usr_id)

References _getLanguage(), and ilObjUser\_lookupLanguage().

Referenced by ilMailNotification\getUserLanguage(), ilTimingsCronReminder\getUserLanguage(), ilLearningModuleNotification\send(), and ilObjSurvey\sendTutorNotification().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

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: