ILIAS  trunk Revision v11.0_alpha-3011-gc6b235a2e85
class.ilLanguageFactory.php
Go to the documentation of this file.
1<?php
2
19declare(strict_types=1);
20
30{
31 private static array $languages = array();
32
36 public static function _getLanguage(string $a_lang_key = ''): 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 }
51
56 public static function _getLanguageOfUser(int $a_usr_id): ilLanguage
57 {
59 }
60}
static _getLanguageOfUser(int $a_usr_id)
Get language object of user.
static _getLanguage(string $a_lang_key='')
Get language object.
language handling
static _lookupLanguage(int $a_usr_id)
global $lng
Definition: privfeed.php:31
global $DIC
Definition: shib_login.php:26