31 $cmd = $ilCtrl->getCmd(
"showTranslationImportForm");
33 if (in_array(
$cmd,
array(
"showTranslationImportForm",
"importTranslation")))
51 $tpl->setContent($form->getHTML());
61 $lng->loadLanguageModule(
"meta");
63 include_once(
"Services/Form/classes/class.ilPropertyFormGUI.php");
69 $fi->setRequired(
true);
73 include_once(
"./Services/MetaData/classes/class.ilMDLanguageItem.php");
74 include_once(
"./Services/Object/classes/class.ilObjectTranslation.php");
76 foreach ($ot->getLanguages() as
$l)
78 if (
$l[
"lang_code"] != $ot->getMasterLanguage())
80 $options[
$l[
"lang_code"]] = $lng->txt(
"meta_l_".$l[
"lang_code"]);
87 $form->addCommandButton(
"importTranslation", $lng->txt(
"import"));
88 $form->setTitle($lng->txt(
"mep_import_trans"));
89 $form->setFormAction($ilCtrl->getFormAction($this));
101 include_once(
"./Services/Export/classes/class.ilImport.php");
103 $conf = $imp->getConfig(
"Modules/MediaPool");
106 include_once(
"./Services/Object/classes/class.ilObjectTranslation.php");
108 if ($target_lang == $ot->getMasterLanguage())
111 $ilCtrl->redirect($this,
"showTranslationImportForm");
114 $conf->setTranslationImportMode($this->mep, $target_lang);
115 $imp->importObject(null, $_FILES[
"importfile"][
"tmp_name"],
116 $_FILES[
"importfile"][
"name"],
"mep",
"Modules/MediaPool");
119 $ilCtrl->redirect($this,
"showTranslationImportForm");
static sendSuccess($a_info="", $a_keep=false)
Send Success Message to Screen.
static sendInfo($a_info="", $a_keep=false)
Send Info Message to Screen.
if(!is_array($argv)) $options
static stripSlashes($a_str, $a_strip_html=true, $a_allow="")
strip slashes if magic qoutes is enabled
Create styles array
The data for the language used.
static sendFailure($a_info="", $a_keep=false)
Send Failure Message to Screen.
static getInstance($a_obj_id)
Get instance.