Use new lang path

This commit is contained in:
Lance Pioch 2024-03-20 02:11:15 -04:00
parent 798ac6d4c1
commit 0eef1c9bbc

View File

@ -17,7 +17,7 @@ trait AvailableLanguages
*/ */
public function getAvailableLanguages(bool $localize = false): array public function getAvailableLanguages(bool $localize = false): array
{ {
return collect($this->getFilesystemInstance()->directories(resource_path('lang')))->mapWithKeys(function ($path) use ($localize) { return collect($this->getFilesystemInstance()->directories(base_path('lang')))->mapWithKeys(function ($path) use ($localize) {
$code = basename($path); $code = basename($path);
$value = $localize ? $this->getIsoInstance()->nativeByCode1($code) : $this->getIsoInstance()->languageByCode1($code); $value = $localize ? $this->getIsoInstance()->nativeByCode1($code) : $this->getIsoInstance()->languageByCode1($code);