Fix locale setting for Carbon.

This commit is contained in:
James Cole 2015-12-20 08:19:26 +01:00
parent 2e35260bbb
commit 9b40cc6881

View File

@ -63,7 +63,7 @@ class Authenticate
// if logged in, set user language: // if logged in, set user language:
$pref = Preferences::get('language', env('DEFAULT_LANGUAGE','en_US')); $pref = Preferences::get('language', env('DEFAULT_LANGUAGE','en_US'));
App::setLocale($pref->data); App::setLocale($pref->data);
Carbon::setLocale($pref->data); Carbon::setLocale(substr($pref->data,0,2));
setlocale(LC_TIME, Config::get('firefly.locales.' . $pref->data)); setlocale(LC_TIME, Config::get('firefly.locales.' . $pref->data));
setlocale(LC_MONETARY, Config::get('firefly.locales.' . $pref->data)); setlocale(LC_MONETARY, Config::get('firefly.locales.' . $pref->data));