38 $this->ctrl = $DIC->ctrl();
39 $this->lng = $DIC->language();
40 $this->tpl = $DIC[
"tpl"];
51 $cmd =
$ilCtrl->getCmd(
"showTranslationImportForm");
53 if (in_array($cmd,
array(
"showTranslationImportForm",
"importTranslation"))) {
71 $tpl->setContent($form->getHTML());
82 $lng->loadLanguageModule(
"meta");
84 include_once(
"Services/Form/classes/class.ilPropertyFormGUI.php");
90 $fi->setRequired(
true);
94 include_once(
"./Services/MetaData/classes/class.ilMDLanguageItem.php");
95 include_once(
"./Services/Object/classes/class.ilObjectTranslation.php");
97 foreach ($ot->getLanguages() as
$l) {
98 if (
$l[
"lang_code"] != $ot->getMasterLanguage()) {
99 $options[
$l[
"lang_code"]] =
$lng->txt(
"meta_l_" . $l[
"lang_code"]);
106 $form->addCommandButton(
"importTranslation",
$lng->txt(
"import"));
107 $form->setTitle(
$lng->txt(
"cont_import_trans"));
121 include_once(
"./Services/Export/classes/class.ilImport.php");
123 $conf = $imp->getConfig(
"Modules/LearningModule");
126 include_once(
"./Services/Object/classes/class.ilObjectTranslation.php");
128 if ($target_lang == $ot->getMasterLanguage() || $target_lang ==
"") {
130 $ilCtrl->redirect($this,
"showTranslationImportForm");
133 $conf->setTranslationImportMode($this->lm, $target_lang);
136 $_FILES[
"importfile"][
"tmp_name"],
137 $_FILES[
"importfile"][
"name"],
139 "Modules/LearningModule" 143 $ilCtrl->redirect($this,
"showTranslationImportForm");
static sendSuccess($a_info="", $a_keep=false)
Send Success Message to Screen.
Import related features for learning modules.
showTranslationImportForm()
Translation import.
initTranslationImportForm()
Init translation input form.
static sendInfo($a_info="", $a_keep=false)
Send Info Message to Screen.
importTranslation()
Import translation.
if(isset($_POST['submit'])) $form
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.
__construct($a_lm)
Constructor.
static sendFailure($a_info="", $a_keep=false)
Send Failure Message to Screen.
static getInstance($a_obj_id)
Get instance.
executeCommand()
Execute command.
if(!isset($_REQUEST['ReturnTo'])) if(!isset($_REQUEST['AuthId'])) $options