19declare(strict_types=1);
34 private array $texts = [],
35 private array $plurals = [],
39 public function getKeys(
string $module,
string $lang_key, ?
string $client_data_dir): ?array
41 if (!isset($this->texts[
$module][$lang_key]) && !isset($this->plurals[
$module][$lang_key])) {
45 foreach (array_merge(array_keys($this->texts[
$module][$lang_key] ?? []), array_keys($this->plurals[
$module][$lang_key] ?? [])) as $key) {
52 public function getText(
string $module,
string $lang_key,
string $key, ?
string $client_data_dir): ?string
54 return $this->texts[
$module][$lang_key][$key] ??
null;
57 public function getPluralText(
string $module,
string $lang_key,
string $key,
int $n, ?
string $client_data_dir): ?string
59 $forms = $this->plurals[
$module][$lang_key][$key] ??
null;
61 return $forms ===
null ? null : $forms[$n === 1 ? 0 : 1] ??
null;
Test double for TranslationRepository: serves what the test hands in, no files, build or database.
__construct(private array $texts=[], private array $plurals=[],)
getText(string $module, string $lang_key, string $key, ?string $client_data_dir)
null if there is none (not served, not translated, or a problem, see MigratedTranslations::getProblem...
getPluralText(string $module, string $lang_key, string $key, int $n, ?string $client_data_dir)
The form the plural rule of $lang_key selects for $n; null if $key is no plural message there.
getKeys(string $module, string $lang_key, ?string $client_data_dir)
Identifier => $module, null if $module is not served for $lang_key.
if(!isset($arguments[0])) if(count( $arguments) > 3) if(! $remove_from_lang &&isset($arguments[2]) &&!is_dir($arguments[2])) $module
The values the ILIAS modules serve at runtime: the shipped ones with the local changes on top (see il...