Skip to content

Commit

Permalink
Fix language selector
Browse files Browse the repository at this point in the history
  • Loading branch information
murrant committed Apr 25, 2023
1 parent 2271e29 commit 81e2b54
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion app/Http/Controllers/UserPreferencesController.php
Original file line number Diff line number Diff line change
Expand Up @@ -125,7 +125,7 @@ public function store(Request $request)

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);
Expand Down

0 comments on commit 81e2b54

Please sign in to comment.