diff --git a/setup/modelfactory.class.inc.php b/setup/modelfactory.class.inc.php index 0fe46b23a..d46ed45a9 100644 --- a/setup/modelfactory.class.inc.php +++ b/setup/modelfactory.class.inc.php @@ -320,8 +320,9 @@ class ModelFactory /** * Loads the definitions corresponding to the given Module * @param MFModule $oModule + * @param Array $aLanguages The list of languages to process (for the dictionaries). If empty all languages are kept */ - public function LoadModule(MFModule $oModule) + public function LoadModule(MFModule $oModule, $aLanguages = array()) { try { @@ -395,6 +396,12 @@ class ModelFactory foreach ($this->aDict as $sLanguageCode => $aDictDefinition) { + if ((count($aLanguages) > 0 ) && !in_array($sLanguageCode, $aLanguages)) + { + // skip some languages if the parameter says so + continue; + } + $oNodes = $this->GetNodeById('dictionary', $sLanguageCode, $this->oDictionaries); if ($oNodes->length == 0) {