diff --git a/src/Mariuzzo/LaravelJsLocalization/LaravelJsLocalizationServiceProvider.php b/src/Mariuzzo/LaravelJsLocalization/LaravelJsLocalizationServiceProvider.php index eab4548..41247e9 100644 --- a/src/Mariuzzo/LaravelJsLocalization/LaravelJsLocalizationServiceProvider.php +++ b/src/Mariuzzo/LaravelJsLocalization/LaravelJsLocalizationServiceProvider.php @@ -72,8 +72,10 @@ public function register() if ($laravelMajorVersion === 4) { $langs = $app['path.base'].'/app/lang'; - } elseif ($laravelMajorVersion >= 5) { + } elseif ($laravelMajorVersion >= 5 && $laravelMajorVersion < 9) { $langs = $app['path.base'].'/resources/lang'; + } elseif ($laravelMajorVersion >= 9) { + $langs = app()->langPath(); } $messages = $app['config']->get('localization-js.messages'); $generator = new Generators\LangJsGenerator($files, $langs, $messages);