ILIAS  trunk Revision v11.0_alpha-1843-g9e1fad99175
All Data Structures Namespaces Files Functions Variables Enumerations Enumerator Modules Pages
LanguageLegacyInitialisationAdapter.php
Go to the documentation of this file.
1 <?php
2 
19 declare(strict_types=1);
20 
21 namespace ILIAS\Language;
22 
27 {
28  public function txt(string $a_topic, string $a_default_lang_fallback_mod = ""): string
29  {
30  return $this->getLegacyLanguageInstance()->txt($a_topic, $a_default_lang_fallback_mod);
31  }
32 
33  public function loadLanguageModule(string $a_module): void
34  {
35  $this->getLegacyLanguageInstance()->loadLanguageModule($a_module);
36  }
37 
38  public function getLangKey(): string
39  {
40  return $this->getLegacyLanguageInstance()->getLangKey();
41  }
42 
43  public function toJS($key): void
44  {
45  $this->getLegacyLanguageInstance()->toJS($key);
46  }
47 
48  protected function getLegacyLanguageInstance(): Language
49  {
50  global $DIC;
51  return $DIC->language();
52  }
53 }
global $DIC
Definition: shib_login.php:22
txt(string $a_topic, string $a_default_lang_fallback_mod="")