Reputation: 59
I have got a problem with the local dayname.
Code from index.blade.php
{{ Carbon\Carbon::parse($case->created_at)->formatLocalized('%A, %e %B %Y') }}
and the output should be e.g.: Sonntag, 08.04.2018
but it returnsSunday, 08.04.2018
I also added to my AppServiceProvider.php following code:
Carbon::setUTF8(true);
Carbon::setLocale('de');
How can I fix this issue? Thanks in advance
Upvotes: 0
Views: 31
Reputation: 61
try to set your env locale first
app()->setLocale('de');
Carbon::setLocale('de');
setlocale(LC_TIME, 'German');
Upvotes: 1