diff --git a/app/Http/Controllers/PreferencesController.php b/app/Http/Controllers/PreferencesController.php index d99d1f9002..50b5aea822 100644 --- a/app/Http/Controllers/PreferencesController.php +++ b/app/Http/Controllers/PreferencesController.php @@ -86,13 +86,14 @@ class PreferencesController extends Controller $viewRange = $viewRangePref->data; $frontPageAccounts = app('preferences')->get('frontPageAccounts', $accountIds); $language = app('preferences')->get('language', config('firefly.default_language', 'en_US'))->data; + $languages = config('firefly.languages'); $listPageSize = app('preferences')->get('listPageSize', 50)->data; $customFiscalYear = app('preferences')->get('customFiscalYear', 0)->data; $fiscalYearStartStr = app('preferences')->get('fiscalYearStart', '01-01')->data; $fiscalYearStart = date('Y') . '-' . $fiscalYearStartStr; $tjOptionalFields = app('preferences')->get('transaction_journal_optional_fields', [])->data; - ksort($language); + ksort($languages); // an important fallback is that the frontPageAccount array gets refilled automatically // when it turns up empty. @@ -106,6 +107,7 @@ class PreferencesController extends Controller 'language', 'groupedAccounts', 'frontPageAccounts', + 'languages', 'tjOptionalFields', 'viewRange', 'customFiscalYear', diff --git a/resources/views/v1/preferences/index.twig b/resources/views/v1/preferences/index.twig index efac47f5b2..3feda66700 100644 --- a/resources/views/v1/preferences/index.twig +++ b/resources/views/v1/preferences/index.twig @@ -30,7 +30,7 @@