diff --git a/README.md b/README.md index ca37aa7..86ad3a3 100644 --- a/README.md +++ b/README.md @@ -80,7 +80,6 @@ The configuration will be published to `config/localization-js.php`. You may edit this file to define the messages you need in your Javascript code. Just edit the `messages` array in the config file. **Empty messages array will include all the language files in build**. - To make only `pagination.php` and `validation.php` files to be included in build process: ```php @@ -94,10 +93,6 @@ return [ ]; ``` -### Specifying the path to your language folder - -Out of the box, this package points to `/app/lang` in Laravel 4 or the `resources/lang` in Laravel >= 5 but you can specify where yours exists by editing the `lang_path` key in the config file. - ### Using [gulp](http://gulpjs.com/) (optional) Install [`gulp-shell`](https://github.com/sun-zheng-an/gulp-shell) and then run it directly in your `gulpfile.js`: diff --git a/src/Mariuzzo/LaravelJsLocalization/LaravelJsLocalizationServiceProvider.php b/src/Mariuzzo/LaravelJsLocalization/LaravelJsLocalizationServiceProvider.php index d82a9b9..eab4548 100644 --- a/src/Mariuzzo/LaravelJsLocalization/LaravelJsLocalizationServiceProvider.php +++ b/src/Mariuzzo/LaravelJsLocalization/LaravelJsLocalizationServiceProvider.php @@ -70,17 +70,11 @@ public function register() $files = $app['files']; - $languagePath = $this->app['config']->get('localization-js')['lang_path']; - if (empty($languagePath)) { - if ($laravelMajorVersion === 4) { - $languagePath = 'app/lang'; - $langs = $app['path.base'].'/app/lang'; - } elseif ($laravelMajorVersion >= 5) { - $languagePath = 'resources/lang'; - } + if ($laravelMajorVersion === 4) { + $langs = $app['path.base'].'/app/lang'; + } elseif ($laravelMajorVersion >= 5) { + $langs = $app['path.base'].'/resources/lang'; } - $langs = $app['path.base'].$languagePath; - $messages = $app['config']->get('localization-js.messages'); $generator = new Generators\LangJsGenerator($files, $langs, $messages); diff --git a/src/config/config.php b/src/config/config.php index 34f7731..77d5500 100644 --- a/src/config/config.php +++ b/src/config/config.php @@ -19,9 +19,4 @@ * The default path to use for the generated javascript. */ 'path' => public_path('messages.js'), - - /* - * The path for your laravel lang folder - */ - 'lang_path' => '', ];