src/Service/MelisCoreTranslationService.php
private function checkLanguageDirectory($dir, $modulePath)
    {
        $melisCoreConfig = $this->getServiceLocator()->get('MelisCoreConfig');
        $confLanguage = $melisCoreConfig->getItem('meliscore/datas/default/langauges/default_trans_files');
        $defaultTransInterface = $confLanguage['defaultTransInterface'];
        $defaultTransForms = $confLanguage['defaultTransForms'];
        $result = true;

        if (!file_exists($dir)) {
            $result = mkdir($dir, 0777, true);
            if(file_exists($modulePath.$defaultTransInterface)){
                copy($modulePath.$defaultTransInterface, $dir.'/'.$defaultTransInterface);
            }
            if(file_exists($modulePath.$defaultTransForms)){
                copy($modulePath.$defaultTransForms, $dir.'/'.$defaultTransForms);
            }
        }

        return $result;
    }
private function checkLanguageDirectory($dir, $modulePath)
    {
        $melisCoreConfig = $this->getServiceLocator()->get('MelisCoreConfig');
        $confLanguage = $melisCoreConfig->getItem('meliscore/datas/default/langauges/default_trans_files');
        $defaultTransInterface = $confLanguage['defaultTransInterface'];
        $defaultTransForms = $confLanguage['defaultTransForms'];
        $result = true;

        if (!file_exists($dir)) {
            $result = mkdir($dir, 0777, true);
            if(file_exists($modulePath.$defaultTransInterface)){
                copy($modulePath.$defaultTransInterface, $dir.'/'.$defaultTransInterface);
            }
            if(file_exists($modulePath.$defaultTransForms)){
                copy($modulePath.$defaultTransForms, $dir.'/'.$defaultTransForms);
            }
        }

        return $result;
    }
private function checkLanguageDirectory ( $ dir , $ modulePath ) { $ melisCoreConfig = $ this -> getServiceLocator ( ) -> get ( 'MelisCoreConfig' ) ; $ confLanguage = $ melisCoreConfig -> getItem ( 'meliscore/datas/default/langauges/default_trans_files' ) ; $ defaultTransInterface = $ confLanguage [ 'defaultTransInterface' ] ; $ defaultTransForms = $ confLanguage [ 'defaultTransForms' ] ; $ result = true ; if ( ! file_exists ( $ dir ) ) { $ result = mkdir ( $ dir , 0777 , true ) ; if ( file_exists ( $ modulePath . $ defaultTransInterface ) ) { copy ( $ modulePath . $ defaultTransInterface , $ dir . '/' . $ defaultTransInterface ) ; } if ( file_exists ( $ modulePath . $ defaultTransForms ) ) { copy ( $ modulePath . $ defaultTransForms , $ dir . '/' . $ defaultTransForms ) ; } } return $ result ; }
Checks the language directory if the path exist, creates a directory if with english translations if not existing

@param string $dir The directory path of the language directory
@param string $modulePath The directory path of melis english translations

@return boolean true if existing, otherwise false if failed to create
Checks the language directory if the path exist creates a directory if with english translations if not existing