I am new to Laravel and to format a datetime there was used format() method but the formatted datetime is displayed in English which I would like to change to German. How Is it possible to achieve. The code in view:<small>Added {{$personal->created_at->format('F jS, Y')}}</small>
Asked
Active
Viewed 94 times
0

Mirich
- 333
- 2
- 5
- 19
-
1Looks like similar problem there: https://stackoverflow.com/questions/1328036/php-date-in-foreign-languages-e-g-mar-25-ao%C3%BB-09 – matiit Sep 10 '18 at 08:21
1 Answers
0
Try this :
setlocale(LC_TIME, 'German');
echo $dt->formatLocalized('%A %d %B %Y'); // Mittwoch 21 Mai 1975
setlocale(LC_TIME, '');
echo $dt->formatLocalized('%A %d %B %Y'); // Wednesday 21 May 1975

sanduniYW
- 723
- 11
- 19