mirror of
https://github.com/firefly-iii/firefly-iii.git
synced 2025-10-18 10:16:49 +00:00
Better translations for dates and so on.
This commit is contained in:
@@ -43,9 +43,6 @@ class Controller extends BaseController
|
|||||||
if (Auth::check()) {
|
if (Auth::check()) {
|
||||||
$pref = Preferences::get('language', env('DEFAULT_LANGUAGE', 'en_US'));
|
$pref = Preferences::get('language', env('DEFAULT_LANGUAGE', 'en_US'));
|
||||||
$lang = $pref->data;
|
$lang = $pref->data;
|
||||||
$this->monthFormat = (string)trans('config.month');
|
|
||||||
$this->monthAndDayFormat = (string)trans('config.month_and_day');
|
|
||||||
$this->dateTimeFormat = (string)trans('config.date_time');
|
|
||||||
|
|
||||||
App::setLocale($lang);
|
App::setLocale($lang);
|
||||||
Carbon::setLocale(substr($lang, 0, 2));
|
Carbon::setLocale(substr($lang, 0, 2));
|
||||||
@@ -55,6 +52,11 @@ class Controller extends BaseController
|
|||||||
setlocale(LC_TIME, $locale);
|
setlocale(LC_TIME, $locale);
|
||||||
setlocale(LC_MONETARY, $locale);
|
setlocale(LC_MONETARY, $locale);
|
||||||
|
|
||||||
|
// save some formats:
|
||||||
|
$this->monthFormat = (string)trans('config.month');
|
||||||
|
$this->monthAndDayFormat = (string)trans('config.month_and_day');
|
||||||
|
$this->dateTimeFormat = (string)trans('config.date_time');
|
||||||
|
|
||||||
// change localeconv to a new array:
|
// change localeconv to a new array:
|
||||||
$numberFormatter = numfmt_create($lang, NumberFormatter::CURRENCY);
|
$numberFormatter = numfmt_create($lang, NumberFormatter::CURRENCY);
|
||||||
$localeconv = [
|
$localeconv = [
|
||||||
|
Reference in New Issue
Block a user