public function load($lang) {
        $langDir = MODULES_DIR . DS . RouteController::$currentModule . '/Views/lang/' . $lang;

        $files = glob($langDir . "/*.php");
        if (count($files) == 0) {
            throw new \Exception(ExceptionMessages::TRANSLATION_FILES_NOT_FOUND);
        }

        foreach ($files as $file) {
            $fileInfo = pathinfo($file);
            self::$translations[$fileInfo['filename']] = require_once $file;
        }
    }
public function load($lang) {
        $langDir = MODULES_DIR . DS . RouteController::$currentModule . '/Views/lang/' . $lang;

        $files = glob($langDir . "/*.php");
        if (count($files) == 0) {
            throw new \Exception(ExceptionMessages::TRANSLATION_FILES_NOT_FOUND);
        }

        foreach ($files as $file) {
            $fileInfo = pathinfo($file);
            self::$translations[$fileInfo['filename']] = require_once $file;
        }
    }
public function load ( $ lang ) { $ langDir = MODULES_DIR . DS . RouteController :: $ currentModule . '/Views/lang/' . $ lang ; $ files = glob ( $ langDir . "/*.php" ) ; if ( count ( $ files ) == 0 ) { throw new \ Exception ( ExceptionMessages :: TRANSLATION_FILES_NOT_FOUND ) ; } foreach ( $ files as $ file ) { $ fileInfo = pathinfo ( $ file ) ; self :: $ translations [ $ fileInfo [ 'filename' ] ] = require_once $ file ; } }
Finds and loads translation files

@param string $lang
@return void
@throws \Exception
Finds and loads translation files