16 $this->
setTabs(self::CMD_DEFAULT);
23 $language_table->init();
24 $language_table->parse();
26 $this->tpl->setContent($language_table->getHTML());
31 $languages = (array) $this->request->getParsedBody()[
'active_languages'];
32 $default = (string) $this->request->getParsedBody()[
'default'];
34 if (!in_array($default, $languages)) {
37 $this->ctrl->redirect($this, self::CMD_DEFAULT);
41 foreach ($translations->getTranslations() as $translation) {
42 if (!in_array($translation->getLangKey(), $languages)) {
43 $translation->delete();
46 foreach ($languages as $lang_key) {
47 if (!$translations->isConfigured($lang_key)) {
48 $translations->addTranslationEntry($lang_key);
52 $this->record->setDefaultLanguage($default);
53 $this->record->update();
55 #$default = $translations->getTranslation($default); 56 #$default->setTitle($this->record->getTitle()); 57 #$default->setDescription($this->record->getDescription()); 60 ilUtil::sendSuccess($this->
language->txt(
'settings_saved'),
true);
61 $this->ctrl->redirect($this, self::CMD_DEFAULT);
setTabs(string $active_tab)
static sendInfo($a_info="", $a_keep=false)
Send Info Message to Screen.
static sendFailure($a_info="", $a_keep=false)
Send Failure Message to Screen.
Class ilAdvancedMDRecordTranslationGUI ilAdvancedMDRecordTranslationGUI: ilAdvancedMDSettingsGUI.
Class ilAdvancedMDRecordLanguageTableGUI.
static getInstanceByRecordId(int $record_id)