protected function registerLanguageNamespace(Module $module)
    {
        $moduleName = $module->getName();

        $langPath = base_path("resources/lang/modules/$moduleName");

        if (is_dir($langPath)) {
            $this->loadTranslationsFrom($langPath, $moduleName);
            $this->app['localization.js-generator']->addSourcePath($langPath, $moduleName);
        } else {
            $this->loadTranslationsFrom($module->getPath().'/Resources/lang', $moduleName);
            $this->app['localization.js-generator']->addSourcePath($module->getPath().'/Resources/lang', $moduleName);
        }
    }