Providers/ModulesServiceProvider.php
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);
        }
    }
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);
        }
    }
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 ) ; } }
Register the language namespaces for the modules.

@param Module $module
Register the language namespaces for the modules .