3 declare(strict_types=1);
26 $active_languages = $this->
getADT()->getCopyOfDefinition()->getActiveLanguages();
28 if (!count($active_languages)) {
32 (
string) $this->
getADT()->getText(),
38 $is_translation = null;
39 foreach ($active_languages as $active_language) {
40 if (strcmp($active_language, $this->
getADT()->getCopyOfDefinition()->getDefaultLanguage()) === 0) {
41 $is_translation =
false;
43 $is_translation =
true;
46 $languages = $this->
getADT()->getTranslations();
50 if (array_key_exists($active_language, $languages)) {
51 $text = $languages[$active_language];
69 if (!$this->
getADT()->getCopyOfDefinition()->supportsTranslations()) {
70 parent::importFromPost();
73 $active_languages = $this->
getADT()->getCopyOfDefinition()->getActiveLanguages();
74 foreach ($active_languages as $language) {
75 $this->
getADT()->setTranslation(
81 $input_item->setValue((
string) $this->
getADT()->getTranslations()[$language]);
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
Class ilADTLocalizedText.
Class ilADTLocalizedTextDBBridge.
addElementToForm(string $title, string $element_id, string $value, bool $is_translation=false, string $language='')