Answer the question
In order to leave comments, you need to log in
How to russify date output in php?
In general, I installed php-fpm + nginx
the last glitch in that the output of php date / strftime does not want the month and day in Cyrillic
, the output of locale -a says that there is ru_RU.utf8,
I set LANG=ru_RU in /etc/default/locale. UTF-8
is still nothing, where you can drop it?
Answer the question
In order to leave comments, you need to log in
How to russify date output in php?The only correct solution is through JS on the client side.
We cling to the locale from the operating system:
setlocale(LC_ALL,"russian");
Keep in mind that not all date functions understand locales.
Use strftime("%Y-%m-%d").
But bugs are still possible.
Therefore, the output of the date in symbolic form (the names of the months) is better to process through an array where to set the correspondence of the month number => month name.
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question