Answer the question
In order to leave comments, you need to log in
Laravel 5.2 how to set locale correctly?
Hello!
Laravel 5.2, need to output dates in localized format.
I can't figure out how to correctly set the global locale configuration.
What I tried:
1. In app.php I put
2. I dragged an article from the database. Accordingly, Laravel created a Carbon-a instance for me to work with time.
I try:'locale' => 'ru',
$article->created_at->formatLocalized('%A %d %B %Y')
Tuesday 02 August 2016
setlocale(LC_TIME, "ru_RU.UTF-8");
Tuesday 02 August 2016
setlocale
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question