Rename languages.

This commit is contained in:
James Cole
2015-12-19 20:54:27 +01:00
parent 719af38a61
commit c1ba591b26
13 changed files with 24 additions and 23 deletions

View File

@@ -34,7 +34,7 @@ abstract class Controller extends BaseController
View::share('hideTags', false);
if (Auth::check()) {
$pref = Preferences::get('language', 'en');
$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);

View File

@@ -37,7 +37,7 @@ class PreferencesController extends Controller
$viewRange = $viewRangePref->data;
$frontPageAccounts = Preferences::get('frontPageAccounts', []);
$budgetMax = Preferences::get('budgetMaximum', 1000);
$language = Preferences::get('language', 'en')->data;
$language = Preferences::get('language', env('DEFAULT_LANGUAGE','en_US'))->data;
$budgetMaximum = $budgetMax->data;
return view('preferences.index', compact('budgetMaximum', 'language', 'accounts', 'frontPageAccounts', 'viewRange'));

View File

@@ -61,7 +61,7 @@ class Authenticate
}
// if logged in, set user language:
$pref = Preferences::get('language', 'en');
$pref = Preferences::get('language', env('DEFAULT_LANGUAGE','en_US'));
App::setLocale($pref->data);
Carbon::setLocale($pref->data);

View File

@@ -354,7 +354,7 @@ Breadcrumbs::register(
'reports.report', function (Generator $breadcrumbs, Carbon $start, Carbon $end, $reportType, $accountIds) {
$breadcrumbs->parent('reports.index');
$pref = Preferences::get('language', 'en')->data;
$pref = Preferences::get('language', env('DEFAULT_LANGUAGE','en_US'))->data;
$monthFormat = Config::get('firefly.monthAndDay.' . $pref);
$title = trans('firefly.report_default', ['start' => $start->formatLocalized($monthFormat), 'end' => $end->formatLocalized($monthFormat)]);