44 $this->
ctrl = $DIC->ctrl();
45 $this->
lng = $DIC->language();
46 $this->tpl = $DIC[
"tpl"];
54 $cmd = $ilCtrl->
getCmd(
"showTranslationImportForm");
56 if (in_array($cmd, array(
"showTranslationImportForm",
"importTranslation"))) {
85 $fi->setRequired(
true);
90 foreach ($ot->getLanguages() as $l) {
91 if ($l->getLanguageCode() !== $ot->getMasterLanguage()) {
92 $options[$l->getLanguageCode()] = $lng->
txt(
"meta_l_" . $l->getLanguageCode());
96 $si->setOptions($options);
99 $form->addCommandButton(
"importTranslation", $lng->
txt(
"import"));
100 $form->setTitle($lng->
txt(
"cont_import_trans"));
101 $form->setFormAction($ilCtrl->getFormAction($this));
112 $conf = $imp->getConfig(
"Modules/LearningModule");
114 $target_lang = $this->request->getImportLang();
116 if ($target_lang == $ot->getMasterLanguage() || $target_lang ==
"") {
117 $this->tpl->setOnScreenMessage(
'failure', $lng->
txt(
"cont_transl_master_language_not_allowed"),
true);
118 $ilCtrl->redirect($this,
"showTranslationImportForm");
121 $conf->setTranslationImportMode($this->lm, $target_lang);
124 $_FILES[
"importfile"][
"tmp_name"],
125 $_FILES[
"importfile"][
"name"],
127 "Modules/LearningModule" 130 $this->tpl->setOnScreenMessage(
'success', $lng->
txt(
"msg_obj_modified"),
true);
131 $ilCtrl->redirect($this,
"showTranslationImportForm");
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
Import related features for learning modules.
txt(string $a_topic, string $a_default_lang_fallback_mod="")
gets the text for a given topic if the topic is not in the list, the topic itself with "-" will be re...
ilGlobalTemplateInterface $tpl
setOnScreenMessage(string $type, string $a_txt, bool $a_keep=false)
Set a message to be displayed to the user.
getCmd(string $fallback_command=null)
showTranslationImportForm()
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
initTranslationImportForm()
loadLanguageModule(string $a_module)
Load language module.
setContent(string $a_html)
Sets content for standard template.
EditingGUIRequest $request
static getInstance(int $obj_id)
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
__construct(ilObjLearningModule $a_lm)