mirror of
				https://github.com/firefly-iii/firefly-iii.git
				synced 2025-10-31 02:36:28 +00:00 
			
		
		
		
	Replaced some language calls.
This commit is contained in:
		| @@ -36,8 +36,8 @@ abstract class Controller extends BaseController | ||||
|         if (Auth::check()) { | ||||
|             $pref                    = Preferences::get('language', env('DEFAULT_LANGUAGE', 'en_US')); | ||||
|             $lang                    = $pref->data; | ||||
|             $this->monthFormat       = Config::get('firefly.month.' . $lang); | ||||
|             $this->monthAndDayFormat = Config::get('firefly.monthAndDay.' . $lang); | ||||
|             $this->monthFormat       = trans('config.month'); | ||||
|             $this->monthAndDayFormat = trans('config.month_and_day'); | ||||
|  | ||||
|             View::share('monthFormat', $this->monthFormat); | ||||
|             View::share('monthAndDayFormat', $this->monthAndDayFormat); | ||||
|   | ||||
| @@ -37,10 +37,12 @@ class PreferencesController extends Controller | ||||
|         $viewRange         = $viewRangePref->data; | ||||
|         $frontPageAccounts = Preferences::get('frontPageAccounts', []); | ||||
|         $budgetMax         = Preferences::get('budgetMaximum', 1000); | ||||
|         $language          = Preferences::get('language', env('DEFAULT_LANGUAGE','en_US'))->data; | ||||
|         $language          = Preferences::get('language', env('DEFAULT_LANGUAGE', 'en_US'))->data; | ||||
|         $budgetMaximum     = $budgetMax->data; | ||||
|  | ||||
|         return view('preferences.index', compact('budgetMaximum', 'language', 'accounts', 'frontPageAccounts', 'viewRange')); | ||||
|         $showIncomplete = env('SHOW_INCOMPLETE_TRANSLATIONS', 'false') == 'true'; | ||||
|  | ||||
|         return view('preferences.index', compact('budgetMaximum', 'language', 'accounts', 'frontPageAccounts', 'viewRange', 'showIncomplete')); | ||||
|     } | ||||
|  | ||||
|     /** | ||||
| @@ -70,7 +72,7 @@ class PreferencesController extends Controller | ||||
|  | ||||
|         // language: | ||||
|         $lang = Input::get('language'); | ||||
|         if (in_array($lang, array_keys(Config::get('firefly.lang')))) { | ||||
|         if (in_array($lang, array_keys(Config::get('firefly.languages')))) { | ||||
|             Preferences::set('language', $lang); | ||||
|         } | ||||
|  | ||||
|   | ||||
		Reference in New Issue
	
	Block a user