|
function string | $translation: string { if ($translation === '-' . $key . '-') { $file = __DIR__ . '/' . self::LANG_PHP |
|
◆ __construct()
ILIAS\GlobalScreen_\UI\Translator::__construct |
( |
private readonly Container |
$dic | ) |
|
◆ translate()
ILIAS\GlobalScreen_\UI\Translator::translate |
( |
string |
$identifier, |
|
|
?string |
$prefix = null |
|
) |
| |
Definition at line 40 of file Translator.php.
References ILIAS\GlobalScreen_\UI\Translator\$translation, and null.
42 $key = $prefix !==
null ? $prefix .
'_' . $identifier : $identifier;
44 return $this->dic->language()->txt($key);
50 $file = __DIR__ .
'/' . self::LANG_PHP;
52 $current = (array) ((@include $file) ?? []);
55 file_put_contents($file,
'<?php return ' . var_export(
$current,
true) .
';');
function string $translation
while($session_entry=$r->fetchRow(ilDBConstants::FETCHMODE_ASSOC)) return null
◆ $current
ILIAS\GlobalScreen_\UI\Translator::$current = (array) ((@include $file) ?? []) |
◆ $translation [1/2]
function string ILIAS\GlobalScreen_\UI\Translator::$translation |
|
package |
◆ $translation [2/2]
return ILIAS\GlobalScreen_\UI\Translator::$translation |
◆ else
if (!isset( $current[ $key])) ILIAS\GlobalScreen_\UI\Translator::else |
◆ LANG_PHP
const ILIAS\GlobalScreen_\UI\Translator::LANG_PHP = 'lang.php' |
|
private |
The documentation for this class was generated from the following file: