Fix language selector (#15003)

This commit is contained in:
Tony Murray
2023-04-25 23:10:37 -05:00
committed by GitHub
parent 2f39917f3b
commit 8a630edb38

View File

@@ -125,7 +125,7 @@ class UserPreferencesController extends Controller
private function getValidLocales()
{
return array_reduce(glob(resource_path('lang') . '/*', GLOB_ONLYDIR), function ($locales, $locale) {
return array_reduce(glob(base_path('lang') . '/*', GLOB_ONLYDIR), function ($locales, $locale) {
$locale = basename($locale);
$lang = __('preferences.lang', [], $locale);
$locales[$locale] = ($lang == 'preferences.lang' ? $locale : $lang);