diff --git a/framework/core/src/Extend/LanguagePack.php b/framework/core/src/Extend/LanguagePack.php index 80b3de45b..afd372059 100644 --- a/framework/core/src/Extend/LanguagePack.php +++ b/framework/core/src/Extend/LanguagePack.php @@ -20,14 +20,14 @@ use RuntimeException; class LanguagePack implements ExtenderInterface, LifecycleInterface { - protected $path; + private $path; /** * LanguagePack constructor. * * @param string|null $path Path to yaml language files. */ - public function __construct(string $path = null) + public function __construct(string $path = '/locale') { $this->path = $path; } @@ -61,11 +61,11 @@ class LanguagePack implements ExtenderInterface, LifecycleInterface { $locales->addLocale($locale, $title); - $directory = $extension->getPath().($this->path ?? '/locale'); + $directory = $extension->getPath().$this->path; if (! is_dir($directory)) { throw new RuntimeException( - 'Language packs must have a "locale" subdirectory.' + 'Expected to find "'.$this->path.'" directory in language pack.' ); }