Allow filtering of the languages to install

SVN:trunk[2713]
This commit is contained in:
Denis Flaven
2013-05-02 08:09:10 +00:00
parent 21f0d96146
commit 427f50b390

View File

@@ -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)
{